|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommentsManager
The access point for all operations related to retrieving and posting comments on objects in WebCenter.
An instance of this can be obtained via a call to CommentsServiceFactory.getCommentsManager()
.
Nested Class Summary | |
---|---|
static class |
CommentsManager.SortCriteria |
Method Summary | |
---|---|
CommentsSummary |
createCommentsSummary(java.lang.Object... summaryData) Constructs a summary of comments on a WebCenter object out of raw data. |
void |
deleteComment(java.lang.String commentId) Delete a comment |
java.lang.Object |
getCommentById(java.lang.String commentId) |
java.util.List<Comment> |
getComments(ActivityElement activity, CommentsManager.SortCriteria sortCriteria) Returns all the comments that have been posted on a specified WebCenter object. |
java.util.List<Comment> |
getComments(ActivityElement activity, CommentsManager.SortCriteria sortCriteria, int startIndex, int itemsPerPage) Returns all the comments that have been posted on a specified WebCenter object. |
java.util.List<Comment> |
getComments(ActivityObject objId, CommentsManager.SortCriteria sortCriteria) Returns all the comments that have been posted on a specified WebCenter object. |
java.util.List<Comment> |
getComments(ActivityObject objId, CommentsManager.SortCriteria sortCriteria, int startIndex, int itemsPerPage) Returns all the comments that have been posted on a specified WebCenter object. |
Comment |
postComment(ActivityElement activity, java.lang.String commentText) Allows the current user to post a comment on a specified WebCenter object. |
Comment |
postComment(ActivityObject objId, java.lang.String commentText, oracle.webcenter.framework.service.Scope scope) Allows the current user to post a comment on a specified WebCenter object. |
Comment |
postComment(ActivityObject objId, java.lang.String commentText, oracle.webcenter.framework.service.Scope scope, java.lang.String activityId) Allows the current user to post a comment on a specified WebCenter object. |
Method Detail |
---|
java.util.List<Comment> getComments(ActivityObject objId, CommentsManager.SortCriteria sortCriteria) throws CommentsException
objId
- Object carrying information identifying the WebCenter object for which comments are to be retreived. The key properties needed to be specified on it are the service ID, the object type, and the object ID. It can be constructed by calling ActivityStreamingService.createObject(java.lang.String, oracle.webcenter.framework.service.ServiceObjectType, java.lang.String)
passing in the appropriate object ID and object type, and then calling ActivityObject.setServiceID(java.lang.String)
on it. The display name on the ActivityObject can be any non-null non-empty string, and need not even be the correct display name of the actual WebCenter object it represents.sortCriteria
- (optional) Criteria in which to order the list of comments being returned. If not specified, the list will be ordered in reverse chronological order of creation.CommentsException
- If objId
is null
or incomplete, or any error occurs retrieving the comments.java.util.List<Comment> getComments(ActivityObject objId, CommentsManager.SortCriteria sortCriteria, int startIndex, int itemsPerPage) throws CommentsException
objId
- Object carrying information identifying the WebCenter object for which comments are to be retreived. The key properties needed to be specified on it are the service ID, the object type, and the object ID. It can be constructed by calling ActivityStreamingService.createObject(java.lang.String, oracle.webcenter.framework.service.ServiceObjectType, java.lang.String)
passing in the appropriate object ID and object type, and then calling ActivityObject.setServiceID(java.lang.String)
on it. The display name on the ActivityObject can be any non-null non-empty string, and need not even be the correct display name of the actual WebCenter object it represents.sortCriteria
- (optional) Criteria in which to order the list of comments being returned. If not specified, the list will be ordered in reverse chronological order of creation.startIndex
- The start index for the query (1 based)itemsPerPage
- The number of items to returnCommentsException
- If objId
is null
or incomplete, or any error occurs retrieving the comments.Comment postComment(ActivityObject objId, java.lang.String commentText, oracle.webcenter.framework.service.Scope scope) throws CommentsException
objId
- Object carrying information identifying the WebCenter object for which comments are to be retreived. The key properties needed to be specified on it are the service ID, the object type, and the object ID. It can be constructed by calling ActivityStreamingService.createObject(java.lang.String, oracle.webcenter.framework.service.ServiceObjectType, java.lang.String)
passing in the appropriate object ID and object type, and then calling ActivityObject.setServiceID(java.lang.String)
on it. The display name on the ActivityObject can be any non-null non-empty string, and need not even be the correct display name of the actual WebCenter object it represents.commentText
- Non-null non-empty string carrying the text of the comment that is to posted.scope
- The WebCenter scope to which the object belongs.CommentsException
- If objId
is null
or incomplete, commentText
is null
or empty, or any error occurs posting the comment.Comment postComment(ActivityObject objId, java.lang.String commentText, oracle.webcenter.framework.service.Scope scope, java.lang.String activityId) throws CommentsException
objId
- Object carrying information identifying the WebCenter object for which comments are to be retreived. The key properties needed to be specified on it are the service ID, the object type, and the object ID. It can be constructed by calling ActivityStreamingService.createObject(java.lang.String, oracle.webcenter.framework.service.ServiceObjectType, java.lang.String)
passing in the appropriate object ID and object type, and then calling ActivityObject.setServiceID(java.lang.String)
on it. The display name on the ActivityObject can be any non-null non-empty string, and need not even be the correct display name of the actual WebCenter object it represents.commentText
- Non-null non-empty string carrying the text of the comment that is to posted.scope
- The WebCenter scope to which the object belongs.activityId
- An optional (non-null) original activity on which this comment is to be applied. If specified, the activity's timestamp will be incremented to current, moving the activity to the top of the activity stream.CommentsException
- If objId
is null
or incomplete, commentText
is null
or empty, or any error occurs posting the comment.java.util.List<Comment> getComments(ActivityElement activity, CommentsManager.SortCriteria sortCriteria) throws CommentsException
activity
- Object carrying information identifying the activity object for which comments are to be retreived.sortCriteria
- (optional) Criteria in which to order the list of comments being returned. If not specified, the list will be ordered in reverse chronological order of creation.CommentsException
- If objId
is null
or incomplete, or any error occurs retrieving the comments.java.util.List<Comment> getComments(ActivityElement activity, CommentsManager.SortCriteria sortCriteria, int startIndex, int itemsPerPage) throws CommentsException
activity
- Object carrying information identifying the activity object for which comments are to be retreived.sortCriteria
- (optional) Criteria in which to order the list of comments being returned. If not specified, the list will be ordered in reverse chronological order of creation.startIndex
- The start index for the query (1 based)itemsPerPage
- The number of items to returnCommentsException
- If objId
is null
or incomplete, or any error occurs retrieving the comments.Comment postComment(ActivityElement activity, java.lang.String commentText) throws CommentsException
activity
- Object carrying information identifying the activity object for which comments are to be retreived.commentText
- Non-null non-empty string carrying the text of the comment that is to posted.CommentsException
- If activity
is null
or incomplete, commentText
is null
or empty, or any error occurs posting the comment.void deleteComment(java.lang.String commentId) throws CommentsException
commentId
- The ID of the comment being deleted.CommentsException
java.lang.Object getCommentById(java.lang.String commentId) throws CommentsException
CommentsException
CommentsSummary createCommentsSummary(java.lang.Object... summaryData) throws CommentsException
The intended use of this method is for WebCenter services (that store their data in WebCenter DB and support commenting on their objects) to do a DB table join with the WC_AS_ACTOR_DETAIL table in order to fetch columns representing the comments information on their objects and then construct a meaningful comment summary for each object out of the fetched data.
summaryData
- Series of objects, typically values in the comments-related column for a row in the WC_AS_ACTOR_DETAIL DB table. The first object should correspond to the COMMENTS_COUNT column, and the second should correspond to the RECENT_COMMENTS column.CommentsException
- If any error occurs preparing the summary
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |