Class ContentStoreRestController
java.lang.Object
org.craftercms.core.controller.rest.RestControllerBase
org.craftercms.core.controller.rest.ContentStoreRestController
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@RestController
@RequestMapping("${crafter.core.rest.base.uri}/content_store")
public class ContentStoreRestController
extends RestControllerBase
implements org.springframework.beans.factory.InitializingBean
REST service that provides several methods to access the Crafter content store.
- Author:
- avasquez
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class org.craftercms.core.controller.rest.RestControllerBase
MESSAGE_MODEL_ATTRIBUTE_NAME, REST_BASE_URI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getChildren
(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, String contextId, String url, boolean flatten) org.dom4j.Document
getDescriptor
(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, String contextId, String url, boolean flatten) Deprecated.getItem
(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, String contextId, String url, boolean flatten) getTree
(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, String contextId, String url, Integer depth, boolean flatten) void
setAllowedUrlPatterns
(String[] allowedUrlPatterns) void
setForbiddenUrlPatterns
(String[] forbiddenUrlPatterns) Methods inherited from class org.craftercms.core.controller.rest.RestControllerBase
createResponseMessage, createSingletonModifiableMap
-
Field Details
-
URL_ROOT
- See Also:
-
CACHE_CONTROL_HEADER_NAME
- See Also:
-
MUST_REVALIDATE_HEADER_VALUE
- See Also:
-
REQUEST_PARAM_CONTEXT_ID
- See Also:
-
REQUEST_PARAM_URL
- See Also:
-
REQUEST_PARAM_TREE_DEPTH
- See Also:
-
URL_DESCRIPTOR
- See Also:
-
URL_ITEM
- See Also:
-
URL_CHILDREN
- See Also:
-
URL_TREE
- See Also:
-
-
Constructor Details
-
ContentStoreRestController
@ConstructorProperties("storeService") public ContentStoreRestController(ContentStoreService storeService)
-
-
Method Details
-
setAllowedUrlPatterns
-
setForbiddenUrlPatterns
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
getDescriptor
@RequestMapping(value="/descriptor", method=GET) public org.dom4j.Document getDescriptor(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam("contextId") String contextId, @RequestParam("url") String url, @RequestParam(required=false,defaultValue="false") boolean flatten) throws InvalidContextException, StoreException, PathNotFoundException, ForbiddenPathException, ItemProcessingException, XmlMergeException, XmlFileParseException Deprecated.Will be removed in 4.1, usegetItem
instead -
getItem
@RequestMapping(value="/item", method=GET) public Item getItem(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam("contextId") String contextId, @RequestParam("url") String url, @RequestParam(required=false,defaultValue="false") boolean flatten) throws InvalidContextException, StoreException, PathNotFoundException, ForbiddenPathException, ItemProcessingException, XmlMergeException, XmlFileParseException -
getChildren
@RequestMapping(value="/children", method=GET) public List<Item> getChildren(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam("contextId") String contextId, @RequestParam("url") String url, @RequestParam(required=false,defaultValue="false") boolean flatten) throws InvalidContextException, StoreException, PathNotFoundException, ForbiddenPathException, ItemProcessingException, XmlMergeException, XmlFileParseException -
getTree
@RequestMapping(value="/tree", method=GET) public Tree getTree(org.springframework.web.context.request.WebRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam("contextId") String contextId, @RequestParam("url") String url, @RequestParam(value="depth",required=false) Integer depth, @RequestParam(required=false,defaultValue="false") boolean flatten) throws InvalidContextException, StoreException, PathNotFoundException, ForbiddenPathException, ItemProcessingException, XmlMergeException, XmlFileParseException
-
getItem
instead