public class SCommentServiceImpl extends Object implements SCommentService
COMMENT, COMMMENT_IS_DELETED| Constructor and Description |
|---|
SCommentServiceImpl(Recorder recorder,
ReadPersistenceService persistenceService,
ArchiveService archiveService,
SessionService sessionService,
ReadSessionAccessor sessionAccessor,
Map<SystemCommentType,Boolean> systemCommentType,
EventService eventService) |
| Modifier and Type | Method and Description |
|---|---|
SComment |
addComment(long processInstanceId,
String comment,
long userId)
Add a comment on process instance
|
SComment |
addSystemComment(long processInstanceId,
String comment)
Add a system comment on process instance
|
void |
archive(long archiveDate,
SComment sComment) |
void |
delete(SComment comment)
Delete the comment
|
void |
deleteArchivedComments(long processInstanceId)
Delete archived comments for a specified process instance
|
void |
deleteComments(long processInstanceId)
Delete comments for a specified process instance
|
SAComment |
getArchivedComment(long archivedCommentId) |
List<SComment> |
getComments(long processInstanceId)
Deprecated.
|
List<SComment> |
getComments(long processInstanceId,
QueryOptions queryOptions)
Get comments for the given processInstance
|
long |
getNumberOfArchivedComments(QueryOptions searchOptions)
Search number of archived Comments
|
long |
getNumberOfComments(QueryOptions options)
Number of all comments related to the specified query options.
|
long |
getNumberOfCommentsInvolvingUser(long userId,
QueryOptions searchOptions)
Search number of all the comments on process instants that the user can access
|
long |
getNumberOfCommentsManagedBy(long managerUserId,
QueryOptions searchOptions)
Search number of the comments visible by delegates of managerUserId
|
long |
getNumberOfCommentsSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Search number of Comment for a specific supervisor
|
boolean |
isCommentEnabled(SystemCommentType sct)
Returning true if the system comments are enabled for the specific SystemCommentType.
|
List<SAComment> |
searchArchivedComments(QueryOptions searchOptions)
Search archived Comments
|
List<SComment> |
searchComments(QueryOptions options)
List all comments related to the specified query options.
|
List<SComment> |
searchCommentsInvolvingUser(long userId,
QueryOptions queryOptions)
List all the comments on process instants that the user can access
|
List<SComment> |
searchCommentsManagedBy(long managerUserId,
QueryOptions searchOptions)
Search comments visible by delegates of managerUserId
|
List<SComment> |
searchCommentsSupervisedBy(long supervisorId,
QueryOptions queryOptions)
Search an Comment for a specific supervisor
|
public SCommentServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, ArchiveService archiveService, SessionService sessionService, ReadSessionAccessor sessionAccessor, Map<SystemCommentType,Boolean> systemCommentType, EventService eventService)
public List<SComment> searchComments(QueryOptions options) throws SBonitaReadException
SCommentServicesearchComments in interface SCommentServiceoptions - a QueryOptions object, containing some query conditionsSBonitaReadExceptionpublic long getNumberOfComments(QueryOptions options) throws SBonitaReadException
SCommentServicegetNumberOfComments in interface SCommentServiceoptions - a QueryOptions object, containing some query conditionsSBonitaReadException@Deprecated public List<SComment> getComments(long processInstanceId) throws SBonitaReadException
SCommentServicegetComments in interface SCommentServiceprocessInstanceId - identifier of processInstanceSBonitaReadException - in case of read errorQueryOptions#DEFAULT_NUMBER_OF_RESULTS}public List<SComment> getComments(long processInstanceId, QueryOptions queryOptions) throws SBonitaReadException
SCommentServicegetComments in interface SCommentServiceprocessInstanceId - identifier of processInstancequeryOptions - the query options to filter the resultsSBonitaReadException - in case of read errorpublic SComment addComment(long processInstanceId, String comment, long userId) throws SCommentAddException
SCommentServiceaddComment in interface SCommentServiceprocessInstanceId - identifier of processInstancecomment - the comment you want to adduserId - The user that will be said to have made the commentSCommentAddExceptionpublic SComment addSystemComment(long processInstanceId, String comment) throws SCommentAddException
SCommentServiceaddSystemComment in interface SCommentServiceprocessInstanceId - identifier of processInstancecomment - the comment you want to addSCommentAddExceptionpublic void delete(SComment comment) throws SCommentDeletionException
SCommentServicedelete in interface SCommentServiceSCommentDeletionExceptionpublic void deleteComments(long processInstanceId)
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
SCommentServicedeleteComments in interface SCommentServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic long getNumberOfCommentsSupervisedBy(long supervisorId,
QueryOptions queryOptions)
throws SBonitaReadException
SCommentServicegetNumberOfCommentsSupervisedBy in interface SCommentServicesupervisorId - the identifier of supervisorqueryOptions - a map of specific parameters of a querySBonitaReadException - if a Read exception occurspublic List<SComment> searchCommentsSupervisedBy(long supervisorId, QueryOptions queryOptions) throws SBonitaReadException
SCommentServicesearchCommentsSupervisedBy in interface SCommentServicesupervisorId - the identifier of supervisorqueryOptions - a map of specific parameters of a querySBonitaReadException - if a Read exception occurspublic long getNumberOfCommentsInvolvingUser(long userId,
QueryOptions searchOptions)
throws SBonitaReadException
SCommentServicegetNumberOfCommentsInvolvingUser in interface SCommentServiceuserId - identifier of usersearchOptions - a QueryOptions object, containing some query conditionsSBonitaReadExceptionpublic List<SComment> searchCommentsInvolvingUser(long userId, QueryOptions queryOptions) throws SBonitaReadException
SCommentServicesearchCommentsInvolvingUser in interface SCommentServiceuserId - identifier of userqueryOptions - a QueryOptions object, containing some query conditionsSBonitaReadExceptionpublic long getNumberOfCommentsManagedBy(long managerUserId,
QueryOptions searchOptions)
throws SBonitaReadException
SCommentServicegetNumberOfCommentsManagedBy in interface SCommentServicemanagerUserId - identifier of a manager usersearchOptions - a QueryOptions object, containing some query conditionsSBonitaReadExceptionpublic List<SComment> searchCommentsManagedBy(long managerUserId, QueryOptions searchOptions) throws SBonitaReadException
SCommentServicesearchCommentsManagedBy in interface SCommentServicemanagerUserId - identifier of a manager usersearchOptions - a QueryOptions object, containing some query conditionsSBonitaReadExceptionpublic long getNumberOfArchivedComments(QueryOptions searchOptions) throws SBonitaReadException
SCommentServicegetNumberOfArchivedComments in interface SCommentServiceSBonitaReadExceptionpublic List<SAComment> searchArchivedComments(QueryOptions searchOptions) throws SBonitaReadException
SCommentServicesearchArchivedComments in interface SCommentServicesearchOptions - a QueryOptions object, containing some query conditionsSBonitaReadExceptionpublic boolean isCommentEnabled(SystemCommentType sct)
SCommentServiceisCommentEnabled in interface SCommentServicesct - A Enum for system commentspublic SAComment getArchivedComment(long archivedCommentId) throws SCommentNotFoundException, SBonitaReadException
getArchivedComment in interface SCommentServiceSCommentNotFoundExceptionSBonitaReadExceptionpublic void deleteArchivedComments(long processInstanceId)
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
SCommentServicedeleteArchivedComments in interface SCommentServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void archive(long archiveDate,
SComment sComment)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException
archive in interface SCommentServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionCopyright © 2018 Bonitasoft S.A.. All rights reserved.