/** * Returns the parsed calendar recurrence rule * WARNING - Alfresco use only. Return type will likely shift to * a real object in the near future */ public static Map<String,String> extractRecurrenceRule(CalendarEntry entry) { return extractRecurrenceRule(entry.getRecurrenceRule()); }
/** * Returns the parsed calendar recurrence rule * WARNING - Alfresco use only. Return type will likely shift to * a real object in the near future */ public static Map<String,String> extractRecurrenceRule(CalendarEntry entry) { return extractRecurrenceRule(entry.getRecurrenceRule()); }
/** * Builds up the node properties for a given Calendar Entry * Doesn't handle tags, those must be done in the service itself. */ protected static Map<QName,Serializable> toNodeProperties(CalendarEntry entry) { Map<QName,Serializable> properties = new HashMap<QName, Serializable>(); properties.put(CalendarModel.PROP_WHAT, entry.getTitle()); properties.put(CalendarModel.PROP_DESCRIPTION, entry.getDescription()); properties.put(CalendarModel.PROP_WHERE, entry.getLocation()); properties.put(CalendarModel.PROP_FROM_DATE, entry.getStart()); properties.put(CalendarModel.PROP_TO_DATE, entry.getEnd()); properties.put(CalendarModel.PROP_RECURRENCE_RULE, entry.getRecurrenceRule()); properties.put(CalendarModel.PROP_RECURRENCE_LAST_MEETING, entry.getLastRecurrence()); properties.put(CalendarModel.PROP_IS_OUTLOOK, entry.isOutlook()); properties.put(CalendarModel.PROP_OUTLOOK_UID, entry.getOutlookUID()); properties.put(CalendarModel.PROP_DOC_FOLDER, entry.getSharePointDocFolder()); // properties.put(CalendarModel.PROP_COLOR, entry.getColor(); return properties; }
/** * Builds up the node properties for a given Calendar Entry * Doesn't handle tags, those must be done in the service itself. */ protected static Map<QName,Serializable> toNodeProperties(CalendarEntry entry) { Map<QName,Serializable> properties = new HashMap<QName, Serializable>(); properties.put(CalendarModel.PROP_WHAT, entry.getTitle()); properties.put(CalendarModel.PROP_DESCRIPTION, entry.getDescription()); properties.put(CalendarModel.PROP_WHERE, entry.getLocation()); properties.put(CalendarModel.PROP_FROM_DATE, entry.getStart()); properties.put(CalendarModel.PROP_TO_DATE, entry.getEnd()); properties.put(CalendarModel.PROP_RECURRENCE_RULE, entry.getRecurrenceRule()); properties.put(CalendarModel.PROP_RECURRENCE_LAST_MEETING, entry.getLastRecurrence()); properties.put(CalendarModel.PROP_IS_OUTLOOK, entry.isOutlook()); properties.put(CalendarModel.PROP_OUTLOOK_UID, entry.getOutlookUID()); properties.put(CalendarModel.PROP_DOC_FOLDER, entry.getSharePointDocFolder()); // properties.put(CalendarModel.PROP_COLOR, entry.getColor(); return properties; }
/** * For the given Calendar Entry, return its subsequent Recurrence on or after * the specified date, until the given limit. If it doesn't have any recurrences * on or after the start date (either no recurrence rules, or the last recurrence * date is before then), null will be returned. (The onOrAfter and until dates * are treat as inclusive) * If requested, can stop after the first hit * @return The next recurrence on or after the given date, or null if there aren't any */ public static List<Date> getRecurrencesOnOrAfter(CalendarEntry entry, Date onOrAfter, Date until, boolean firstOnly, Set<Date> ignoredDates) { return getRecurrencesOnOrAfter( entry.getRecurrenceRule(), entry.getStart(), entry.getEnd(), entry.getLastRecurrence(), onOrAfter, until, firstOnly, ignoredDates); }
/** * For the given Calendar Entry, return its subsequent Recurrence on or after * the specified date, until the given limit. If it doesn't have any recurrences * on or after the start date (either no recurrence rules, or the last recurrence * date is before then), null will be returned. (The onOrAfter and until dates * are treat as inclusive) * If requested, can stop after the first hit * @return The next recurrence on or after the given date, or null if there aren't any */ public static List<Date> getRecurrencesOnOrAfter(CalendarEntry entry, Date onOrAfter, Date until, boolean firstOnly, Set<Date> ignoredDates) { return getRecurrencesOnOrAfter( entry.getRecurrenceRule(), entry.getStart(), entry.getEnd(), entry.getLastRecurrence(), onOrAfter, until, firstOnly, ignoredDates); }
assertEquals(c3.getStart(), ISO8601DateFormat.parse(filtered.get(0).getFromDate(),utc)); assertEquals(c3.getEnd(), ISO8601DateFormat.parse(filtered.get(0).getToDate(),utc)); assertEquals(c3.getRecurrenceRule(), filtered.get(0).getRecurrenceRule()); assertEquals(null, filtered.get(0).getRecurrenceLastMeeting()); assertEquals(c1.getStart(), ISO8601DateFormat.parse(filtered.get(1).getFromDate(),utc)); assertEquals(c1.getEnd(), ISO8601DateFormat.parse(filtered.get(1).getToDate(),utc)); assertEquals(c1.getRecurrenceRule(), filtered.get(1).getRecurrenceRule()); assertEquals(null, filtered.get(1).getRecurrenceLastMeeting()); assertEquals(c2.getStart(), ISO8601DateFormat.parse(filtered.get(2).getFromDate(),utc)); assertEquals(c2.getEnd(), ISO8601DateFormat.parse(filtered.get(2).getToDate(),utc)); assertEquals(c2.getRecurrenceRule(), filtered.get(2).getRecurrenceRule()); assertEquals(null, filtered.get(2).getRecurrenceLastMeeting()); assertEquals(c3.getEnd(), ISO8601DateFormat.parse(filtered.get(0).getToDate(),utc)); assertEquals(c3.getLastRecurrence(), ISO8601DateFormat.parse(filtered.get(0).getRecurrenceLastMeeting(),utc)); assertEquals(c3.getRecurrenceRule(), filtered.get(0).getRecurrenceRule()); assertEquals(c1.getRecurrenceRule(), filtered.get(1).getRecurrenceRule()); assertEquals(null, filtered.get(1).getRecurrenceLastMeeting());
assertEquals(1, entry.getStart().getTime()); assertEquals(1234, entry.getEnd().getTime()); assertEquals(null, entry.getRecurrenceRule()); assertEquals(null, entry.getLastRecurrence()); assertEquals(true, entry.isOutlook()); assertEquals(1234567, entry.getStart().getTime()); assertEquals(1294567, entry.getEnd().getTime()); assertEquals("1w", entry.getRecurrenceRule()); assertEquals(1234567, entry.getLastRecurrence().getTime()); assertEquals(false, entry.isOutlook());
assertEquals(1, entry.getStart().getTime()); assertEquals(1234, entry.getEnd().getTime()); assertEquals(null, entry.getRecurrenceRule()); assertEquals(null, entry.getLastRecurrence()); assertEquals(true, entry.isOutlook()); assertEquals(1, entry.getStart().getTime()); assertEquals(1234, entry.getEnd().getTime()); assertEquals(null, entry.getRecurrenceRule()); assertEquals(null, entry.getLastRecurrence()); assertEquals(true, entry.isOutlook());