Class SCommentServiceImpl
java.lang.Object
org.bonitasoft.engine.core.process.comment.api.impl.SCommentServiceImpl
- All Implemented Interfaces:
SCommentService
- Author:
- Hongwen Zang, Baptiste Mesta, Matthieu Chaffotte, Celine Souchet
-
Field Summary
Fields inherited from interface org.bonitasoft.engine.core.process.comment.api.SCommentService
COMMENT, COMMMENT_IS_DELETED -
Constructor Summary
ConstructorsConstructorDescriptionSCommentServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, ArchiveService archiveService, SessionService sessionService, ReadSessionAccessor sessionAccessor, Map<SystemCommentType, Boolean> systemCommentType) -
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 options) 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
-
Constructor Details
-
SCommentServiceImpl
public SCommentServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, ArchiveService archiveService, SessionService sessionService, ReadSessionAccessor sessionAccessor, Map<SystemCommentType, Boolean> systemCommentType)
-
-
Method Details
-
searchComments
Description copied from interface:SCommentServiceList all comments related to the specified query options.- Specified by:
searchCommentsin interfaceSCommentService- Parameters:
options- a QueryOptions object, containing some query conditions- Returns:
- a list of SComment objects corresponding to the criteria
- Throws:
SBonitaReadException
-
getNumberOfComments
Description copied from interface:SCommentServiceNumber of all comments related to the specified query options.- Specified by:
getNumberOfCommentsin interfaceSCommentService- Parameters:
options- a QueryOptions object, containing some query conditions- Returns:
- number of all comments corresponding to the criteria.
- Throws:
SBonitaReadException
-
getComments
public List<SComment> getComments(long processInstanceId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:SCommentServiceGet comments for the given processInstance- Specified by:
getCommentsin interfaceSCommentService- 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
-
addComment
public SComment addComment(long processInstanceId, String comment, long userId) throws SCommentAddException Description copied from interface:SCommentServiceAdd a comment on process instance- Specified by:
addCommentin interfaceSCommentService- 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
public SComment addSystemComment(long processInstanceId, String comment) throws SCommentAddException Description copied from interface:SCommentServiceAdd a system comment on process instance- Specified by:
addSystemCommentin interfaceSCommentService- Parameters:
processInstanceId- identifier of processInstancecomment- the comment you want to add- Throws:
SCommentAddException
-
delete
Description copied from interface:SCommentServiceDelete the comment- Specified by:
deletein interfaceSCommentService- Throws:
SCommentDeletionException
-
deleteComments
Description copied from interface:SCommentServiceDelete comments for a specified process instance- Specified by:
deleteCommentsin interfaceSCommentService- Throws:
SBonitaException
-
getNumberOfCommentsSupervisedBy
public long getNumberOfCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:SCommentServiceSearch number of Comment for a specific supervisor- Specified by:
getNumberOfCommentsSupervisedByin interfaceSCommentService- 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
public List<SComment> searchCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:SCommentServiceSearch an Comment for a specific supervisor- Specified by:
searchCommentsSupervisedByin interfaceSCommentService- 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
public long getNumberOfCommentsInvolvingUser(long userId, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:SCommentServiceSearch number of all the comments on process instants that the user can access- Specified by:
getNumberOfCommentsInvolvingUserin interfaceSCommentService- 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
public List<SComment> searchCommentsInvolvingUser(long userId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:SCommentServiceList all the comments on process instants that the user can access- Specified by:
searchCommentsInvolvingUserin interfaceSCommentService- 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
public long getNumberOfCommentsManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:SCommentServiceSearch number of the comments visible by delegates of managerUserId- Specified by:
getNumberOfCommentsManagedByin interfaceSCommentService- 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
public List<SComment> searchCommentsManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:SCommentServiceSearch comments visible by delegates of managerUserId- Specified by:
searchCommentsManagedByin interfaceSCommentService- 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
Description copied from interface:SCommentServiceSearch number of archived Comments- Specified by:
getNumberOfArchivedCommentsin interfaceSCommentService- Throws:
SBonitaReadException
-
searchArchivedComments
public List<SAComment> searchArchivedComments(QueryOptions searchOptions) throws SBonitaReadException Description copied from interface:SCommentServiceSearch archived Comments- Specified by:
searchArchivedCommentsin interfaceSCommentService- Parameters:
searchOptions- a QueryOptions object, containing some query conditions- Returns:
- a list with archived Comments
- Throws:
SBonitaReadException
-
isCommentEnabled
Description copied from interface:SCommentServiceReturning true if the system comments are enabled for the specific SystemCommentType.- Specified by:
isCommentEnabledin interfaceSCommentService- Parameters:
sct- A Enum for system comments- Returns:
- Returning true if the system comments are enabled for the specific SystemCommentType.
-
getArchivedComment
public SAComment getArchivedComment(long archivedCommentId) throws SCommentNotFoundException, SBonitaReadException - Specified by:
getArchivedCommentin interfaceSCommentService- Throws:
SCommentNotFoundExceptionSBonitaReadException
-
deleteArchivedComments
Description copied from interface:SCommentServiceDelete archived comments for specified process instances- Specified by:
deleteArchivedCommentsin interfaceSCommentService- Throws:
SBonitaException
-
archive
- Specified by:
archivein interfaceSCommentService- Throws:
SObjectModificationException
-