Search in sources :

Example 1 with PropertiesEntity

use of org.bedework.calfacade.base.PropertiesEntity in project bw-calendar-engine by Bedework.

the class CalintfHelper method tombstoneEntity.

protected void tombstoneEntity(final BwShareableContainedDbentity val) {
    if (val instanceof AlarmsEntity) {
        clearCollection(((AlarmsEntity) val).getAlarms());
    }
    if (val instanceof AttachmentsEntity) {
        clearCollection(((AttachmentsEntity) val).getAttachments());
    }
    if (val instanceof AttendeesEntity) {
        clearCollection(((AttendeesEntity) val).getAttendees());
    }
    if (val instanceof CategorisedEntity) {
        clearCollection(((CategorisedEntity) val).getCategories());
    }
    if (val instanceof CommentedEntity) {
        clearCollection(((CommentedEntity) val).getComments());
    }
    if (val instanceof ContactedEntity) {
        clearCollection(((ContactedEntity) val).getContacts());
    }
    if (val instanceof DescriptionEntity) {
        clearCollection(((DescriptionEntity) val).getDescriptions());
    }
    if (val instanceof RecurrenceEntity) {
        RecurrenceEntity re = (RecurrenceEntity) val;
        re.setRecurring(false);
        clearCollection(re.getExdates());
        clearCollection(re.getExrules());
        clearCollection(re.getRdates());
        clearCollection(re.getRrules());
    }
    if (val instanceof ResourcedEntity) {
        clearCollection(((ResourcedEntity) val).getResources());
    }
    if (val instanceof SummaryEntity) {
        clearCollection(((SummaryEntity) val).getSummaries());
    }
    if (val instanceof PropertiesEntity) {
        clearCollection(((PropertiesEntity) val).getProperties());
    }
}
Also used : SummaryEntity(org.bedework.calfacade.base.SummaryEntity) RecurrenceEntity(org.bedework.calfacade.base.RecurrenceEntity) PropertiesEntity(org.bedework.calfacade.base.PropertiesEntity) CategorisedEntity(org.bedework.calfacade.base.CategorisedEntity) AlarmsEntity(org.bedework.calfacade.base.AlarmsEntity) AttendeesEntity(org.bedework.calfacade.base.AttendeesEntity) CommentedEntity(org.bedework.calfacade.base.CommentedEntity) AttachmentsEntity(org.bedework.calfacade.base.AttachmentsEntity) ResourcedEntity(org.bedework.calfacade.base.ResourcedEntity) ContactedEntity(org.bedework.calfacade.base.ContactedEntity) DescriptionEntity(org.bedework.calfacade.base.DescriptionEntity)

Example 2 with PropertiesEntity

use of org.bedework.calfacade.base.PropertiesEntity in project bw-calendar-engine by Bedework.

the class PropertiesRule method end.

@Override
@SuppressWarnings("unchecked")
public void end(final String ns, final String name) throws Exception {
    if (name.equals("properties")) {
        /* Top should be the collection
       */
        Set<BwProperty> ps = (Set<BwProperty>) pop();
        PropertiesEntity pe = (PropertiesEntity) top();
        pe.setProperties(ps);
        return;
    }
    /* Top should be a BwProperty to add to the collection */
    BwProperty p = (BwProperty) pop();
    Collection<BwProperty> ps = (Collection<BwProperty>) top();
    ps.add(p);
}
Also used : PropertiesEntity(org.bedework.calfacade.base.PropertiesEntity) Set(java.util.Set) TreeSet(java.util.TreeSet) Collection(java.util.Collection) BwProperty(org.bedework.calfacade.BwProperty)

Aggregations

PropertiesEntity (org.bedework.calfacade.base.PropertiesEntity)2 Collection (java.util.Collection)1 Set (java.util.Set)1 TreeSet (java.util.TreeSet)1 BwProperty (org.bedework.calfacade.BwProperty)1 AlarmsEntity (org.bedework.calfacade.base.AlarmsEntity)1 AttachmentsEntity (org.bedework.calfacade.base.AttachmentsEntity)1 AttendeesEntity (org.bedework.calfacade.base.AttendeesEntity)1 CategorisedEntity (org.bedework.calfacade.base.CategorisedEntity)1 CommentedEntity (org.bedework.calfacade.base.CommentedEntity)1 ContactedEntity (org.bedework.calfacade.base.ContactedEntity)1 DescriptionEntity (org.bedework.calfacade.base.DescriptionEntity)1 RecurrenceEntity (org.bedework.calfacade.base.RecurrenceEntity)1 ResourcedEntity (org.bedework.calfacade.base.ResourcedEntity)1 SummaryEntity (org.bedework.calfacade.base.SummaryEntity)1