Package org.ametys.web.synchronization
Class SynchronizeContentCommentedObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.synchronization.AbstractSynchronizeObserver
-
- org.ametys.web.synchronization.SynchronizeContentCommentedObserver
-
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
public class SynchronizeContentCommentedObserver extends AbstractSynchronizeObserver
When a comment (validated) is modifier, synchronize it
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_ametysObjectResolver
Ametys object resolver.-
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 SynchronizeContentCommentedObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Node
_getCommentNode(Node unversionedMetadata, String commentId)
Get the node of the comment idprotected void
_internalObserve(Event event, Session liveSession)
Observes the event with access to the live workspace.protected void
_synchronizeContentComment(Event event, Session liveSession)
Synchronize content commentprotected void
_synchronizeDeletedContentComment(Event event, Session liveSession)
Synchronize deleted content commentvoid
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
-
_ametysObjectResolver
protected AmetysObjectResolver _ametysObjectResolver
Ametys object resolver.
-
-
Constructor Detail
-
SynchronizeContentCommentedObserver
public SynchronizeContentCommentedObserver()
-
-
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.
-
_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.
-
_synchronizeDeletedContentComment
protected void _synchronizeDeletedContentComment(Event event, Session liveSession) throws RepositoryException
Synchronize deleted content comment- Parameters:
event
- the eventliveSession
- the live session- Throws:
RepositoryException
- if an error occurred
-
_synchronizeContentComment
protected void _synchronizeContentComment(Event event, Session liveSession) throws RepositoryException
Synchronize content comment- Parameters:
event
- the eventliveSession
- the live session- Throws:
RepositoryException
- if an error occurred
-
_getCommentNode
protected Node _getCommentNode(Node unversionedMetadata, String commentId) throws PathNotFoundException, RepositoryException
Get the node of the comment id- Parameters:
unversionedMetadata
- the unversioned metadatacommentId
- the comment id- Returns:
- the node of the comment id
- Throws:
PathNotFoundException
- if an error occurredRepositoryException
- if an error occurred
-
-