Class ThreadsEventType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.events.DefaultEventType
org.ametys.plugins.workspaces.events.WorkspacesEventType
org.ametys.plugins.workspaces.events.threads.ThreadsEventType
- All Implemented Interfaces:
EventType
,LogEnabled
,PluginAware
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
PostCreatedEventType
,ThreadCreatedEventType
EventType
implementation for threads-related events-
Field Summary
Modifier and TypeFieldDescriptionprotected Context
avalon contextprotected ThreadWorkspaceModule
Thread Workspace Modulestatic final String
Constant for event's categorystatic final String
Constant for thread's titlestatic final String
Constant for thread's titleFields inherited from class org.ametys.plugins.workspaces.events.WorkspacesEventType
_projectManager, _resolver, EVENT_PROJECT_CATEGORY_PROPERTY, EVENT_PROJECT_NAME_PROPERTY, EVENT_PROJECT_TITLE_PROPERTY, PROJECT_ACCESS, PROJECT_CATEGORY, PROJECT_NAME, PROJECT_TITLE, PROJECT_URL
Fields inherited from class org.ametys.plugins.repository.events.DefaultEventType
_currentUserProvider, _userHelper, AUTHOR, DATE, NAME, TYPE
Fields inherited from interface org.ametys.plugins.repository.events.EventType
EVENT_AUTHOR, EVENT_DATE, EVENT_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) event2JSON
(javax.jcr.Node eventNode) Format an event node to JSONboolean
Determines if two events can be mergedmergeEvents
(List<Map<String, Object>> events) Merge events into one event.void
service
(ServiceManager serviceManager) protected void
storeAdditionalEventData
(javax.jcr.Node eventNode, Map<String, Object> parameters) Store additional data on eventMethods inherited from class org.ametys.plugins.repository.events.DefaultEventType
_getAuthor, configure, getSupportedTypes, setPluginInfo, storeEvent
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
EVENT_CATEGORY_THREADS
Constant for event's category- See Also:
-
EVENT_THREAD_TITLE_PROPERTY
Constant for thread's title- See Also:
-
EVENT_THREAD_ID_PROPERTY
Constant for thread's title- See Also:
-
_threadModule
Thread Workspace Module -
_context
avalon context
-
-
Constructor Details
-
ThreadsEventType
public ThreadsEventType()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classWorkspacesEventType
- Throws:
ServiceException
-
storeAdditionalEventData
protected void storeAdditionalEventData(javax.jcr.Node eventNode, Map<String, Object> parameters) throws javax.jcr.RepositoryExceptionDescription copied from class:DefaultEventType
Store additional data on event- Overrides:
storeAdditionalEventData
in classWorkspacesEventType
- Parameters:
eventNode
- The event nodeparameters
- The event's parameters- Throws:
javax.jcr.RepositoryException
- if an error occurred
-
event2JSON
Description copied from interface:EventType
Format an event node to JSON- Specified by:
event2JSON
in interfaceEventType
- Overrides:
event2JSON
in classWorkspacesEventType
- Parameters:
eventNode
- the node of an event- Returns:
- the JSON for the node
- Throws:
javax.jcr.RepositoryException
- if an error occurs while manipulating the repository
-
mergeEvents
Description copied from interface:EventType
Merge events into one event. Be careful : be sure that the events can be merged calling isMergeable method before- Specified by:
mergeEvents
in interfaceEventType
- Overrides:
mergeEvents
in classDefaultEventType
- Parameters:
events
- The events to merge- Returns:
- Merged event
-
isMergeable
Description copied from interface:EventType
Determines if two events can be merged- Specified by:
isMergeable
in interfaceEventType
- Overrides:
isMergeable
in classWorkspacesEventType
- Parameters:
event1
- The first eventevent2
- The second event- Returns:
- true if the events can be merged
-