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 Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.craftercms.core.controller.rest.RestControllerBase
MESSAGE_MODEL_ATTRIBUTE_NAME, REST_BASE_URI -
Constructor Summary
ConstructorsConstructorDescriptionContentStoreRestController(ContentStoreService storeService, int treeDepthLimit) -
Method Summary
Modifier and TypeMethodDescriptionvoidgetChildren(org.springframework.web.context.request.WebRequest request, jakarta.servlet.http.HttpServletResponse response, String contextId, String url, boolean flatten) org.dom4j.DocumentgetDescriptor(org.springframework.web.context.request.WebRequest request, jakarta.servlet.http.HttpServletResponse response, String contextId, String url, boolean flatten) Deprecated.getItem(org.springframework.web.context.request.WebRequest request, jakarta.servlet.http.HttpServletResponse response, String contextId, String url, boolean flatten) getTree(org.springframework.web.context.request.WebRequest request, jakarta.servlet.http.HttpServletResponse response, String contextId, String url, Integer depth, boolean flatten) voidsetAllowedUrlPatterns(String[] allowedUrlPatterns) voidsetForbiddenUrlPatterns(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","treeDepthLimit"}) public ContentStoreRestController(ContentStoreService storeService, int treeDepthLimit)
-
-
Method Details
-
setAllowedUrlPatterns
-
setForbiddenUrlPatterns
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getDescriptor
@RequestMapping(value="/descriptor", method=GET) public org.dom4j.Document getDescriptor(org.springframework.web.context.request.WebRequest request, jakarta.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, usegetIteminstead -
getItem
@RequestMapping(value="/item", method=GET) public Item getItem(org.springframework.web.context.request.WebRequest request, jakarta.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, jakarta.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, jakarta.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
-
getIteminstead