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 Constructor Description NodesEntityResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()NodecopyById(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)voiddelete(String nodeId, Parameters parameters)Delete the given node.Nodelock(String nodeId, LockInfo lockInfo, Parameters parameters, WithResponse withResponse)NodemoveById(String nodeId, NodeTarget target, Parameters parameters, WithResponse withResponse)NodereadById(String nodeId, Parameters parameters)Returns information regarding the node 'nodeId' - folder or documentBinaryResourcereadProperty(String fileNodeId, Parameters parameters)Download contentDirectAccessUrlrequestContentDirectUrl(String nodeId, DirectAccessUrlRequest directAccessUrlRequest, Parameters parameters, WithResponse withResponse)voidsetDirectAccessUrlHelper(DirectAccessUrlHelper directAccessUrlHelper)voidsetNodes(Nodes nodes)Nodeunlock(String nodeId, Void ignore, Parameters parameters, WithResponse withResponse)Nodeupdate(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.NodeupdateProperty(String fileNodeId, BasicContentInfo contentInfo, 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)
-
setDirectAccessUrlHelper
public void setDirectAccessUrlHelper(DirectAccessUrlHelper directAccessUrlHelper)
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
readById
public Node readById(String nodeId, Parameters parameters)
Returns information regarding the node 'nodeId' - folder or document- Specified by:
readByIdin 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:
readPropertyin 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:
updatePropertyin interfaceBinaryResourceAction.Update<Node>- Parameters:
fileNodeId-contentInfo- Basic information about the content streamstream- An inputstreamparameters-- Returns:
-
update
public 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.- Specified by:
updatein 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(String nodeId, Parameters parameters)
Delete the given node. Note: will cascade delete for a folder.- Specified by:
deletein 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
public Node unlock(String nodeId, Void ignore, Parameters parameters, WithResponse withResponse)
-
requestContentDirectUrl
public DirectAccessUrl requestContentDirectUrl(String nodeId, DirectAccessUrlRequest directAccessUrlRequest, Parameters parameters, WithResponse withResponse)
-
-