Interface SCommentService

  • All Known Implementing Classes:
    SCommentServiceImpl

    public interface SCommentService
    Since:
    6.0
    Author:
    Hongwen Zang, Zhang Bole, Matthieu Chaffotte
    • 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 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,
                                  java.lang.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

        java.util.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

        java.util.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

        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 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

        java.util.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
      • 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
      • deleteArchivedComments

        void deleteArchivedComments​(java.util.List<java.lang.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