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 Constructor Description NodeCommentsRelation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()List<Comment>create(String nodeId, List<Comment> entity, Parameters parameters)Create a comment for the node given by nodeId.voiddelete(String nodeId, String commentNodeId, Parameters parameters)CollectionWithPagingInfo<Comment>readAll(String nodeId, Parameters parameters)Returns a paged list of comments for the document/folder identified by nodeId, sorted chronologically with the newest first.voidsetComments(Comments comments)Commentupdate(String nodeId, Comment entity, Parameters parameters)
-
-
-
Method Detail
-
setComments
public void setComments(Comments comments)
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
create
public List<Comment> create(String nodeId, List<Comment> entity, Parameters parameters)
Create a comment for the node given by nodeId. THOR-1153: "F314: Add a comment to a folder or document"- Specified by:
createin interfaceRelationshipResourceAction.Create<Comment>
-
readAll
public CollectionWithPagingInfo<Comment> readAll(String nodeId, Parameters parameters)
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:
readAllin interfaceRelationshipResourceAction.Read<Comment>- Parameters:
nodeId- Entity resource context for this relationshipparameters- - will never be null and will have the PAGING default values
-
update
public Comment update(String nodeId, Comment entity, Parameters parameters)
- Specified by:
updatein interfaceRelationshipResourceAction.Update<Comment>
-
delete
public void delete(String nodeId, String commentNodeId, Parameters parameters)
- Specified by:
deletein interfaceRelationshipResourceAction.Delete
-
-