Package org.opencms.xml.xml2json.handler
Interface I_CmsJsonHandler
- All Known Implementing Classes:
CmsExceptionSafeHandlerWrapper,CmsJsonHandlerContainerPage,CmsJsonHandlerFolder,CmsJsonHandlerJsp,CmsJsonHandlerList,CmsJsonHandlerOnlineCachingWrapper,CmsJsonHandlerResource,CmsJsonHandlerXmlContent
public interface I_CmsJsonHandler
Interface for individual JSON handlers.
The CmsJsonResourceHandler delegates the actual work of producing the JSON to a number of sub-handlers, e.g. one for XML contents, one for folders, etc. This is the base interface for these sub-handlers. Handlers are explicitly sorted by their order, and then the first matching handler is selected.
-
Method Summary
Modifier and TypeMethodDescriptiondoublegetOrder()Gets the sort order for this handler.booleanmatches(CmsJsonHandlerContext context) Returns true if the handler matches the given context.renderJson(CmsJsonHandlerContext context) Renders the JSON.
-
Method Details
-
getOrder
double getOrder()Gets the sort order for this handler.Handlers are sorted by ascending order, and the first matching handler is selected.
- Returns:
- the sort order
-
matches
Returns true if the handler matches the given context.- Parameters:
context- the context- Returns:
- true if the handler matches
-
renderJson
Renders the JSON.- Parameters:
context- the context (provides information about the path and resource)- Returns:
- the JSON result
-