public class OdfVirtualPagesCachePolicy extends AbstractLogEnabled implements Serviceable, PageElementCachePolicy
PageElementCachePolicy.PolicyResult
Modifier and Type | Field and Description |
---|---|
private static Set<String> |
_ODF_PE_TYPES |
protected OdfPageHandler |
_odfRootPageHandler
The ODF root page handler.
|
Constructor and Description |
---|
OdfVirtualPagesCachePolicy() |
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. |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private static final Set<String> _ODF_PE_TYPES
protected OdfPageHandler _odfRootPageHandler
public OdfVirtualPagesCachePolicy()
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.