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 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

      boolean matches(CmsJsonHandlerContext context)
      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