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 Modifier and Type Field Description private Context_contextprivate CurrentUserProvider_currentUserProviderprivate ObservationManager_observationManagerprivate ProjectManager_projectManager- 
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
Constructors Constructor Description UpdatePageOnContentValidatedObserver() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Project_getProject()private void_updateContentPage(Content content, Project project)voidcontextualize(Context context)voidobserve(Event event, Map<String,Object> transientVars)Observes an event.voidservice(ServiceManager serviceManager)protected voidstoreEvent(Event event, Project project, Map<String,Object> transientVars)Store the eventbooleansupports(Event event)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 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_projectManager
private ProjectManager _projectManager
 
- 
_observationManager
private ObservationManager _observationManager
 
- 
_currentUserProvider
private CurrentUserProvider _currentUserProvider
 
 - 
 
- 
Constructor Detail
- 
UpdatePageOnContentValidatedObserver
public UpdatePageOnContentValidatedObserver()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classAbstractWorkspacesEventsObserver- Throws:
 ServiceException
 
- 
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
 contextualizein interfaceContextualizable- Throws:
 ContextException
 
- 
supports
public boolean supports(Event event)
Description copied from interface:ObserverChecks if the event is supported. If true, the observe(Event) method will be called. 
- 
observe
public void observe(Event event, Map<String,Object> transientVars) throws Exception
Description copied from interface:ObserverObserves an event.- Specified by:
 observein 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.
 
- 
_updateContentPage
private void _updateContentPage(Content content, Project project)
 
- 
_getProject
private Project _getProject()
 
- 
storeEvent
protected void storeEvent(Event event, Project project, Map<String,Object> transientVars) throws RepositoryException
Store the event- Overrides:
 storeEventin 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
 
 - 
 
 -