diff --git a/source/java/org/alfresco/repo/calendar/CalendarEntryImpl.java b/source/java/org/alfresco/repo/calendar/CalendarEntryImpl.java index f9d8bac14e..a5e1a5ae66 100644 --- a/source/java/org/alfresco/repo/calendar/CalendarEntryImpl.java +++ b/source/java/org/alfresco/repo/calendar/CalendarEntryImpl.java @@ -80,6 +80,7 @@ public class CalendarEntryImpl extends CalendarEntryDTO 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(); @@ -100,6 +101,7 @@ public class CalendarEntryImpl extends CalendarEntryDTO entry.setEnd((Date)properties.get(CalendarModel.PROP_TO_DATE)); entry.setRecurrenceRule((String)properties.get(CalendarModel.PROP_RECURRENCE_RULE)); entry.setLastRecurrence((Date)properties.get(CalendarModel.PROP_RECURRENCE_LAST_MEETING)); + entry.setSharePointDocFolder((String)properties.get(CalendarModel.PROP_DOC_FOLDER)); Boolean isOutlook = (Boolean)properties.get(CalendarModel.PROP_IS_OUTLOOK); entry.setOutlook(isOutlook == null ? false : isOutlook); diff --git a/source/java/org/alfresco/repo/calendar/CalendarModel.java b/source/java/org/alfresco/repo/calendar/CalendarModel.java index 7b64015a85..516ea4c050 100644 --- a/source/java/org/alfresco/repo/calendar/CalendarModel.java +++ b/source/java/org/alfresco/repo/calendar/CalendarModel.java @@ -48,4 +48,8 @@ public interface CalendarModel /** Ignored Event */ public static final QName TYPE_IGNORE_EVENT = QName.createQName(CALENDAR_MODEL_URL, "ignoreEvent"); public static final QName PROP_IGNORE_EVENT_DATE = QName.createQName(CALENDAR_MODEL_URL, "date"); + + /** SharePoint Event */ + public static final QName ASPECT_DOC_FOLDERED = QName.createQName(CALENDAR_MODEL_URL, "docFoldered"); + public static final QName PROP_DOC_FOLDER = QName.createQName(CALENDAR_MODEL_URL, "docFolder"); } \ No newline at end of file diff --git a/source/java/org/alfresco/service/cmr/calendar/CalendarEntry.java b/source/java/org/alfresco/service/cmr/calendar/CalendarEntry.java index 3ba90c0cb2..7d8a9417c1 100644 --- a/source/java/org/alfresco/service/cmr/calendar/CalendarEntry.java +++ b/source/java/org/alfresco/service/cmr/calendar/CalendarEntry.java @@ -136,7 +136,17 @@ public interface CalendarEntry extends Serializable, PermissionCheckValue { */ void setOutlookUID(String outlookUID); - // TODO Doc folder + /** + * Gets the SharePoint "Doc Folder" for the event. + * Only used for SharePoint based events + */ + String getSharePointDocFolder(); + + /** + * Sets the SharePoint "Doc Folder" for the event. + * Only used for SharePoint based events + */ + void setSharePointDocFolder(String docFolder); /** * @return the Tags associated with the event diff --git a/source/java/org/alfresco/service/cmr/calendar/CalendarEntryDTO.java b/source/java/org/alfresco/service/cmr/calendar/CalendarEntryDTO.java index 0336a304d3..216a1f3461 100644 --- a/source/java/org/alfresco/service/cmr/calendar/CalendarEntryDTO.java +++ b/source/java/org/alfresco/service/cmr/calendar/CalendarEntryDTO.java @@ -43,6 +43,7 @@ public class CalendarEntryDTO implements CalendarEntry, Serializable { private Date end; private String recurrenceRule; private Date lastRecurrence; + private String sharePointDocFolder; private boolean isOutlook = false; private String outlookUID; private List tags = new ArrayList(); @@ -228,7 +229,25 @@ public class CalendarEntryDTO implements CalendarEntry, Serializable { { this.outlookUID = outlookUID; } - + + /** + * Gets the SharePoint "Doc Folder" for the event. + * Only used for SharePoint based events + */ + public String getSharePointDocFolder() + { + return sharePointDocFolder; + } + + /** + * Sets the SharePoint "Doc Folder" for the event. + * Only used for SharePoint based events + */ + public void setSharePointDocFolder(String docFolder) + { + this.sharePointDocFolder = docFolder; + } + /** * @return the Tags associated with the event */ @@ -237,8 +256,6 @@ public class CalendarEntryDTO implements CalendarEntry, Serializable { return tags; } - // TODO Doc folder - /** * Does the given {@link CalendarEntry} define an all-day * event?