public class InvalidateCacheOnContentValidationOrUnpublishingObserver extends AbstractODFObserver
Observer
for observing content validation or tagging in order to
invalidate cache on front-office.Modifier and Type | Field and Description |
---|---|
protected CacheInvalidationPolicy |
_cachePolicy
Cache invalidation policy
|
_cocoonContext, _context, _odfHelper, _resolver
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
InvalidateCacheOnContentValidationOrUnpublishingObserver() |
Modifier and Type | Method and Description |
---|---|
protected void |
_internalObserve(Event event,
Map<String,Object> transientVars,
Page odfRootPage,
Set<Program> rootPrograms,
SubProgram subProgram,
Course course)
Do the actual work.
|
private void |
_invalidate(Site site,
Content content) |
protected String |
_workspaceToUse()
The workspace to use.
|
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
service(ServiceManager serviceManager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
_getContentArgument, _getCourse, _getODFRootPages, _getPrograms, _getSubProgram, contextualize, observe
getLogger, setLogger
protected CacheInvalidationPolicy _cachePolicy
public InvalidateCacheOnContentValidationOrUnpublishingObserver()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class AbstractODFObserver
ServiceException
public boolean supports(Event event)
Observer
event
- the event.true
for observing this event, false
otherwise.public int getPriority(Event event)
Observer
event
- the event.protected String _workspaceToUse()
AbstractODFObserver
default
,
override this method to work on a different workspace_workspaceToUse
in class AbstractODFObserver
protected void _internalObserve(Event event, Map<String,Object> transientVars, Page odfRootPage, Set<Program> rootPrograms, SubProgram subProgram, Course course)
AbstractODFObserver
_internalObserve
in class AbstractODFObserver
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.odfRootPage
- the Page holding the virtual factory.rootPrograms
- the root programs.subProgram
- The subprogram. Can be nullcourse
- The course. Can be null.private void _invalidate(Site site, Content content)