Package org.alfresco.rest.api.nodes
Class NodesEntityResource
- java.lang.Object
-
- org.alfresco.rest.api.nodes.NodesEntityResource
-
- All Implemented Interfaces:
BinaryResourceAction.Read
,BinaryResourceAction.Update<Node>
,EntityResourceAction.Delete
,EntityResourceAction.ReadById<Node>
,EntityResourceAction.Update<Node>
,ResourceAction
,org.springframework.beans.factory.InitializingBean
@EntityResource(name="nodes", title="Nodes") public class NodesEntityResource extends java.lang.Object implements EntityResourceAction.ReadById<Node>, EntityResourceAction.Delete, EntityResourceAction.Update<Node>, BinaryResourceAction.Read, BinaryResourceAction.Update<Node>, org.springframework.beans.factory.InitializingBean
An implementation of an Entity Resource for a Node (file or folder)- Author:
- sglover, Gethin James, janv
-
-
Constructor Summary
Constructors Constructor Description NodesEntityResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
Node
copyById(java.lang.String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)
void
delete(java.lang.String nodeId, Parameters parameters)
Delete the given node.Node
lock(java.lang.String nodeId, LockInfo lockInfo, Parameters parameters, WithResponse withResponse)
Node
moveById(java.lang.String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)
Node
readById(java.lang.String nodeId, Parameters parameters)
Returns information regarding the node 'nodeId' - folder or documentBinaryResource
readProperty(java.lang.String fileNodeId, Parameters parameters)
Download contentvoid
setNodes(Nodes nodes)
Node
unlock(java.lang.String nodeId, java.lang.Void ignore, Parameters parameters, WithResponse withResponse)
Node
update(java.lang.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(java.lang.String fileNodeId, BasicContentInfo contentInfo, java.io.InputStream stream, Parameters parameters)
Upload new version of content This allow binary content update of an existing file/content node.
-
-
-
Method Detail
-
setNodes
public void setNodes(Nodes nodes)
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
readById
public Node readById(java.lang.String nodeId, Parameters parameters)
Returns information regarding the node 'nodeId' - folder or document- Specified by:
readById
in interfaceEntityResourceAction.ReadById<Node>
- Parameters:
nodeId
- String id of node (folder or document) - will also accept well-known aliases, eg. "-root-", "-my-", "-shared-" Optional parameters: - path
-
readProperty
public BinaryResource readProperty(java.lang.String fileNodeId, Parameters parameters) throws EntityNotFoundException
Download content- Specified by:
readProperty
in interfaceBinaryResourceAction.Read
- Parameters:
fileNodeId
-parameters
-Parameters
- Returns:
- Throws:
EntityNotFoundException
-
updateProperty
public Node updateProperty(java.lang.String fileNodeId, BasicContentInfo contentInfo, java.io.InputStream stream, Parameters parameters)
Upload new version of content This allow binary content update of an existing file/content node. Note: alternatively, can upload via POST (multipart/form-data) with existing file name and form "overwrite=true".- Specified by:
updateProperty
in interfaceBinaryResourceAction.Update<Node>
- Parameters:
fileNodeId
-contentInfo
- Basic information about the content streamstream
- An inputstreamparameters
-- Returns:
-
update
public Node update(java.lang.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.- Specified by:
update
in interfaceEntityResourceAction.Update<Node>
- Parameters:
nodeId
- String nodeId of node (folder or document)nodeInfo
- node entity with info to update (eg. name, properties ...)parameters
-- Returns:
-
delete
public void delete(java.lang.String nodeId, Parameters parameters)
Delete the given node. Note: will cascade delete for a folder.- Specified by:
delete
in interfaceEntityResourceAction.Delete
- Parameters:
nodeId
- String id of node (folder or document)
-
copyById
public Node copyById(java.lang.String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)
-
moveById
public Node moveById(java.lang.String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)
-
lock
public Node lock(java.lang.String nodeId, LockInfo lockInfo, Parameters parameters, WithResponse withResponse)
-
unlock
public Node unlock(java.lang.String nodeId, java.lang.Void ignore, Parameters parameters, WithResponse withResponse)
-
-