ccc.api.core
Interface Comments

All Known Implementing Classes:
CommentsEJB, CommentsImpl

public interface Comments

API for manipulating Comments.

Author:
Civic Computing Ltd.

Field Summary
static java.lang.String NAME
          NAME : String.
 
Method Summary
 Comment create(Comment comment)
          Create a new comment in CCC.
 void delete(java.util.UUID commentId)
          Delete an existing comment.
 PagedCollection<Comment> query(java.util.UUID resourceId, CommentStatus status, java.lang.String sort, SortOrder sortOrder, int pageNo, int pageSize)
          List existing comments.
 Comment retrieve(java.util.UUID commentId)
          Retrieve the comment using its ID.
 Comment update(java.util.UUID commentId, Comment comment)
          Update the specified comment.
 

Field Detail

NAME

static final java.lang.String NAME
NAME : String.

See Also:
Constant Field Values
Method Detail

create

Comment create(Comment comment)
Create a new comment in CCC.

Parameters:
comment - The comment to create.
Returns:
Return the newly created comment.

retrieve

Comment retrieve(java.util.UUID commentId)
Retrieve the comment using its ID.

Parameters:
commentId - The comment's ID.
Returns:
Return the corresponding comment.

update

Comment update(java.util.UUID commentId,
               Comment comment)
Update the specified comment.

Parameters:
commentId - The comment's ID.
comment - The updated comment.
Returns:
The updated comment.

delete

void delete(java.util.UUID commentId)
Delete an existing comment.

Parameters:
commentId - The comment's ID.

query

PagedCollection<Comment> query(java.util.UUID resourceId,
                               CommentStatus status,
                               java.lang.String sort,
                               SortOrder sortOrder,
                               int pageNo,
                               int pageSize)
List existing comments.

Parameters:
resourceId - Filter comments by resource. NULL will return all.
status - Filter comments based on status. NULL will return all.
sort - The field to sort on.
sortOrder - The order results be sorted in.
pageNo - The page of results to return.
pageSize - The number of results in a page.
Returns:
A list of comments.


Copyright © 2010. All Rights Reserved.