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,Prioritizable,Supporter<Event>,Serviceable
When a comment (validated) is modifier, synchronize it
- 
Field Summary
FieldsFields inherited from class org.ametys.web.synchronization.AbstractSynchronizeObserver
_liveAccessManager, _repository, _synchronizeComponentFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected javax.jcr.Node_getCommentNode(javax.jcr.Node unversionedMetadata, String commentId) Get the node of the comment idprotected void_internalObserve(Event event, javax.jcr.Session liveSession) Observes the event with access to the live workspace.protected void_synchronizeContentComment(Event event, javax.jcr.Session liveSession) Synchronize content commentprotected void_synchronizeDeletedContentComment(Event event, javax.jcr.Session liveSession) Synchronize deleted content commentvoidservice(ServiceManager manager) booleanCheck if an element is supportedMethods inherited from class org.ametys.web.synchronization.AbstractSynchronizeObserver
getPriority, observeMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger 
- 
Field Details
- 
_ametysObjectResolver
Ametys object resolver. 
 - 
 - 
Constructor Details
- 
SynchronizeContentCommentedObserver
public SynchronizeContentCommentedObserver() 
 - 
 - 
Method Details
- 
service
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classAbstractSynchronizeObserver- Throws:
 ServiceException
 - 
supports
Description copied from interface:SupporterCheck if an element is supported- Parameters:
 event- The element- Returns:
 trueif the element is supported,falseotherwise
 - 
_internalObserve
protected void _internalObserve(Event event, javax.jcr.Session liveSession) throws javax.jcr.RepositoryException Description copied from class:AbstractSynchronizeObserverObserves the event with access to the live workspace.- Specified by:
 _internalObservein classAbstractSynchronizeObserver- Parameters:
 event- the event.liveSession- the session to the live workspace.- Throws:
 javax.jcr.RepositoryException- if an error occurs.
 - 
_synchronizeDeletedContentComment
protected void _synchronizeDeletedContentComment(Event event, javax.jcr.Session liveSession) throws javax.jcr.RepositoryException Synchronize deleted content comment- Parameters:
 event- the eventliveSession- the live session- Throws:
 javax.jcr.RepositoryException- if an error occurred
 - 
_synchronizeContentComment
protected void _synchronizeContentComment(Event event, javax.jcr.Session liveSession) throws javax.jcr.RepositoryException Synchronize content comment- Parameters:
 event- the eventliveSession- the live session- Throws:
 javax.jcr.RepositoryException- if an error occurred
 - 
_getCommentNode
protected javax.jcr.Node _getCommentNode(javax.jcr.Node unversionedMetadata, String commentId) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException Get the node of the comment id- Parameters:
 unversionedMetadata- the unversioned metadatacommentId- the comment id- Returns:
 - the node of the comment id
 - Throws:
 javax.jcr.PathNotFoundException- if an error occurredjavax.jcr.RepositoryException- if an error occurred
 
 -