Class SiteContentStoreRestController

java.lang.Object
org.craftercms.core.controller.rest.RestControllerBase
org.craftercms.engine.controller.rest.SiteContentStoreRestController

@Validated @RestController @RequestMapping("${crafter.core.rest.base.uri}/site/content_store") public class SiteContentStoreRestController extends org.craftercms.core.controller.rest.RestControllerBase
REST controller to retrieve content from the site (items and trees). It's basically a wrapper for ContentStoreRestController that has already resolved the context automatically.
Author:
avasquez
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.craftercms.core.controller.rest.RestControllerBase

    MESSAGE_MODEL_ATTRIBUTE_NAME, REST_BASE_URI
  • Constructor Summary

    Constructors
    Constructor
    Description
    SiteContentStoreRestController(org.craftercms.core.controller.rest.ContentStoreRestController wrappedController)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.craftercms.core.service.Item>
    getChildren(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, String url, boolean flatten)
     
    protected String
     
    org.dom4j.Document
    getDescriptor(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @Size(max=4000) String url, boolean flatten)
    Deprecated.
    Will be removed in 4.1, use getItem instead
    org.craftercms.core.service.Item
    getItem(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, String url, boolean flatten)
     
    org.craftercms.core.service.Tree
    getTree(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, String url, Integer depth, boolean flatten)
     

    Methods inherited from class org.craftercms.core.controller.rest.RestControllerBase

    createResponseMessage, createSingletonModifiableMap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SiteContentStoreRestController

      @ConstructorProperties("wrappedController") public SiteContentStoreRestController(org.craftercms.core.controller.rest.ContentStoreRestController wrappedController)
  • Method Details

    • getDescriptor

      @RequestMapping(value="/descriptor", method=GET) public org.dom4j.Document getDescriptor(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @Size(max=4000) @RequestParam("url") @Size(max=4000) String url, @RequestParam(required=false,defaultValue="false") boolean flatten)
      Deprecated.
      Will be removed in 4.1, use getItem instead
    • getItem

      @RequestMapping(value="/item", method=GET) public org.craftercms.core.service.Item getItem(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam("url") String url, @RequestParam(required=false,defaultValue="false") boolean flatten)
    • getChildren

      @RequestMapping(value="/children", method=GET) public List<org.craftercms.core.service.Item> getChildren(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam("url") String url, @RequestParam(required=false,defaultValue="false") boolean flatten)
    • getTree

      @RequestMapping(value="/tree", method=GET) public org.craftercms.core.service.Tree getTree(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam("url") String url, @RequestParam(value="depth",required=false) Integer depth, @RequestParam(required=false,defaultValue="false") boolean flatten)
    • getCurrentContextId

      protected String getCurrentContextId()