@Controller
@RequestMapping(value="${crafter.core.rest.base.uri}/content_store")
public class ContentStoreRestController
extends RestControllerBase
| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_CONTROL_HEADER_NAME |
static String |
MODEL_ATTR_CHILDREN |
static String |
MODEL_ATTR_DESCRIPTOR |
static String |
MODEL_ATTR_ITEM |
static String |
MODEL_ATTR_TREE |
static String |
MUST_REVALIDATE_HEADER_VALUE |
static String |
REQUEST_PARAM_CONTEXT_ID |
static String |
REQUEST_PARAM_TREE_DEPTH |
static String |
REQUEST_PARAM_URL |
static String |
URL_CHILDREN |
static String |
URL_DESCRIPTOR |
static String |
URL_ITEM |
static String |
URL_ROOT |
static String |
URL_TREE |
MESSAGE_MODEL_ATTRIBUTE_NAME, REST_BASE_URI| Constructor and Description |
|---|
ContentStoreRestController() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getChildren(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
String contextId,
String url) |
Map<String,Object> |
getDescriptor(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
String contextId,
String url) |
Map<String,Object> |
getItem(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
String contextId,
String url) |
Map<String,Object> |
getTree(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
String contextId,
String url,
Integer depth) |
void |
init() |
void |
setAllowedUrlPatterns(String[] allowedUrlPatterns) |
void |
setForbiddenUrlPatterns(String[] forbiddenUrlPatterns) |
void |
setStoreService(ContentStoreService storeService) |
createMessageModel, handleAuthenticationException, handleException, handleForbiddenPathException, handleInvalidContextException, handlePathNotFoundException, handleValidationException, handleValidationRuntimeExceptionpublic static final String URL_ROOT
public static final String CACHE_CONTROL_HEADER_NAME
public static final String MUST_REVALIDATE_HEADER_VALUE
public static final String REQUEST_PARAM_CONTEXT_ID
public static final String REQUEST_PARAM_URL
public static final String REQUEST_PARAM_TREE_DEPTH
public static final String URL_DESCRIPTOR
public static final String URL_ITEM
public static final String URL_CHILDREN
public static final String URL_TREE
public static final String MODEL_ATTR_DESCRIPTOR
public static final String MODEL_ATTR_ITEM
public static final String MODEL_ATTR_CHILDREN
public static final String MODEL_ATTR_TREE
public void setStoreService(ContentStoreService storeService)
public void setAllowedUrlPatterns(String[] allowedUrlPatterns)
public void setForbiddenUrlPatterns(String[] forbiddenUrlPatterns)
@PostConstruct public void init()
@RequestMapping(value="/descriptor",
method=GET)
public Map<String,Object> getDescriptor(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
@RequestParam(value="contextId")
String contextId,
@RequestParam(value="url")
String url)
throws InvalidContextException,
StoreException,
PathNotFoundException,
ForbiddenPathException,
ItemProcessingException,
XmlMergeException,
XmlFileParseException
@RequestMapping(value="/item",
method=GET)
public Map<String,Object> getItem(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
@RequestParam(value="contextId")
String contextId,
@RequestParam(value="url")
String url)
throws InvalidContextException,
StoreException,
PathNotFoundException,
ForbiddenPathException,
ItemProcessingException,
XmlMergeException,
XmlFileParseException
@RequestMapping(value="/children",
method=GET)
public Map<String,Object> getChildren(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
@RequestParam(value="contextId")
String contextId,
@RequestParam(value="url")
String url)
throws InvalidContextException,
StoreException,
PathNotFoundException,
ForbiddenPathException,
ItemProcessingException,
XmlMergeException,
XmlFileParseException
@RequestMapping(value="/tree",
method=GET)
public Map<String,Object> getTree(org.springframework.web.context.request.WebRequest request,
javax.servlet.http.HttpServletResponse response,
@RequestParam(value="contextId")
String contextId,
@RequestParam(value="url")
String url,
@RequestParam(value="depth",required=false)
Integer depth)
throws InvalidContextException,
StoreException,
PathNotFoundException,
ForbiddenPathException,
ItemProcessingException,
XmlMergeException,
XmlFileParseException
Copyright © 2018 CrafterCMS. All rights reserved.