@EntityResource(name="nodes", title="Nodes") public class NodesEntityResource extends Object implements EntityResourceAction.ReadById<Node>, EntityResourceAction.Delete, EntityResourceAction.Update<Node>, BinaryResourceAction.Read, BinaryResourceAction.Update<Node>, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
NodesEntityResource() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Node |
copyById(String nodeId,
NodeTarget target,
Parameters parameters,
WithResponse withResponse) |
void |
delete(String nodeId,
Parameters parameters)
Delete the given node.
|
Node |
lock(String nodeId,
LockInfo lockInfo,
Parameters parameters,
WithResponse withResponse) |
Node |
moveById(String nodeId,
NodeTarget target,
Parameters parameters,
WithResponse withResponse) |
Node |
readById(String nodeId,
Parameters parameters)
Returns information regarding the node 'nodeId' - folder or document
|
BinaryResource |
readProperty(String fileNodeId,
Parameters parameters)
Download content
|
void |
setNodes(Nodes nodes) |
Node |
unlock(String nodeId,
Void ignore,
Parameters parameters,
WithResponse withResponse) |
Node |
update(String nodeId,
Node nodeInfo,
Parameters parameters)
Update info on the node 'nodeId' - folder or document
Can update name (which is a "rename" and hence must be unique within the current parent folder)
or update other properties.
|
Node |
updateProperty(String fileNodeId,
BasicContentInfo contentInfo,
InputStream stream,
Parameters parameters)
Upload new version of content
This allow binary content update of an existing file/content node.
|
public void setNodes(Nodes nodes)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public Node readById(String nodeId, Parameters parameters)
readById
in interface EntityResourceAction.ReadById<Node>
nodeId
- String id of node (folder or document) - will also accept well-known aliases, eg. "-root-", "-my-", "-shared-"
Optional parameters:
- pathpublic BinaryResource readProperty(String fileNodeId, Parameters parameters) throws EntityNotFoundException
readProperty
in interface BinaryResourceAction.Read
fileNodeId
- parameters
- Parameters
EntityNotFoundException
public Node updateProperty(String fileNodeId, BasicContentInfo contentInfo, InputStream stream, Parameters parameters)
updateProperty
in interface BinaryResourceAction.Update<Node>
fileNodeId
- contentInfo
- Basic information about the content streamstream
- An inputstreamparameters
- public Node update(String nodeId, Node nodeInfo, Parameters parameters)
update
in interface EntityResourceAction.Update<Node>
nodeId
- String nodeId of node (folder or document)nodeInfo
- node entity with info to update (eg. name, properties ...)parameters
- public void delete(String nodeId, Parameters parameters)
delete
in interface EntityResourceAction.Delete
nodeId
- String id of node (folder or document)public Node copyById(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)
public Node moveById(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)
public Node lock(String nodeId, LockInfo lockInfo, Parameters parameters, WithResponse withResponse)
public Node unlock(String nodeId, Void ignore, Parameters parameters, WithResponse withResponse)
Copyright © 2005–2017 Alfresco Software. All rights reserved.