Package org.alfresco.rest.api.nodes
Class NodeCommentsRelation
java.lang.Object
org.alfresco.rest.api.nodes.NodeCommentsRelation
- All Implemented Interfaces:
RelationshipResourceAction.Create<Comment>
,RelationshipResourceAction.Delete
,RelationshipResourceAction.Read<Comment>
,RelationshipResourceAction.Update<Comment>
,ResourceAction
,org.springframework.beans.factory.InitializingBean
@RelationshipResource(name="comments",
entityResource=NodesEntityResource.class,
title="Document or folder comments")
public class NodeCommentsRelation
extends Object
implements RelationshipResourceAction.Read<Comment>, RelationshipResourceAction.Create<Comment>, RelationshipResourceAction.Update<Comment>, RelationshipResourceAction.Delete, org.springframework.beans.factory.InitializingBean
- Author:
- Gethin James, Steve Glover
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(String nodeId, List<Comment> entity, Parameters parameters) Create a comment for the node given by nodeId.void
delete
(String nodeId, String commentNodeId, Parameters parameters) readAll
(String nodeId, Parameters parameters) Returns a paged list of comments for the document/folder identified by nodeId, sorted chronologically with the newest first.void
setComments
(Comments comments) update
(String nodeId, Comment entity, Parameters parameters)
-
Constructor Details
-
NodeCommentsRelation
public NodeCommentsRelation()
-
-
Method Details
-
setComments
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
create
Create a comment for the node given by nodeId. THOR-1153: "F314: Add a comment to a folder or document"- Specified by:
create
in interfaceRelationshipResourceAction.Create<Comment>
-
readAll
Returns a paged list of comments for the document/folder identified by nodeId, sorted chronologically with the newest first. THOR-1152: “F313: For a folder or document, get the list of associated comments” If nodeId does not exist, EntityNotFoundException (status 404). If nodeId does not represent a document or folder, InvalidArgumentException (status 400).- Specified by:
readAll
in interfaceRelationshipResourceAction.Read<Comment>
- Parameters:
nodeId
- Entity resource context for this relationshipparameters
- - will never be null and will have the PAGING default values
-
update
- Specified by:
update
in interfaceRelationshipResourceAction.Update<Comment>
-
delete
- Specified by:
delete
in interfaceRelationshipResourceAction.Delete
-