public interface CategoryService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CATEGORY |
| Modifier and Type | Method and Description |
|---|---|
void |
addProcessDefinitionsToCategory(long categoryId,
java.util.List<java.lang.Long> processDefinitionIds)
Add process definitions to a category
|
void |
addProcessDefinitionToCategory(long categoryId,
long processDefinitionId)
Add a process definition to a category
|
SCategory |
createCategory(java.lang.String name,
java.lang.String description)
Create a category by give name and description
|
void |
deleteCategory(long categoryId)
Delete a category by its id
|
long |
deleteProcessCategoryMappings(java.util.List<SProcessCategoryMapping> mappings) |
java.util.List<SCategory> |
getCategories(int fromIndex,
int numberOfCategories,
java.lang.String field,
OrderByType order)
Retrieves a list of categories, The returned list is paginated
|
java.util.List<SCategory> |
getCategoriesOfProcessDefinition(long processId,
int fromIndex,
int numberOfCategories,
OrderByType order)
Get categories for specific process definition, the result list is paginated
|
java.util.List<SCategory> |
getCategoriesUnrelatedToProcessDefinition(long processDefinitionId,
int fromIndex,
int numberOfCategories,
OrderByType order)
Get categories not attached for specific process definition, the result list is paginated
|
SCategory |
getCategory(long id)
Get category by its id
|
SCategory |
getCategoryByName(java.lang.String name)
Get category by its name
|
long |
getNumberOfCategories()
Get the total number of categories
|
long |
getNumberOfCategoriesOfProcess(long processDefinitionId)
Get number of categories of the specific process definition
|
long |
getNumberOfCategoriesUnrelatedToProcess(long processDefinitionId)
Get number of categories not attached of the specific process definition
|
long |
getNumberOfCategorizedProcessIds(java.util.List<java.lang.Long> processIds)
Get number of categorized processes
|
long |
getNumberOfProcessDeploymentInfosOfCategory(long categoryId)
Get the number of process definition for specific category
|
void |
removeCategoriesFromProcessDefinition(long processId,
java.util.List<java.lang.Long> categoryIds)
Remove specific categories for specific process definition
|
java.util.List<SProcessCategoryMapping> |
searchProcessCategoryMappings(QueryOptions queryOptions)
Search process category mappings corresponding to criteria
|
void |
updateCategory(long categoryId,
EntityUpdateDescriptor descriptor)
Update a category by its id
|
static final java.lang.String CATEGORY
SCategory createCategory(java.lang.String name, java.lang.String description) throws SCategoryAlreadyExistsException, SCategoryCreationException
name - The name of categorydescription - The description of categorySCategoryAlreadyExistsException - Error thrown if category is already existSCategoryCreationException - Error thrown if has exceptions during the category creation.SCategory getCategory(long id) throws SCategoryNotFoundException
id - Identifier of the categorySCategoryNotFoundException - Error thrown if no category have an id corresponding to the parameter.SCategory getCategoryByName(java.lang.String name) throws SCategoryNotFoundException
name - Name of the categorySCategoryNotFoundException - Error thrown if no category have a name corresponding to the parameter.void updateCategory(long categoryId,
EntityUpdateDescriptor descriptor)
throws SCategoryNotFoundException,
SCategoryException
categoryId - Identifier of the categorynewCategory - An category object used to update the categoryId specified categorySCategoryNotFoundException - Error thrown if no category have an id corresponding to the parameter.SCategoryException - Error thrown if has exception during the category updatevoid deleteCategory(long categoryId)
throws SCategoryNotFoundException,
SCategoryDeletionException
categoryId - Identifier of the categorySCategoryNotFoundException - Error thrown if no category have an id corresponding to the parameter.SCategoryDeletionException - Error thrown if has exception during the category deletionlong getNumberOfCategories()
throws SCategoryException
SCategoryExceptionjava.util.List<SCategory> getCategories(int fromIndex, int numberOfCategories, java.lang.String field, OrderByType order) throws SPageOutOfRangeException, SCategoryException
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 orderorder - ASC or DESCSPageOutOfRangeException - Error thrown if page is out of the range.SCategoryException - Error thrown if has exception during the category retrievevoid addProcessDefinitionToCategory(long categoryId,
long processDefinitionId)
throws SCategoryNotFoundException,
SCategoryInProcessAlreadyExistsException,
SCategoryException
categoryId - Identifier of the categoryprocessDefinitionId - Identifier of the process definitionSCategoryNotFoundException - Error thrown if no category have an id corresponding to the parameter.SCategoryException - Error thrown if has exception during the adding actionSCategoryInProcessAlreadyExistsExceptionvoid addProcessDefinitionsToCategory(long categoryId,
java.util.List<java.lang.Long> processDefinitionIds)
throws SCategoryNotFoundException,
SCategoryException,
SCategoryInProcessAlreadyExistsException
categoryId - Identifier of the categoryprocessDefinitionIds - Identifier of the process definitionSCategoryNotFoundException - Error thrown if no category have an id corresponding to the parameter.SCategoryException - Error thrown if has exception during the adding actionSCategoryInProcessAlreadyExistsExceptionlong getNumberOfCategoriesOfProcess(long processDefinitionId)
throws SCategoryException
processDefinitionId - Identifier of the process definitionSCategoryException - Error thrown if has exception during the category number retrieve actionjava.util.List<SCategory> getCategoriesOfProcessDefinition(long processId, int fromIndex, int numberOfCategories, OrderByType order) throws SCategoryException, SIndexOutOfRangeException
processId - Identifier of the process definitionfromIndex - Start index of satisfied recordnumberOfCategories - Number of categories per page. Maximum number of categories returned.order - Criterion for order, default order by nameSCategoryException - Error thrown if has exception during the category retrieve actionSIndexOutOfRangeException - Error thrown if index is out of the range.long getNumberOfCategorizedProcessIds(java.util.List<java.lang.Long> processIds)
throws SCategoryException
processIds - Identifier of the process definitionSCategoryExceptionlong getNumberOfProcessDeploymentInfosOfCategory(long categoryId)
throws SBonitaReadException
categoryId - Identifier of the categorySCategoryNotFoundException - Error thrown if no category have an id corresponding to the parameter.SCategoryException - Error thrown if has exception during the process definition id retrieveSBonitaReadExceptionvoid removeCategoriesFromProcessDefinition(long processId,
java.util.List<java.lang.Long> categoryIds)
throws SCategoryException
processId - Identifier of the process definitioncategoryIds - Identifiers of the categoriesSCategoryExceptionjava.util.List<SCategory> getCategoriesUnrelatedToProcessDefinition(long processDefinitionId, int fromIndex, int numberOfCategories, OrderByType order) throws SCategoryException
processDefinitionId - fromIndex - numberOfCategories - order - SCategoryExceptionlong getNumberOfCategoriesUnrelatedToProcess(long processDefinitionId)
throws SCategoryException
processDefinitionId - SCategoryException - Error thrown if has exception during the category number retrieve actionjava.util.List<SProcessCategoryMapping> searchProcessCategoryMappings(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - SBonitaReadExceptionlong deleteProcessCategoryMappings(java.util.List<SProcessCategoryMapping> mappings)
mappings -