Package org.opencms.xml.xml2json.handler
Class CmsJsonHandlerOnlineCachingWrapper
java.lang.Object
org.opencms.xml.xml2json.handler.CmsJsonHandlerOnlineCachingWrapper
- All Implemented Interfaces:
I_CmsJsonHandler
Wrapper for JSON handlers that caches online project requests.
-
Constructor Summary
ConstructorDescriptionCmsJsonHandlerOnlineCachingWrapper
(I_CmsJsonHandler handler, String spec) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getOrder()
Gets the sort order for this handler.boolean
matches
(CmsJsonHandlerContext context) Returns true if the handler matches the given context.renderJson
(CmsJsonHandlerContext context) Renders the JSON.toString()
-
Constructor Details
-
CmsJsonHandlerOnlineCachingWrapper
Creates a new instance.- Parameters:
handler
- the handler to wrapspec
- the CacheBuilder specification to use for the cache
-
-
Method Details
-
getOrder
Description copied from interface:I_CmsJsonHandler
Gets the sort order for this handler.Handlers are sorted by ascending order, and the first matching handler is selected.
- Specified by:
getOrder
in interfaceI_CmsJsonHandler
- Returns:
- the sort order
- See Also:
-
matches
Description copied from interface:I_CmsJsonHandler
Returns true if the handler matches the given context.- Specified by:
matches
in interfaceI_CmsJsonHandler
- Parameters:
context
- the context- Returns:
- true if the handler matches
- See Also:
-
renderJson
Description copied from interface:I_CmsJsonHandler
Renders the JSON.- Specified by:
renderJson
in interfaceI_CmsJsonHandler
- Parameters:
context
- the context (provides information about the path and resource)- Returns:
- the JSON result
- See Also:
-
toString
-