@Path(value="/") public class JcrDeliveryEndpoint extends info.magnolia.rest.AbstractEndpoint<JcrDeliveryEndpointDefinition>
It offers two methods for consuming content:
The endpoint behavior can be configured with a JcrDeliveryEndpointDefinition
to match specific workspaces or node types.
Nodes are represented in the JSON output as plain object-graph, resembling the tree-structure of JCR nodes and properties.
Additionally, UUID references to other workspaces can be resolved and expanded within returned records.
Constructor and Description |
---|
JcrDeliveryEndpoint(JcrDeliveryEndpointDefinition endpointDefinition,
info.magnolia.objectfactory.ComponentProvider componentProvider,
info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport) |
Modifier and Type | Method and Description |
---|---|
javax.jcr.NodeIterator |
getChildren(String path)
Returns an array of nodes under a given parent path.
|
NodesResult |
queryNodes(String keyword,
String orderByParam,
Long offsetParam,
Long limitParam)
Searches for nodes matching specific filters and returns a list of results.
|
javax.jcr.Node |
readNode(String path)
Returns a node including its properties and child nodes down to a certain depth.
|
@Inject public JcrDeliveryEndpoint(JcrDeliveryEndpointDefinition endpointDefinition, info.magnolia.objectfactory.ComponentProvider componentProvider, info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport)
@GET @Path(value="/{path:.*(?<!@nodes)}") @Produces(value="application/json") public javax.jcr.Node readNode(@PathParam(value="path") @DefaultValue(value="/") String path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@GET @Path(value="/{path:(.*)}@nodes") @Produces(value="application/json") public javax.jcr.NodeIterator getChildren(@PathParam(value="path") @DefaultValue(value="") String path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@GET @Produces(value="application/json") public NodesResult queryNodes(@QueryParam(value="q") String keyword, @QueryParam(value="orderBy") String orderByParam, @QueryParam(value="offset") Long offsetParam, @QueryParam(value="limit") Long limitParam) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2020 Magnolia International Ltd.. All rights reserved.