Interface SCommentService

All Known Implementing Classes:
SCommentServiceImpl

public interface SCommentService
Since:
6.0
Author:
Hongwen Zang, Zhang Bole, Matthieu Chaffotte
  • Field Details

  • Method Details

    • searchComments

      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, String comment, long userId) throws SCommentAddException
      Add a comment on process instance
      Parameters:
      processInstanceId - identifier of processInstance
      comment - the comment you want to add
      userId - The user that will be said to have made the comment
      Throws:
      SCommentAddException
    • addSystemComment

      SComment addSystemComment(long processInstanceId, String comment) throws SCommentAddException
      Add a system comment on process instance
      Parameters:
      processInstanceId - identifier of processInstance
      comment - 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 processInstance
      queryOptions - 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 supervisor
      queryOptions - 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 supervisor
      queryOptions - 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 user
      searchOptions - 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 user
      queryOptions - 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 user
      searchOptions - 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 user
      searchOptions - 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

      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:
      SCommentNotFoundException
      SBonitaReadException
    • deleteArchivedComments

      void deleteArchivedComments(List<Long> processInstanceIds) throws SBonitaException
      Delete archived comments for specified process instances
      Parameters:
      processInstanceIds -
      Throws:
      SBonitaException
    • deleteComments

      void deleteComments(long processInstanceId) throws SBonitaException
      Delete 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