public interface ClassificationService
| Modifier and Type | Method and Description |
|---|---|
Classification |
createClassification(Classification classification)
Persists a new classification after adding default values.
|
ClassificationQuery |
createClassificationQuery()
This method provides a query builder for quering the database.
|
void |
deleteClassification(String id)
Delete a classification with all child classifications.
|
void |
deleteClassification(String classificationKey,
String domain)
Delete a classification with all child classifications.
|
Classification |
getClassification(String id)
Get the Classification by id.
|
Classification |
getClassification(String key,
String domain)
Get the Classification for key and domain.
|
Classification |
newClassification(String key,
String domain,
String type)
Creating a new
Classification with unchangeable default values. |
Classification |
updateClassification(Classification classification)
Updates a Classification.
|
Classification getClassification(String key, String domain) throws ClassificationNotFoundException
key - the key of the searched-for classificationsdomain - the domain of the searched-for classificationsClassificationNotFoundException - if no classification is found that matches the key either in domain or in the root domain.Classification getClassification(String id) throws ClassificationNotFoundException
id - the id of the searched-for classificationsClassificationNotFoundException - if no classification is found that matches the id.void deleteClassification(String id) throws ClassificationInUseException, ClassificationNotFoundException, NotAuthorizedException
id - the id of the searched-for classificationsClassificationInUseException - if there are Task existing, which refer to this classification.ClassificationNotFoundException - if for an domain no classification specification is found.NotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINvoid deleteClassification(String classificationKey, String domain) throws ClassificationInUseException, ClassificationNotFoundException, NotAuthorizedException
classificationKey - the key of the classification you want to delete.domain - the domains for which you want to delete the classification. if "", the function tries to delete the
"master domain" classification and any other classification with this key.ClassificationInUseException - if there are Task existing, which refer to this classification.ClassificationNotFoundException - if for an domain no classification specification is found.NotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINClassification createClassification(Classification classification) throws ClassificationAlreadyExistException, NotAuthorizedException, ClassificationNotFoundException, DomainNotFoundException, InvalidArgumentException
classification - the classification to insertClassificationAlreadyExistException - when the classification does already exists at the given domain.NotAuthorizedException - if the current user is not member of role BUSINESS_ADMIN or ADMINClassificationNotFoundException - if the current parentId is not NULL/EMPTY and can not be found.DomainNotFoundException - if the domain does not exist in the configurationInvalidArgumentException - if the ServiceLevel property does not comply with the ISO 8601 specificationClassification updateClassification(Classification classification) throws ClassificationNotFoundException, NotAuthorizedException, ConcurrencyException, InvalidArgumentException
classification - the Classification to updateClassificationNotFoundException - when the classification OR it´s parent does not exist.NotAuthorizedException - when the caller got no ADMIN or BUSINESS_ADMIN permissions.ConcurrencyException - when the Classification was modified meanwhile and is not latest anymore.InvalidArgumentException - if the ServiceLevel property does not comply with the ISO 8601 specificationClassificationQuery createClassificationQuery()
ClassificationQueryClassification newClassification(String key, String domain, String type)
Classification with unchangeable default values. It will be only generated and is not
persisted until CREATE-call.key - the key of the classificationdomain - the domain of the new classificationtype - the type of the new classificationCopyright © 2018. All rights reserved.