Class UpdatePageOnContentValidatedObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.events.AbstractWorkspacesEventsObserver
org.ametys.plugins.workspaces.events.UpdatePageOnContentValidatedObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Contextualizable
,Serviceable
public class UpdatePageOnContentValidatedObserver
extends AbstractWorkspacesEventsObserver
implements Contextualizable
Observer for storing event on page updated
-
Field Summary
Fields inherited from class org.ametys.plugins.workspaces.events.AbstractWorkspacesEventsObserver
_eventTypeExtensionPoint, NODE_ID_EVENT_TRANSIENT_VAR
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) void
Observes an event.void
service
(ServiceManager serviceManager) protected void
Store the eventboolean
Checks if the event is supported.Methods inherited from class org.ametys.plugins.workspaces.events.AbstractWorkspacesEventsObserver
getEventParameters, getPriority, getProject
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
UpdatePageOnContentValidatedObserver
public UpdatePageOnContentValidatedObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractWorkspacesEventsObserver
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
supports
Description copied from interface:Observer
Checks if the event is supported. If true, the observe(Event) method will be called. -
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.
-
storeEvent
protected void storeEvent(Event event, Project project, Map<String, Object> transientVars) throws RepositoryExceptionStore the event- Overrides:
storeEvent
in classAbstractWorkspacesEventsObserver
- Parameters:
event
- The eventproject
- The project. Can be nulltransientVars
- If future events needs the created node id, it is stored in the transientVars- Throws:
RepositoryException
- if failed to store event
-