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
Fields Modifier and Type Field Description protected ObservationManager
_observationManager
The observation managerprotected ProjectManager
_projectManager
The project manager-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractConvertMinisiteEventObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
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 Detail
-
_projectManager
protected ProjectManager _projectManager
The project manager
-
_observationManager
protected ObservationManager _observationManager
The observation manager
-
-
Constructor Detail
-
AbstractConvertMinisiteEventObserver
public AbstractConvertMinisiteEventObserver()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getPriority
public int getPriority(Event event)
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
protected boolean isMinisitePage(Project project, PagesContainer page)
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
-
-