public class OdfProgramListServiceCachePolicy extends AbstractLogEnabled implements Serviceable, PageElementCachePolicy
PageElementCachePolicy.PolicyResult
Modifier and Type | Field and Description |
---|---|
protected OdfPageHandler |
_odfRootPageHandler
The ODF root page handler.
|
private static Set<String> |
_TYPES |
Constructor and Description |
---|
OdfProgramListServiceCachePolicy() |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
_getRemovingCacheEventIds(String workspace)
Returns all event ids for which the cache should be removed.
|
Set<String> |
getPageElementTypes()
Returns the types of the associated page elements.
|
void |
service(ServiceManager manager) |
PageElementCachePolicy.PolicyResult |
shouldClearCache(String workspace,
Site site,
String pageElementType,
Event event)
First pass of event processing, at the type level.
Returning NEED_MORE_INFORMATION eventually leads to the second pass, which is more precise, and also depends on a particular element, but is more costly to compute. Returning null means that this policy declares itself as not concerned by the current event. |
PageElementCachePolicy.PolicyResult |
shouldClearCache(String workspace,
Site site,
String pageElementType,
String elementId,
Event event)
Second pass of event processing, at the Page level.
This method is only called if the first pass resulted with NEED_MORE_INFORMATION. |
getLogger, setLogger
protected OdfPageHandler _odfRootPageHandler
public OdfProgramListServiceCachePolicy()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Set<String> getPageElementTypes()
PageElementCachePolicy
getPageElementTypes
in interface PageElementCachePolicy
public final PageElementCachePolicy.PolicyResult shouldClearCache(String workspace, Site site, String pageElementType, Event event)
PageElementCachePolicy
shouldClearCache
in interface PageElementCachePolicy
workspace
- the current JCR workspace.site
- the current site.pageElementType
- the page element type.event
- the current event.public final PageElementCachePolicy.PolicyResult shouldClearCache(String workspace, Site site, String pageElementType, String elementId, Event event)
PageElementCachePolicy
shouldClearCache
in interface PageElementCachePolicy
workspace
- the current JCR workspace.site
- the current site.pageElementType
- the page element type.elementId
- the current element id.event
- the current event.protected List<String> _getRemovingCacheEventIds(String workspace)
workspace
- the current JCR workspace.