public abstract class AbstractBlogObserver extends AbstractLogEnabled implements Observer, Contextualizable, Serviceable
Observer for observing event on blog| Modifier and Type | Field and Description |
|---|---|
protected BlogPageHandler |
_blogRootPageHandler
The blog cache manager
|
protected Context |
_context
The context.
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
protected SolrIndexer |
_solrIndexer
The solr indexer
|
protected SolrPageIndexer |
_solrPageIndexer
The solr page indexer.
|
MAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
AbstractBlogObserver() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
_internalObserve(Event event,
Page postPage,
WebContent postContent)
Do the actual work.
|
void |
contextualize(Context context) |
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager smanager) |
getLogger, setLoggerprotected BlogPageHandler _blogRootPageHandler
protected AmetysObjectResolver _resolver
protected SolrPageIndexer _solrPageIndexer
protected SolrIndexer _solrIndexer
public AbstractBlogObserver()
public void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void service(ServiceManager smanager) throws ServiceException
service in interface ServiceableServiceExceptionpublic int getPriority(Event event)
ObservergetPriority in interface Observerevent - the event.public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observerobserve in interface Observerevent - the event.transientVars - transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception - if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.protected abstract void _internalObserve(Event event, Page postPage, WebContent postContent)
event - the observation event.postPage - the Page holding the virtual factory.postContent - the post content