Class WorkspacesEventType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.events.DefaultEventType
org.ametys.plugins.workspaces.events.WorkspacesEventType
- All Implemented Interfaces:
EventType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
CalendarsEventType
,DocumentsEventType
,MinisiteEventType
,ProjectsEventType
,TasksEventType
,ThreadsEventType
Class representing a generic event type for workspaces
-
Field Summary
Modifier and TypeFieldDescriptionprotected ProjectManager
The project managerprotected AmetysObjectResolver
Resolverstatic final String
Constant for event's categorystatic final String
Constant for project's name event propertiesstatic final String
Constant for project's title event propertiesstatic final String
Constant for project's access JSON key.static final String
Constant for project's category JSON key.static final String
Constant for project's name JSON key.static final String
Constant for project's title JSON key.static final String
Constant for project's url JSON key.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 TypeMethodDescriptionevent2JSON
(javax.jcr.Node eventNode) Format an event node to JSONboolean
Determines if two events can be mergedvoid
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, mergeEvents, setPluginInfo, storeEvent
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
EVENT_PROJECT_NAME_PROPERTY
Constant for project's name event properties- See Also:
-
EVENT_PROJECT_TITLE_PROPERTY
Constant for project's title event properties- See Also:
-
EVENT_PROJECT_CATEGORY_PROPERTY
Constant for event's category- See Also:
-
PROJECT_NAME
Constant for project's name JSON key. The value is aString
.- See Also:
-
PROJECT_TITLE
Constant for project's title JSON key. The value is aString
.- See Also:
-
PROJECT_ACCESS
Constant for project's access JSON key. The value is a boolean.- See Also:
-
PROJECT_URL
Constant for project's url JSON key. The value is aString
.- See Also:
-
PROJECT_CATEGORY
Constant for project's category JSON key. The value is aString
.- See Also:
-
_resolver
Resolver -
_projectManager
The project manager
-
-
Constructor Details
-
WorkspacesEventType
public WorkspacesEventType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classDefaultEventType
- 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 classDefaultEventType
- 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 classDefaultEventType
- 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
-
isMergeable
Description copied from interface:EventType
Determines if two events can be merged- Specified by:
isMergeable
in interfaceEventType
- Overrides:
isMergeable
in classDefaultEventType
- Parameters:
event1
- The first eventevent2
- The second event- Returns:
- true if the events can be merged
-