public class PostCreatedEventType extends ThreadsEventType
EventType
implementation for the addition of a postModifier and Type | Field and Description |
---|---|
private ThreadDAO |
_threadDAO |
static String |
EVENT_POST_MESSAGE_PROPERTY
Constant for post's message
|
_resolver, EVENT_CATEGORY_THREADS, EVENT_THREAD_ID_PROPERTY, EVENT_THREAD_TITLE_PROPERTY
_projectManager, EVENT_PROJECT_CATEGORY_PROPERTY, EVENT_PROJECT_NAME_PROPERTY, EVENT_PROJECT_TITLE_PROPERTY
_currentUserProvider, _userHelper
EVENT_AUTHOR, EVENT_DATE, EVENT_TYPE
Constructor and Description |
---|
PostCreatedEventType() |
Modifier and Type | Method and Description |
---|---|
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
|
void |
service(ServiceManager serviceManager) |
protected void |
storeAdditionalEventData(Node eventNode,
Map<String,Object> parameters)
Store additional data on event
|
contextualize, mergeEvents
_getAuthor, configure, getSupportedTypes, setPluginInfo, storeEvent
getLogger, setLogger
public static final String EVENT_POST_MESSAGE_PROPERTY
private ThreadDAO _threadDAO
public PostCreatedEventType()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ThreadsEventType
ServiceException
protected void storeAdditionalEventData(Node eventNode, Map<String,Object> parameters) throws RepositoryException
DefaultEventType
storeAdditionalEventData
in class ThreadsEventType
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 ThreadsEventType
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 ThreadsEventType
event1
- The first eventevent2
- The second event