Class AbstractWorkspacesEventsObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.events.AbstractWorkspacesEventsObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
- Direct Known Subclasses:
AddEventOnCalendarEventUpdatedObserver
,AddEventOnMemberAddedObserver
,AddEventOnMinisiteModificationObserver
,AddEventOnNewsPublishedObserver
,AddEventOnResourceUpdatedObserver
,AddEventOnTaskUpdatedObserver
,AddEventOnThreadUpdatedObserver
,AddEventOnWallContentAddedObserver
public abstract class AbstractWorkspacesEventsObserver
extends AbstractLogEnabled
implements Observer, Serviceable
Observer
implementation for workspaces' events-
Field Summary
Modifier and TypeFieldDescriptionprotected EventTypeExtensionPoint
Event type extension pointstatic final String
Node id stored as a transient varFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEventParameters
(Event event, Project project) Get the event's parametersint
getPriority
(Event event) Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.protected Project
Get the parent projectvoid
service
(ServiceManager serviceManager) protected void
Store the eventMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
NODE_ID_EVENT_TRANSIENT_VAR
Node id stored as a transient var- See Also:
-
_eventTypeExtensionPoint
Event type extension point
-
-
Constructor Details
-
AbstractWorkspacesEventsObserver
public AbstractWorkspacesEventsObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getPriority
Description copied from interface:Observer
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Specified by:
getPriority
in interfaceObserver
- Parameters:
event
- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
storeEvent
protected void storeEvent(Event event, Project project, Map<String, Object> transientVars) throws javax.jcr.RepositoryExceptionStore the event- Parameters:
event
- The eventproject
- The project. Can be nulltransientVars
- If future events needs the created node id, it is stored in the transientVars- Throws:
javax.jcr.RepositoryException
- if failed to store event
-
getEventParameters
Get the event's parameters- Parameters:
event
- The eventproject
- The project. Can not be null- Returns:
- The event's parameters
-
getProject
Get the parent project- Parameters:
ao
- The ametys object- Returns:
- The parent project or
null
if not found
-