public class CalendarEventCreatedOrUpdatedEventType extends CalendarsEventType implements Contextualizable
EventType
implementation for the creation of a calendar eventModifier and Type | Field and Description |
---|---|
private CalendarWorkspaceModule |
_calendarModule |
private Context |
_context |
static String |
EVENT_CALENDAR_EVENT_ID_PROPERTY
Constant for calendar event's id
|
static String |
EVENT_CALENDAR_EVENT_TITLE_PROPERTY
Constant for calendar event's title
|
EVENT_CALENDAR_ID_PROPERTY, EVENT_CALENDAR_TITLE_PROPERTY, EVENT_CATEGORY_CALENDARS
_projectManager, EVENT_PROJECT_CATEGORY_PROPERTY, EVENT_PROJECT_NAME_PROPERTY, EVENT_PROJECT_TITLE_PROPERTY
_currentUserProvider, _userHelper
EVENT_AUTHOR, EVENT_DATE, EVENT_TYPE
Constructor and Description |
---|
CalendarEventCreatedOrUpdatedEventType() |
Modifier and Type | Method and Description |
---|---|
void |
contextualize(Context context) |
Map<String,Object> |
event2JSON(Node eventNode)
Format an event node to JSON
|
boolean |
isMergeable(Map<String,Object> event1,
Map<String,Object> event2)
Determines if two events can be merged
|
Map<String,Object> |
mergeEvents(List<Map<String,Object>> events)
Merge events into one event.
|
void |
service(ServiceManager serviceManager) |
protected void |
storeAdditionalEventData(Node eventNode,
Map<String,Object> parameters)
Store additional data on event
|
_getAuthor, configure, getSupportedTypes, setPluginInfo, storeEvent
getLogger, setLogger
public static final String EVENT_CALENDAR_EVENT_TITLE_PROPERTY
public static final String EVENT_CALENDAR_EVENT_ID_PROPERTY
private CalendarWorkspaceModule _calendarModule
public CalendarEventCreatedOrUpdatedEventType()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class WorkspacesEventType
ServiceException
protected void storeAdditionalEventData(Node eventNode, Map<String,Object> parameters) throws RepositoryException
DefaultEventType
storeAdditionalEventData
in class CalendarsEventType
eventNode
- The event nodeparameters
- The event's parametersRepositoryException
- if an error occurredpublic Map<String,Object> event2JSON(Node eventNode) throws RepositoryException
EventType
event2JSON
in interface EventType
event2JSON
in class WorkspacesEventType
eventNode
- the node of an eventRepositoryException
- if an error occurs while manipulating the repositorypublic boolean isMergeable(Map<String,Object> event1, Map<String,Object> event2)
EventType
isMergeable
in interface EventType
isMergeable
in class WorkspacesEventType
event1
- The first eventevent2
- The second eventpublic Map<String,Object> mergeEvents(List<Map<String,Object>> events)
EventType
mergeEvents
in interface EventType
mergeEvents
in class DefaultEventType
events
- The events to merge