ALF-10318 Update CalendarEntry to hold the created and modified at dates

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30601 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2011-09-19 12:56:01 +00:00
parent fb406b769b
commit eced94e231
5 changed files with 88 additions and 7 deletions

View File

@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.calendar.CalendarEntry;
import org.alfresco.service.cmr.calendar.CalendarEntryDTO;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -93,7 +94,7 @@ public class CalendarEntryImpl extends CalendarEntryDTO
properties.put(CalendarModel.PROP_DOC_FOLDER, entry.getSharePointDocFolder());
// properties.put(CalendarModel.PROP_COLOR, entry.getColor();
return properties;
}
@@ -117,6 +118,19 @@ public class CalendarEntryImpl extends CalendarEntryDTO
entry.setOutlookUID((String)properties.get(CalendarModel.PROP_OUTLOOK_UID));
//entry.setColor(properties.get(CalendarModel.PROP_COLOR));
// If the auditable properties are available and the type is correct, record them
if(entry instanceof CalendarEntryDTO)
{
if(properties.containsKey(ContentModel.PROP_CREATED))
{
((CalendarEntryDTO)entry).setCreatedAt((Date)properties.get(ContentModel.PROP_CREATED));
}
if(properties.containsKey(ContentModel.PROP_MODIFIED))
{
((CalendarEntryDTO)entry).setModifiedAt((Date)properties.get(ContentModel.PROP_MODIFIED));
}
}
}
/**