Interface CommentManager
@ProviderType
public interface CommentManager
- Author:
- André de Oliveira
-
Method Summary
Modifier and TypeMethodDescriptionlongaddComment(long userId, long groupId, String className, long classPK, String body, Function<String, ServiceContext> serviceContextFunction) longaddComment(String externalReferenceCode, long userId, long groupId, String className, long classPK, String userName, String subject, String body, Function<String, ServiceContext> serviceContextFunction) longaddComment(String externalReferenceCode, long userId, String className, long classPK, String userName, long parentCommentId, String subject, String body, Function<String, ServiceContext> serviceContextFunction) voidaddDiscussion(long userId, long groupId, String className, long classPK, String userName) copyDiscussion(long userId, long groupId, String className, long classPK, long newClassPK, Function<String, ServiceContext> serviceContextFunction) voiddeleteComment(long commentId) voiddeleteDiscussion(String className, long classPK) voiddeleteGroupComments(long groupId) fetchComment(long commentId) fetchComment(long groupId, String externalReferenceCode) Returns a comment matching with the external reference code and the group IDfetchDiscussionComment(long userId, long commentId) getChildComments(long parentCommentId, int status, int start, int end) Returns a range of all the comments matching the parent comment ID and status.intgetChildCommentsCount(long parentCommentId, int status) Returns the number of comments matching the parent comment ID and status.getComment(long groupId, String externalReferenceCode) intgetCommentsCount(String className, long classPK) getDiscussion(long userId, long groupId, String className, long classPK, Function<String, ServiceContext> serviceContextFunction) getRootComments(String className, long classPK, int status, int start, int end) Returns a range of all the model's root comments matching the class name, class primary key, and status.intgetRootCommentsCount(String className, long classPK, int status) Returns the number of the model's root comments matching the class name, class primary key, and status.booleanhasDiscussion(String className, long classPK) voidmoveDiscussionToTrash(String className, long classPK) voidrestoreDiscussionFromTrash(String className, long classPK) voidsubscribeDiscussion(long userId, long groupId, String className, long classPK) voidunsubscribeDiscussion(long userId, String className, long classPK) longupdateComment(long userId, String className, long classPK, long commentId, String subject, String body, Function<String, ServiceContext> serviceContextFunction)
-
Method Details
-
addComment
long addComment(long userId, long groupId, String className, long classPK, String body, Function<String, ServiceContext> serviceContextFunction) throws PortalException- Throws:
PortalException
-
addComment
long addComment(String externalReferenceCode, long userId, long groupId, String className, long classPK, String userName, String subject, String body, Function<String, ServiceContext> serviceContextFunction) throws PortalException- Throws:
PortalException
-
addComment
long addComment(String externalReferenceCode, long userId, String className, long classPK, String userName, long parentCommentId, String subject, String body, Function<String, ServiceContext> serviceContextFunction) throws PortalException- Throws:
PortalException
-
addDiscussion
void addDiscussion(long userId, long groupId, String className, long classPK, String userName) throws PortalException - Throws:
PortalException
-
copyDiscussion
Discussion copyDiscussion(long userId, long groupId, String className, long classPK, long newClassPK, Function<String, ServiceContext> serviceContextFunction) throws PortalException- Throws:
PortalException
-
deleteComment
- Throws:
PortalException
-
deleteDiscussion
- Throws:
PortalException
-
deleteGroupComments
- Throws:
PortalException
-
fetchComment
-
fetchComment
Returns a comment matching with the external reference code and the group ID- Parameters:
groupId- the primary key of the groupexternalReferenceCode- the comment's external reference code- Returns:
- the matching comment or null if it could not be found
-
fetchDiscussionComment
- Throws:
PortalException
-
getChildComments
Returns a range of all the comments matching the parent comment ID and status.- Parameters:
parentCommentId- the parent comment's IDstatus- the comments' statusstart- the lower bound of the range of commentsend- the upper bound of the range of comments (not inclusive)- Returns:
- the range of matching comments
-
getChildCommentsCount
int getChildCommentsCount(long parentCommentId, int status) Returns the number of comments matching the parent comment ID and status.- Parameters:
parentCommentId- the parent comment's IDstatus- the comments' status- Returns:
- the number of matching comments
-
getComment
- Throws:
PortalException
-
getCommentsCount
-
getDiscussion
Discussion getDiscussion(long userId, long groupId, String className, long classPK, Function<String, ServiceContext> serviceContextFunction) throws PortalException- Throws:
PortalException
-
getDiscussionStagingHandler
DiscussionStagingHandler getDiscussionStagingHandler() -
getRootComments
List<Comment> getRootComments(String className, long classPK, int status, int start, int end) throws PortalException Returns a range of all the model's root comments matching the class name, class primary key, and status. This count includes only direct comments to the model; it does not include replies.- Parameters:
className- the class nameclassPK- the model class's primary keystatus- the comments' statusstart- the lower bound of the range of commentsend- the upper bound of the range of comments (not inclusive)- Returns:
- the range of matching comments
- Throws:
PortalException
-
getRootCommentsCount
Returns the number of the model's root comments matching the class name, class primary key, and status. This count includes only direct comments to the model; it does not include replies.- Parameters:
className- the class nameclassPK- the model class's primary keystatus- the comments' status- Returns:
- the number of matching comments
-
hasDiscussion
- Throws:
PortalException
-
moveDiscussionToTrash
-
restoreDiscussionFromTrash
-
subscribeDiscussion
void subscribeDiscussion(long userId, long groupId, String className, long classPK) throws PortalException - Throws:
PortalException
-
unsubscribeDiscussion
- Throws:
PortalException
-
updateComment
long updateComment(long userId, String className, long classPK, long commentId, String subject, String body, Function<String, ServiceContext> serviceContextFunction) throws PortalException- Throws:
PortalException
-