Package org.ametys.web.synchronization
Class AbstractSynchronizePageObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.synchronization.AbstractSynchronizeObserver
-
- org.ametys.web.synchronization.AbstractSynchronizePageObserver
-
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
- Direct Known Subclasses:
SynchronizePageChangeObserver
,SynchronizePageDataUpdateObserver
,SynchronizePageRenameObserver
,SynchronizeServiceModificationObserver
public abstract class AbstractSynchronizePageObserver extends AbstractSynchronizeObserver
AbstractSynchronizeObserver
for observing a page event.
-
-
Field Summary
Fields Modifier and Type Field Description protected SkinsManager
_skinsManager
theSkinsManager
-
Fields inherited from class org.ametys.web.synchronization.AbstractSynchronizeObserver
_liveAccessManager, _repository, _synchronizeComponent
-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractSynchronizePageObserver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
_internalObserve(Event event, Session liveSession)
Observes the event with access to the live workspace.protected abstract void
_internalObservePage(Event event, Page target, Skin skin, Session liveSession)
Observes the page event with access to the workspace live.protected abstract boolean
_internalSupport(Event event, Page target)
Checks if the page event is supported.void
service(ServiceManager manager)
boolean
supports(Event event)
Checks if the event is supported.-
Methods inherited from class org.ametys.web.synchronization.AbstractSynchronizeObserver
getPriority, observe
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_skinsManager
protected SkinsManager _skinsManager
theSkinsManager
-
-
Constructor Detail
-
AbstractSynchronizePageObserver
public AbstractSynchronizePageObserver()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSynchronizeObserver
- Throws:
ServiceException
-
supports
public boolean supports(Event event)
Description copied from interface:Observer
Checks if the event is supported. If true, the observe(Event) method will be called.- Parameters:
event
- the event.- Returns:
true
for observing this event,false
otherwise.
-
_internalSupport
protected abstract boolean _internalSupport(Event event, Page target)
Checks if the page event is supported.- Parameters:
event
- the event.target
- the page target.- Returns:
true
for observing this event,false
otherwise.
-
_internalObserve
protected void _internalObserve(Event event, Session liveSession) throws RepositoryException
Description copied from class:AbstractSynchronizeObserver
Observes the event with access to the live workspace.- Specified by:
_internalObserve
in classAbstractSynchronizeObserver
- Parameters:
event
- the event.liveSession
- the session to the live workspace.- Throws:
RepositoryException
- if an error occurs.
-
_internalObservePage
protected abstract void _internalObservePage(Event event, Page target, Skin skin, Session liveSession) throws RepositoryException
Observes the page event with access to the workspace live.- Parameters:
event
- the event.target
- the page target.skin
- the skin of the page's site.liveSession
- the session to the workspace live.- Throws:
RepositoryException
- if an error occurs.
-
-