public class SCommentServiceImpl extends java.lang.Object implements SCommentService
COMMENT, COMMMENT_IS_DELETED| Constructor and Description |
|---|
SCommentServiceImpl(Recorder recorder,
ReadPersistenceService persistenceService,
ArchiveService archiveService,
SessionService sessionService,
ReadSessionAccessor sessionAccessor,
java.util.Map<SystemCommentType,java.lang.Boolean> systemCommentType) |
| Modifier and Type | Method and Description |
|---|---|
SComment |
addComment(long processInstanceId,
java.lang.String comment,
long userId)
Add a comment on process instance
|
SComment |
addSystemComment(long processInstanceId,
java.lang.String comment)
Add a system comment on process instance
|
void |
archive(long archiveDate,
SComment sComment) |
void |
delete(SComment comment)
Delete the comment
|
void |
deleteArchivedComments(java.util.List<java.lang.Long> processInstanceIds)
Delete archived comments for specified process instances
|
void |
deleteComments(long processInstanceId)
Delete comments for a specified process instance
|
SAComment |
getArchivedComment(long archivedCommentId) |
java.util.List<SComment> |
getComments(long processInstanceId)
Deprecated.
|
java.util.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.
|
java.util.List<SAComment> |
searchArchivedComments(QueryOptions searchOptions)
Search archived Comments
|
java.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 access
|
java.util.List<SComment> |
searchCommentsManagedBy(long managerUserId,
QueryOptions searchOptions)
Search comments visible by delegates of managerUserId
|
java.util.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, java.util.Map<SystemCommentType,java.lang.Boolean> systemCommentType)
public java.util.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 java.util.List<SComment> getComments(long processInstanceId) throws SBonitaReadException
SCommentServicegetComments in interface SCommentServiceprocessInstanceId - identifier of processInstanceSBonitaReadException - in case of read errorQueryOptions#DEFAULT_NUMBER_OF_RESULTS}public java.util.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, java.lang.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, java.lang.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 SBonitaException
SCommentServicedeleteComments in interface SCommentServiceSBonitaExceptionpublic 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 java.util.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 java.util.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 java.util.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 java.util.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(java.util.List<java.lang.Long> processInstanceIds)
throws SBonitaException
SCommentServicedeleteArchivedComments in interface SCommentServiceSBonitaExceptionpublic void archive(long archiveDate,
SComment sComment)
throws SObjectModificationException
archive in interface SCommentServiceSObjectModificationException