public abstract class AbstractUserObserver extends AbstractLogEnabled implements Observer, Serviceable, Contextualizable
Observer for observing validation of User content.| Modifier and Type | Field and Description |
|---|---|
protected Context |
_cocoonContext
Cocoon context.
|
protected ContentTypesHelper |
_contentTypeHelper
The content type helper
|
protected Context |
_context
The context.
|
protected AmetysObjectResolver |
_resolver
Ametys object resolver.
|
MAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
AbstractUserObserver() |
| Modifier and Type | Method and Description |
|---|---|
protected Content |
_getTarget(Event event)
Retrieve the target of the observer
|
protected Content |
_getUserContent(Event event)
Get the target user content
|
protected AmetysObjectIterable<Page> |
_getUserDirectoryRootPages()
Get the user directory root pages
|
protected abstract void |
_internalObserve(Event event,
Page rootUsersPage,
Content userContent)
Do the actual work.
|
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
public AbstractUserObserver()
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> _getUserDirectoryRootPages()
protected Content _getTarget(Event event) throws Exception
event - The eventException - if failed to get contentprotected Content _getUserContent(Event event) throws Exception
event - the eventException - if failed to get content