Class NewsCreatedEventType
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.projects.ProjectsEventType
org.ametys.plugins.workspaces.events.projects.NewsCreatedEventType
- All Implemented Interfaces:
EventType
,LogEnabled
,PluginAware
,Configurable
,Serviceable
EventType
implementation for the news creation-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for content's idstatic final String
Constant for content's summarystatic final String
Constant for content's typeFields inherited from class org.ametys.plugins.workspaces.events.projects.ProjectsEventType
EVENT_CATEGORY_PROJECTS
Fields inherited from class org.ametys.plugins.workspaces.events.WorkspacesEventType
_projectManager, _resolver, EVENT_PROJECT_CATEGORY_PROPERTY, EVENT_PROJECT_NAME_PROPERTY, EVENT_PROJECT_TITLE_PROPERTY
Fields inherited from class org.ametys.plugins.repository.events.DefaultEventType
_currentUserProvider, _userHelper
Fields inherited from interface org.ametys.plugins.repository.events.EventType
EVENT_AUTHOR, EVENT_DATE, EVENT_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionevent2JSON
(Node eventNode) Format an event node to JSONboolean
Determines if two events can be mergedvoid
service
(ServiceManager serviceManager) protected void
storeAdditionalEventData
(Node eventNode, Map<String, Object> parameters) Store additional data on eventstoreEvent
(String eventId, Map<String, Object> parameters, EventHolder eventHolder) Store an event with the given event id under the given event holder nodeMethods inherited from class org.ametys.plugins.repository.events.DefaultEventType
_getAuthor, configure, getSupportedTypes, mergeEvents, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
EVENT_NEWS_SUMMARY_PROPERTY
Constant for content's summary- See Also:
-
EVENT_NEWS_ID_PROPERTY
Constant for content's id- See Also:
-
EVENT_NEWS_TYPE_PROPERTY
Constant for content's type- See Also:
-
-
Constructor Details
-
NewsCreatedEventType
public NewsCreatedEventType()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classWorkspacesEventType
- Throws:
ServiceException
-
storeEvent
public Node storeEvent(String eventId, Map<String, Object> parameters, EventHolder eventHolder) throws RepositoryExceptionDescription copied from interface:EventType
Store an event with the given event id under the given event holder node- Specified by:
storeEvent
in interfaceEventType
- Overrides:
storeEvent
in classDefaultEventType
- Parameters:
eventId
- the id of the event to storeparameters
- the event parameterseventHolder
- the event holder- Returns:
- the stored node
- Throws:
RepositoryException
- if an error occurs while manipulating the repository
-
storeAdditionalEventData
protected void storeAdditionalEventData(Node eventNode, Map<String, Object> parameters) throws RepositoryExceptionDescription copied from class:DefaultEventType
Store additional data on event- Overrides:
storeAdditionalEventData
in classProjectsEventType
- Parameters:
eventNode
- The event nodeparameters
- The event's parameters- Throws:
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:
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 classWorkspacesEventType
- Parameters:
event1
- The first eventevent2
- The second event- Returns:
- true if the events can be merged
-