ALF-9156 More on the Calendar code, including improved dates for the get webscript

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28847 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2011-07-07 12:00:50 +00:00
parent 0138ee4a45
commit 6fdc7bb79f
4 changed files with 37 additions and 4 deletions

View File

@@ -80,6 +80,7 @@ public class CalendarEntryImpl extends CalendarEntryDTO
properties.put(CalendarModel.PROP_RECURRENCE_LAST_MEETING, entry.getLastRecurrence()); properties.put(CalendarModel.PROP_RECURRENCE_LAST_MEETING, entry.getLastRecurrence());
properties.put(CalendarModel.PROP_IS_OUTLOOK, entry.isOutlook()); properties.put(CalendarModel.PROP_IS_OUTLOOK, entry.isOutlook());
properties.put(CalendarModel.PROP_OUTLOOK_UID, entry.getOutlookUID()); properties.put(CalendarModel.PROP_OUTLOOK_UID, entry.getOutlookUID());
properties.put(CalendarModel.PROP_DOC_FOLDER, entry.getSharePointDocFolder());
// properties.put(CalendarModel.PROP_COLOR, entry.getColor(); // 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.setEnd((Date)properties.get(CalendarModel.PROP_TO_DATE));
entry.setRecurrenceRule((String)properties.get(CalendarModel.PROP_RECURRENCE_RULE)); entry.setRecurrenceRule((String)properties.get(CalendarModel.PROP_RECURRENCE_RULE));
entry.setLastRecurrence((Date)properties.get(CalendarModel.PROP_RECURRENCE_LAST_MEETING)); 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); Boolean isOutlook = (Boolean)properties.get(CalendarModel.PROP_IS_OUTLOOK);
entry.setOutlook(isOutlook == null ? false : isOutlook); entry.setOutlook(isOutlook == null ? false : isOutlook);

View File

@@ -48,4 +48,8 @@ public interface CalendarModel
/** Ignored Event */ /** Ignored Event */
public static final QName TYPE_IGNORE_EVENT = QName.createQName(CALENDAR_MODEL_URL, "ignoreEvent"); 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"); 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");
} }

View File

@@ -136,7 +136,17 @@ public interface CalendarEntry extends Serializable, PermissionCheckValue {
*/ */
void setOutlookUID(String outlookUID); 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 * @return the Tags associated with the event

View File

@@ -43,6 +43,7 @@ public class CalendarEntryDTO implements CalendarEntry, Serializable {
private Date end; private Date end;
private String recurrenceRule; private String recurrenceRule;
private Date lastRecurrence; private Date lastRecurrence;
private String sharePointDocFolder;
private boolean isOutlook = false; private boolean isOutlook = false;
private String outlookUID; private String outlookUID;
private List<String> tags = new ArrayList<String>(); private List<String> tags = new ArrayList<String>();
@@ -229,6 +230,24 @@ public class CalendarEntryDTO implements CalendarEntry, Serializable {
this.outlookUID = outlookUID; 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 * @return the Tags associated with the event
*/ */
@@ -237,8 +256,6 @@ public class CalendarEntryDTO implements CalendarEntry, Serializable {
return tags; return tags;
} }
// TODO Doc folder
/** /**
* Does the given {@link CalendarEntry} define an all-day * Does the given {@link CalendarEntry} define an all-day
* event? * event?