Interface SCommentService
- All Known Implementing Classes:
SCommentServiceImpl
public interface SCommentService
- Since:
- 6.0
- Author:
- Hongwen Zang, Zhang Bole, Matthieu Chaffotte
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddComment(long processInstanceId, String comment, long userId) Add a comment on process instanceaddSystemComment(long processInstanceId, String comment) Add a system comment on process instancevoidvoidDelete the commentvoiddeleteArchivedComments(List<Long> processInstanceIds) Delete archived comments for specified process instancesvoiddeleteComments(long processInstanceId) Delete comments for a specified process instancegetArchivedComment(long archivedCommentId) getComments(long processInstanceId, QueryOptions queryOptions) Get comments for the given processInstancelonggetNumberOfArchivedComments(QueryOptions searchOptions) Search number of archived CommentslonggetNumberOfComments(QueryOptions queryOptions) Number of all comments related to the specified query options.longgetNumberOfCommentsInvolvingUser(long userId, QueryOptions searchOptions) Search number of all the comments on process instants that the user can accesslonggetNumberOfCommentsManagedBy(long managerUserId, QueryOptions searchOptions) Search number of the comments visible by delegates of managerUserIdlonggetNumberOfCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions) Search number of Comment for a specific supervisorbooleanReturning true if the system comments are enabled for the specific SystemCommentType.searchArchivedComments(QueryOptions searchOptions) Search archived CommentssearchComments(QueryOptions options) List all comments related to the specified query options.searchCommentsInvolvingUser(long userId, QueryOptions queryOptions) List all the comments on process instants that the user can accesssearchCommentsManagedBy(long managerUserId, QueryOptions searchOptions) Search comments visible by delegates of managerUserIdsearchCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions) Search an Comment for a specific supervisor
-
Field Details
-
COMMENT
- See Also:
-
COMMMENT_IS_DELETED
- See Also:
-
-
Method Details
-
searchComments
List all comments related to the specified query options.- Parameters:
options- a QueryOptions object, containing some query conditions- Returns:
- a list of SComment objects corresponding to the criteria
- Throws:
SBonitaReadException
-
getNumberOfComments
Number of all comments related to the specified query options.- Parameters:
queryOptions- a QueryOptions object, containing some query conditions- Returns:
- number of all comments corresponding to the criteria.
- Throws:
SBonitaReadException
-
addComment
SComment addComment(long processInstanceId, String comment, long userId) throws SCommentAddException Add a comment on process instance- Parameters:
processInstanceId- identifier of processInstancecomment- the comment you want to adduserId- The user that will be said to have made the comment- Throws:
SCommentAddException
-
addSystemComment
Add a system comment on process instance- Parameters:
processInstanceId- identifier of processInstancecomment- the comment you want to add- Throws:
SCommentAddException
-
getComments
List<SComment> getComments(long processInstanceId, QueryOptions queryOptions) throws SBonitaReadException Get comments for the given processInstance- Parameters:
processInstanceId- identifier of processInstancequeryOptions- the query options to filter the results- Returns:
- a list of SComment object
- Throws:
SBonitaReadException- in case of read error- Since:
- 6.1
-
getNumberOfCommentsSupervisedBy
long getNumberOfCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException Search number of Comment for a specific supervisor- Parameters:
supervisorId- the identifier of supervisorqueryOptions- a map of specific parameters of a query- Returns:
- number of Comment for a specific supervisor
- Throws:
SBonitaReadException- if a Read exception occurs
-
searchCommentsSupervisedBy
List<SComment> searchCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException Search an Comment for a specific supervisor- Parameters:
supervisorId- the identifier of supervisorqueryOptions- a map of specific parameters of a query- Returns:
- an Comment for a specific supervisor
- Throws:
SBonitaReadException- if a Read exception occurs
-
getNumberOfCommentsInvolvingUser
long getNumberOfCommentsInvolvingUser(long userId, QueryOptions searchOptions) throws SBonitaReadException Search number of all the comments on process instants that the user can access- Parameters:
userId- identifier of usersearchOptions- a QueryOptions object, containing some query conditions- Returns:
- number of all the comments on process instants that the user can access
- Throws:
SBonitaReadException
-
searchCommentsInvolvingUser
List<SComment> searchCommentsInvolvingUser(long userId, QueryOptions queryOptions) throws SBonitaReadException List all the comments on process instants that the user can access- Parameters:
userId- identifier of userqueryOptions- a QueryOptions object, containing some query conditions- Returns:
- a list of comments on process instants that the user can access
- Throws:
SBonitaReadException
-
getNumberOfCommentsManagedBy
long getNumberOfCommentsManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException Search number of the comments visible by delegates of managerUserId- Parameters:
managerUserId- identifier of a manager usersearchOptions- a QueryOptions object, containing some query conditions- Returns:
- number of the comments visible by delegates of managerUserId
- Throws:
SBonitaReadException
-
searchCommentsManagedBy
List<SComment> searchCommentsManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException Search comments visible by delegates of managerUserId- Parameters:
managerUserId- identifier of a manager usersearchOptions- a QueryOptions object, containing some query conditions- Returns:
- a list of comments visible by delegates of managerUserId
- Throws:
SBonitaReadException
-
getNumberOfArchivedComments
Search number of archived Comments- Parameters:
searchOptions-- Throws:
SBonitaReadException
-
searchArchivedComments
Search archived Comments- Parameters:
searchOptions- a QueryOptions object, containing some query conditions- Returns:
- a list with archived Comments
- Throws:
SBonitaReadException
-
isCommentEnabled
Returning true if the system comments are enabled for the specific SystemCommentType.- Parameters:
sct- A Enum for system comments- Returns:
- Returning true if the system comments are enabled for the specific SystemCommentType.
- Since:
- 6.0
-
delete
Delete the comment- Parameters:
comment-- Throws:
SCommentDeletionException
-
getArchivedComment
SAComment getArchivedComment(long archivedCommentId) throws SCommentNotFoundException, SBonitaReadException - Parameters:
archivedCommentId-- Throws:
SCommentNotFoundExceptionSBonitaReadException
-
deleteArchivedComments
Delete archived comments for specified process instances- Parameters:
processInstanceIds-- Throws:
SBonitaException
-
deleteComments
Delete comments for a specified process instance- Parameters:
processInstanceId-- Throws:
SBonitaException- Since:
- 6.1
-
archive
- Parameters:
archiveDate-sComment-- Throws:
SObjectModificationException- Since:
- 6.4.0
-