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 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyById
(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse) void
delete
(String nodeId, Parameters parameters) Delete the given node.lock
(String nodeId, LockInfo lockInfo, Parameters parameters, WithResponse withResponse) moveById
(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse) readById
(String nodeId, Parameters parameters) Returns information regarding the node 'nodeId' - folder or documentreadProperty
(String fileNodeId, Parameters parameters) Download contentvoid
unlock
(String nodeId, Void ignore, Parameters parameters, WithResponse withResponse) 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.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.
-
Constructor Details
-
NodesEntityResource
public NodesEntityResource()
-
-
Method Details
-
setNodes
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
readById
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(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(String fileNodeId, BasicContentInfo contentInfo, 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
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
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(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse) -
moveById
public Node moveById(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse) -
lock
public Node lock(String nodeId, LockInfo lockInfo, Parameters parameters, WithResponse withResponse) -
unlock
-