public abstract class AbstractContentObserver extends AbstractLogEnabled implements Observer, Serviceable, Contextualizable
Observer for observing validation of User content.| Modifier and Type | Field and Description | 
|---|---|
| protected Context | _cocoonContextCocoon context. | 
| protected ContentTypesHelper | _contentTypeHelperThe content type helper | 
| protected Context | _contextThe context. | 
| protected OrganisationChartPageResolver | _organisationChartPageResolverThe resolver for ud orgunits pages | 
| protected AmetysObjectResolver | _resolverAmetys object resolver. | 
| protected UserDirectoryPageResolver | _userDirectoryPageResolverThe resolver for user directory pages | 
| protected PageElementCache | _zoneItemCacheThe page element cache | 
MAX_PRIORITY, MIN_PRIORITY| Constructor and Description | 
|---|
| AbstractContentObserver() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected AmetysObjectIterable<Page> | _getOrgUnitRootPages()Get the orgUnit root pages | 
| protected Content | _getTarget(Event event)Retrieve the target of the observer | 
| protected AmetysObjectIterable<Page> | _getUserRootPages()Get the user root pages | 
| protected abstract void | _internalObserve(Event event,
                Page rootUsersPage,
                Content userContent)Do the actual work. | 
| protected boolean | _isOrgUnitContent(Content content)Return true if the content is a orgUnit content | 
| protected boolean | _isUserContent(Content content)Return true if the content is a user content | 
| protected void | _removeZoneItemCache(Page rootPage,
                    Content content,
                    String workspace)Remove zone item cache | 
| void | contextualize(Context context) | 
| void | observe(Event event,
       Map<String,Object> transientVars)Observes an event. | 
| void | service(ServiceManager manager) | 
getLogger, setLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPriority, supportsprotected Context _cocoonContext
protected AmetysObjectResolver _resolver
protected ContentTypesHelper _contentTypeHelper
protected PageElementCache _zoneItemCache
protected UserDirectoryPageResolver _userDirectoryPageResolver
protected OrganisationChartPageResolver _organisationChartPageResolver
public AbstractContentObserver()
public void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void observe(Event event, Map<String,Object> transientVars)
Observerprotected abstract void _internalObserve(Event event, Page rootUsersPage, Content userContent)
event - the observation event.rootUsersPage - the page holding the virtual user pagesuserContent - a list containing all impacted user contents.protected AmetysObjectIterable<Page> _getUserRootPages()
protected AmetysObjectIterable<Page> _getOrgUnitRootPages()
protected Content _getTarget(Event event) throws Exception
event - The eventException - if failed to get contentprotected boolean _isUserContent(Content content)
content - the contentprotected boolean _isOrgUnitContent(Content content)
content - the contentprotected void _removeZoneItemCache(Page rootPage, Content content, String workspace)
rootPage - the root pagecontent - the contentworkspace - the workspace