Interface CommentPersistenceManager
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultJcrCommentPersistenceManager
Comment data persistence manager service interface, providing CRUD operations.
An implementation may provide the service based on JCR repository. Another implementation may possibly provide the service based on NoSQL data store for instance.
-
Method Summary
Modifier and TypeMethodDescriptioncreateCommentItem(CommentingContext commentingContext, CommentItem commentItem) Create comment data item based on givencommentItem.voiddeleteCommentItem(CommentingContext commentingContext, CommentItem commentItem) Deletes comment data item based on information given bycommentItem.getCommentBodyText(CommentingContext commentingContext, CommentItem commentItem) Gets comment body text to display in user interface fromcommentItem.getCommentBodyTooltip(CommentingContext commentingContext, CommentItem commentItem) Gets comment body tooltip text to display in user interface fromcommentItem.getCommentHeadText(CommentingContext commentingContext, CommentItem commentItem) Gets comment header text to display in user interface fromcommentItem.getCommentHeadTooltip(CommentingContext commentingContext, CommentItem commentItem) Gets comment header tooltip text to display in user interface fromcommentItem.getCommentItemById(CommentingContext commentingContext, String commentId) Retrieves a comment data item bycommentId.getLatestCommentItemsBySubjectId(CommentingContext commentingContext, String subjectId, long offset, long limit) Retrieves command data bysubjectId,offsetandlimit.voidupdateCommentItem(CommentingContext commentingContext, CommentItem commentItem) Updates comment data item bycommentItem.
-
Method Details
-
createCommentItem
String createCommentItem(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException Create comment data item based on givencommentItem.- Parameters:
commentingContext- commenting context instancecommentItem- comment data item object- Returns:
- the identifier of the newly created comment data item
- Throws:
CommentingException- if any exception occurs while creating a comment data item
-
getCommentItemById
CommentItem getCommentItemById(CommentingContext commentingContext, String commentId) throws CommentingException Retrieves a comment data item bycommentId.- Parameters:
commentingContext- commenting context instancecommentId- the identifier of the comment data item- Returns:
CommentIteminstance- Throws:
CommentingException- if any exception occurs while retrieving a comment data item
-
getLatestCommentItemsBySubjectId
List<CommentItem> getLatestCommentItemsBySubjectId(CommentingContext commentingContext, String subjectId, long offset, long limit) throws CommentingException Retrieves command data bysubjectId,offsetandlimit.- Parameters:
commentingContext- commenting context instancesubjectId- the identifier of the subject data (e.g, document handle UUID).offset- first item index of datalimit- max query item count limit- Returns:
- list of comment data items
- Throws:
CommentingException- if any exception occurs while retrieving comment data
-
updateCommentItem
void updateCommentItem(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException Updates comment data item bycommentItem.- Parameters:
commentingContext- commenting context instancecommentItem- comment data item object- Throws:
CommentingException- if any exception occurs while updating a comment data item
-
deleteCommentItem
void deleteCommentItem(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException Deletes comment data item based on information given bycommentItem.- Parameters:
commentingContext- commenting context instancecommentItem- comment data item object- Throws:
CommentingException- if any exception occurs while deleting a comment data item
-
getCommentHeadText
String getCommentHeadText(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException Gets comment header text to display in user interface fromcommentItem.- Parameters:
commentingContext- commenting context instancecommentItem- comment data item object- Returns:
- comment header text to display in user interface
- Throws:
CommentingException- if any exception occurs while creating a comment data item
-
getCommentBodyText
String getCommentBodyText(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException Gets comment body text to display in user interface fromcommentItem.- Parameters:
commentingContext- commenting context instancecommentItem- comment data item object- Returns:
- comment body text to display in user interface
- Throws:
CommentingException- if any exception occurs while creating a comment data item
-
getCommentHeadTooltip
String getCommentHeadTooltip(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException Gets comment header tooltip text to display in user interface fromcommentItem. Null if tooltip is not needed to display.- Parameters:
commentingContext- commenting context instancecommentItem- comment data item object- Returns:
- comment header tooltip text to display in user interface. Null if tooltip is not needed to display.
- Throws:
CommentingException- if any exception occurs while creating a comment data item
-
getCommentBodyTooltip
String getCommentBodyTooltip(CommentingContext commentingContext, CommentItem commentItem) throws CommentingException Gets comment body tooltip text to display in user interface fromcommentItem. Null if tooltip is not needed to display.- Parameters:
commentingContext- commenting context instancecommentItem- comment data item object- Returns:
- comment body tooltip text to display in user interface. Null if tooltip is not needed to display.
- Throws:
CommentingException- if any exception occurs while creating a comment data item
-