Java Code Examples for net.fortuna.ical4j.model.PropertyList#getProperties()
The following examples show how to use
net.fortuna.ical4j.model.PropertyList#getProperties() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HibBaseEventStamp.java From cosmo with Apache License 2.0 | 6 votes |
public void setExceptionDates(DateList dates) { if (dates == null) { return; } PropertyList<Property> properties = getEvent().getProperties(); for (Property exdate : properties.getProperties(Property.EXDATE)) { properties.remove(exdate); } if (dates.isEmpty()) { return; } ExDate exDate = new ExDate(dates); setDateListPropertyValue(exDate); properties.add(exDate); }
Example 2
Source File: MockBaseEventStamp.java From cosmo with Apache License 2.0 | 6 votes |
/** * Sets recurrence dates. * @param dates The date list. */ public void setRecurrenceDates(DateList dates) { if (dates == null) { return; } PropertyList<Property> pl = getEvent().getProperties(); for (Property rdate : pl.getProperties(Property.RDATE)) { pl.remove(rdate); } if (dates.isEmpty()) { return; } RDate rDate = new RDate(dates); setDateListPropertyValue(rDate); pl.add(rDate); }
Example 3
Source File: MockBaseEventStamp.java From cosmo with Apache License 2.0 | 6 votes |
/** * Sets exception dates. * @param dates The date list. */ public void setExceptionDates(DateList dates) { if (dates == null) { return; } PropertyList<Property> properties = getEvent().getProperties(); for (Property exdate : properties.getProperties(Property.EXDATE)) { properties.remove(exdate); } if (dates.isEmpty()) { return; } ExDate exDate = new ExDate(dates); setDateListPropertyValue(exDate); properties.add(exDate); }
Example 4
Source File: ICalConverter.java From scipio-erp with Apache License 2.0 | 5 votes |
protected static void loadRelatedParties(List<GenericValue> relatedParties, PropertyList<Property> componentProps, Map<String, Object> context) { PropertyList<Property> attendees = componentProps.getProperties("ATTENDEE"); for (GenericValue partyValue : relatedParties) { if ("CAL_ORGANIZER~CAL_OWNER".contains(partyValue.getString("roleTypeId"))) { // RFC 2445 4.6.1, 4.6.2, and 4.6.3 ORGANIZER can appear only once replaceProperty(componentProps, createOrganizer(partyValue, context)); } else { String partyId = partyValue.getString("partyId"); boolean newAttendee = true; // SCIPIO: cast not necessary //Attendee attendee = null; //Iterator<Attendee> i = UtilGenerics.cast(attendees.iterator()); Property attendee = null; Iterator<Property> i = attendees.iterator(); while (i.hasNext()) { attendee = i.next(); Parameter xParameter = attendee.getParameter(partyIdXParamName); if (xParameter != null && partyId.equals(xParameter.getValue())) { loadPartyAssignment(attendee, partyValue, context); newAttendee = false; break; } } if (newAttendee) { attendee = createAttendee(partyValue, context); componentProps.add(attendee); } } } }
Example 5
Source File: HibBaseEventStamp.java From cosmo with Apache License 2.0 | 5 votes |
public void setRecurrenceRules(List<Recur> recurs) { if (recurs == null) { return; } PropertyList<Property> properties = getEvent().getProperties(); for (Property rrule : properties.getProperties(Property.RRULE)) { properties.remove(rrule); } for (Recur recur : recurs) { properties.add(new RRule(recur)); } }
Example 6
Source File: HibBaseEventStamp.java From cosmo with Apache License 2.0 | 5 votes |
public void setExceptionRules(List<Recur> recurs) { if (recurs == null) { return; } PropertyList<Property> properties = getEvent().getProperties(); for (Property exrule : properties.getProperties(Property.EXRULE)) { properties.remove(exrule); } for (Recur recur : recurs) { properties.add(new ExRule(recur)); } }
Example 7
Source File: MockBaseEventStamp.java From cosmo with Apache License 2.0 | 5 votes |
/** * Sets recurrence rules. * @param recurs List with recurrence rules. */ public void setRecurrenceRules(List<Recur> recurs) { if (recurs == null) { return; } PropertyList<Property> pl = getEvent().getProperties(); for (Property rrule : pl.getProperties(Property.RRULE)) { pl.remove(rrule); } for (Recur recur : recurs) { pl.add(new RRule(recur)); } }
Example 8
Source File: MockBaseEventStamp.java From cosmo with Apache License 2.0 | 5 votes |
/** * Sets exception rules. * @param recurs The list. */ public void setExceptionRules(List<Recur> recurs) { if (recurs == null) { return; } PropertyList<Property> pl = getEvent().getProperties(); for (Property exrule : pl.getProperties(Property.EXRULE)) { pl.remove(exrule); } for (Recur recur : recurs) { pl.add(new ExRule(recur)); } }