Interface SCommentService
-
- All Known Implementing Classes:
SCommentServiceImpl
public interface SCommentService- Since:
- 6.0
- Author:
- Hongwen Zang, Zhang Bole, Matthieu Chaffotte
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMMENTstatic java.lang.StringCOMMMENT_IS_DELETED
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description SCommentaddComment(long processInstanceId, java.lang.String comment, long userId)Add a comment on process instanceSCommentaddSystemComment(long processInstanceId, java.lang.String comment)Add a system comment on process instancevoidarchive(long archiveDate, SComment sComment)voiddelete(SComment comment)Delete the commentvoiddeleteArchivedComments(java.util.List<java.lang.Long> processInstanceIds)Delete archived comments for specified process instancesvoiddeleteComments(long processInstanceId)Delete comments for a specified process instanceSACommentgetArchivedComment(long archivedCommentId)java.util.List<SComment>getComments(long processInstanceId)Deprecated.usegetComments(long, QueryOptions)insteadjava.util.List<SComment>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 supervisorbooleanisCommentEnabled(SystemCommentType sct)Returning true if the system comments are enabled for the specific SystemCommentType.java.util.List<SAComment>searchArchivedComments(QueryOptions searchOptions)Search archived Commentsjava.util.List<SComment>searchComments(QueryOptions options)List all comments related to the specified query options.java.util.List<SComment>searchCommentsInvolvingUser(long userId, QueryOptions queryOptions)List all the comments on process instants that the user can accessjava.util.List<SComment>searchCommentsManagedBy(long managerUserId, QueryOptions searchOptions)Search comments visible by delegates of managerUserIdjava.util.List<SComment>searchCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions)Search an Comment for a specific supervisor
-
-
-
Field Detail
-
COMMENT
static final java.lang.String COMMENT
- See Also:
- Constant Field Values
-
COMMMENT_IS_DELETED
static final java.lang.String COMMMENT_IS_DELETED
- See Also:
- Constant Field Values
-
-
Method Detail
-
searchComments
java.util.List<SComment> searchComments(QueryOptions options) throws SBonitaReadException
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
long getNumberOfComments(QueryOptions queryOptions) throws SBonitaReadException
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, java.lang.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
SComment addSystemComment(long processInstanceId, java.lang.String comment) throws SCommentAddException
Add a system comment on process instance- Parameters:
processInstanceId- identifier of processInstancecomment- the comment you want to add- Throws:
SCommentAddException
-
getComments
@Deprecated java.util.List<SComment> getComments(long processInstanceId) throws SBonitaReadException
Deprecated.usegetComments(long, QueryOptions)insteadGet the first 20 comments for the given processInstance- Parameters:
processInstanceId- identifier of processInstance- Returns:
- a list of SComment object
- Throws:
SBonitaReadException- in case of read error
-
getComments
java.util.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 SBonitaReadExceptionSearch 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
java.util.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 SBonitaReadExceptionSearch 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
java.util.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 SBonitaReadExceptionSearch 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
java.util.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
long getNumberOfArchivedComments(QueryOptions searchOptions) throws SBonitaReadException
Search number of archived Comments- Parameters:
searchOptions-- Throws:
SBonitaReadException
-
searchArchivedComments
java.util.List<SAComment> searchArchivedComments(QueryOptions searchOptions) throws SBonitaReadException
Search archived Comments- Parameters:
searchOptions- a QueryOptions object, containing some query conditions- Returns:
- a list with archived Comments
- Throws:
SBonitaReadException
-
isCommentEnabled
boolean isCommentEnabled(SystemCommentType sct)
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
void delete(SComment comment) throws SCommentDeletionException
Delete the comment- Parameters:
comment-- Throws:
SCommentDeletionException
-
getArchivedComment
SAComment getArchivedComment(long archivedCommentId) throws SCommentNotFoundException, SBonitaReadException
- Parameters:
archivedCommentId-- Throws:
SCommentNotFoundExceptionSBonitaReadException
-
deleteArchivedComments
void deleteArchivedComments(java.util.List<java.lang.Long> processInstanceIds) throws SBonitaExceptionDelete archived comments for specified process instances- Parameters:
processInstanceIds-- Throws:
SBonitaException
-
deleteComments
void deleteComments(long processInstanceId) throws SBonitaExceptionDelete comments for a specified process instance- Parameters:
processInstanceId-- Throws:
SBonitaException- Since:
- 6.1
-
archive
void archive(long archiveDate, SComment sComment) throws SObjectModificationException- Parameters:
archiveDate-sComment-- Throws:
SObjectModificationException- Since:
- 6.4.0
-
-