Class AbstractConvertMinisiteEventObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.events.AbstractConvertMinisiteEventObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
- Direct Known Subclasses:
ConvertContentValidatedEvent2MinisitePageEventObserver
,ConvertPageEvent2MinisitePageEventObserver
public abstract class AbstractConvertMinisiteEventObserver
extends AbstractLogEnabled
implements Observer, Serviceable
Abstract observer for events which have to be convert to minisite page event
-
Field Summary
Modifier and TypeFieldDescriptionprotected ObservationManager
The observation managerprotected ProjectManager
The project managerFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getPriority
(Event event) Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.protected boolean
isMinisitePage
(Project project, PagesContainer page) Determines if the page is part of minisite project module (root page excluded)void
service
(ServiceManager serviceManager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_projectManager
The project manager -
_observationManager
The observation manager
-
-
Constructor Details
-
AbstractConvertMinisiteEventObserver
public AbstractConvertMinisiteEventObserver()
-
-
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.
-
isMinisitePage
Determines if the page is part of minisite project module (root page excluded)- Parameters:
project
- the project. Can not be nullpage
- the page- Returns:
- true if the page is a page of minisite
-