Class WorkspacesActivityObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.activities.WorkspacesActivityObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
Observer
implementation for workspaces' activities-
Field Summary
Modifier and TypeFieldDescriptionprotected ActivityTypeExtensionPoint
Event type extension pointprotected NotificationPreferencesHelper
the notification preference helperprotected ProjectManager
the project managerprotected AmetysObjectResolver
the ametys object resolverstatic 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 TypeMethodDescriptiongetActivityParameters
(Event event, Project project) Get the activity's parametersint
getPriority
(Event event) Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.void
Observes an event.void
service
(ServiceManager serviceManager) boolean
Checks if the event is supported.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ACTIVITY_ID_TRANSIENT_VAR
Node id stored as a transient var- See Also:
-
_activityTypeExtensionPoint
Event type extension point -
_resolver
the ametys object resolver -
_notificationPreferenceHelper
the notification preference helper -
_projectManager
the project manager
-
-
Constructor Details
-
WorkspacesActivityObserver
public WorkspacesActivityObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
supports
Description copied from interface:Observer
Checks if the event is supported. If true, the observe(Event) method will be called. -
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.
-
observe
Description copied from interface:Observer
Observes an event.- Specified by:
observe
in interfaceObserver
- Parameters:
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event. This may allow optimizations between observers.- Throws:
Exception
- if an error occurs. All exceptions will be logged but not propagated, as the observation mechanism should never fail.
-
getActivityParameters
Get the activity's parameters- Parameters:
event
- The event use to create the activityproject
- The project. Can not be null- Returns:
- The event's parameters
-