Interface CategoryService

  • All Known Implementing Classes:
    CategoryServiceImpl

    public interface CategoryService
    Since:
    6.0
    Author:
    Yanyan Liu, Matthieu Chaffotte, Celine Souchet
    • Method Detail

      • getCategoryByName

        SCategory getCategoryByName​(java.lang.String name)
                             throws SCategoryNotFoundException
        Get category by its name
        Parameters:
        name - Name of the category
        Returns:
        a category object
        Throws:
        SCategoryNotFoundException - Error thrown if no category have a name corresponding to the parameter.
      • getNumberOfCategories

        long getNumberOfCategories()
                            throws SCategoryException
        Get the total number of categories
        Returns:
        The total number of Categories
        Throws:
        SCategoryException
      • getCategories

        java.util.List<SCategory> getCategories​(int fromIndex,
                                                int numberOfCategories,
                                                java.lang.String field,
                                                OrderByType order)
                                         throws SPageOutOfRangeException,
                                                SCategoryException
        Retrieves a list of categories, The returned list is paginated
        Parameters:
        fromIndex - Index of the record to be returned. First record has index 0.
        numberOfCategories - Number of categories per page. Maximum number of categories returned.
        field - The field used by the list order
        order - ASC or DESC
        Returns:
        The list of category objects
        Throws:
        SPageOutOfRangeException - Error thrown if page is out of the range.
        SCategoryException - Error thrown if has exception during the category retrieve
      • getNumberOfCategoriesOfProcess

        long getNumberOfCategoriesOfProcess​(long processDefinitionId)
                                     throws SCategoryException
        Get number of categories of the specific process definition
        Parameters:
        processDefinitionId - Identifier of the process definition
        Returns:
        number of categories
        Throws:
        SCategoryException - Error thrown if has exception during the category number retrieve action
      • getCategoriesOfProcessDefinition

        java.util.List<SCategory> getCategoriesOfProcessDefinition​(long processId,
                                                                   int fromIndex,
                                                                   int numberOfCategories,
                                                                   OrderByType order)
                                                            throws SCategoryException,
                                                                   SIndexOutOfRangeException
        Get categories for specific process definition, the result list is paginated
        Parameters:
        processId - Identifier of the process definition
        fromIndex - Start index of satisfied record
        numberOfCategories - Number of categories per page. Maximum number of categories returned.
        order - Criterion for order, default order by name
        Returns:
        The matching list of category
        Throws:
        SCategoryException - Error thrown if has exception during the category retrieve action
        SIndexOutOfRangeException - Error thrown if index is out of the range.
      • getNumberOfCategorizedProcessIds

        long getNumberOfCategorizedProcessIds​(java.util.List<java.lang.Long> processIds)
                                       throws SCategoryException
        Get number of categorized processes
        Parameters:
        processIds - Identifier of the process definition
        Returns:
        the number of categorized processes
        Throws:
        SCategoryException
      • getNumberOfProcessDeploymentInfosOfCategory

        long getNumberOfProcessDeploymentInfosOfCategory​(long categoryId)
                                                  throws SBonitaReadException
        Get the number of process definition for specific category
        Parameters:
        categoryId - Identifier of the category
        Returns:
        The number of process definition for specific category
        Throws:
        SCategoryNotFoundException - Error thrown if no category have an id corresponding to the parameter.
        SCategoryException - Error thrown if has exception during the process definition id retrieve
        SBonitaReadException
      • removeCategoriesFromProcessDefinition

        void removeCategoriesFromProcessDefinition​(long processId,
                                                   java.util.List<java.lang.Long> categoryIds)
                                            throws SCategoryException
        Remove specific categories for specific process definition
        Parameters:
        processId - Identifier of the process definition
        categoryIds - Identifiers of the categories
        Throws:
        SCategoryException
      • getCategoriesUnrelatedToProcessDefinition

        java.util.List<SCategory> getCategoriesUnrelatedToProcessDefinition​(long processDefinitionId,
                                                                            int fromIndex,
                                                                            int numberOfCategories,
                                                                            OrderByType order)
                                                                     throws SCategoryException
        Get categories not attached for specific process definition, the result list is paginated
        Parameters:
        processDefinitionId -
        fromIndex -
        numberOfCategories -
        order -
        Returns:
        The matching list of category
        Throws:
        SCategoryException
      • getNumberOfCategoriesUnrelatedToProcess

        long getNumberOfCategoriesUnrelatedToProcess​(long processDefinitionId)
                                              throws SCategoryException
        Get number of categories not attached of the specific process definition
        Parameters:
        processDefinitionId -
        Returns:
        number of categories
        Throws:
        SCategoryException - Error thrown if has exception during the category number retrieve action
      • deleteProcessCategoryMappings

        long deleteProcessCategoryMappings​(java.util.List<SProcessCategoryMapping> mappings)
        Parameters:
        mappings -
        Returns:
        Number of deleted category mapping
        Since:
        6.1