D
- The endpoint definition@Path(value="/nodes/v1")
public class NodeEndpoint<D extends NodeEndpointDefinition>
extends info.magnolia.rest.AbstractEndpoint<D>
Constructor and Description |
---|
NodeEndpoint(D endpointDefinition) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createNode(String workspaceName,
String parentPath,
RepositoryNode repositoryNode)
Creates a new node and populates it with the supplied properties.
|
javax.ws.rs.core.Response |
deleteNode(String workspaceName,
String path)
Delete a node.
|
javax.ws.rs.core.Response |
readNode(String workspaceName,
String path,
int depth,
String excludeNodeTypes,
boolean includeMetadata)
Returns a node including its properties and child nodes down to a certain depth.
|
protected List<String> |
splitExcludeNodeTypesString(String excludes) |
javax.ws.rs.core.Response |
updateNode(String workspaceName,
String path,
RepositoryNode repositoryNode)
Adds properties to a node.
|
@Inject public NodeEndpoint(D endpointDefinition)
@GET @Path(value="/{workspace}{path:(/.+)?}") @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response readNode(@PathParam(value="workspace") String workspaceName, @PathParam(value="path") @DefaultValue(value="/") String path, @QueryParam(value="depth") @DefaultValue(value="0") int depth, @QueryParam(value="excludeNodeTypes") @DefaultValue(value="") String excludeNodeTypes, @QueryParam(value="includeMetadata") @DefaultValue(value="false") boolean includeMetadata) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@PUT @Path(value="/{workspace}{path:(/.+)?}") @Produces(value={"application/json","application/xml"}) @Consumes(value={"application/json","application/xml"}) public javax.ws.rs.core.Response createNode(@PathParam(value="workspace") String workspaceName, @PathParam(value="path") @DefaultValue(value="/") String parentPath, RepositoryNode repositoryNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@POST @Path(value="/{workspace}{path:(/.+)?}") @Produces(value={"application/json","application/xml"}) @Consumes(value={"application/json","application/xml"}) public javax.ws.rs.core.Response updateNode(@PathParam(value="workspace") String workspaceName, @PathParam(value="path") @DefaultValue(value="/") String path, RepositoryNode repositoryNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@DELETE @Path(value="/{workspace}{path:(/.+)?}") public javax.ws.rs.core.Response deleteNode(@PathParam(value="workspace") String workspaceName, @PathParam(value="path") @DefaultValue(value="/") String path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2017 Magnolia International Ltd.. All rights reserved.