public class ClassificationServiceImpl extends Object implements 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 classificationId)
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.
|
public Classification createClassification(Classification classification) throws ClassificationAlreadyExistException, NotAuthorizedException, DomainNotFoundException, InvalidArgumentException
ClassificationServicecreateClassification in interface ClassificationServiceclassification - 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 ADMINDomainNotFoundException - if the domain does not exist in the configurationInvalidArgumentException - if the ServiceLevel property does not comply with the ISO 8601 specificationpublic Classification updateClassification(Classification classification) throws NotAuthorizedException, ConcurrencyException, ClassificationNotFoundException, InvalidArgumentException
ClassificationServiceupdateClassification in interface ClassificationServiceclassification - the Classification to updateNotAuthorizedException - when the caller got no ADMIN or BUSINESS_ADMIN permissions.ConcurrencyException - when the Classification was modified meanwhile and is not latest anymore.ClassificationNotFoundException - when the classification OR it´s parent does not exist.InvalidArgumentException - if the ServiceLevel property does not comply with the ISO 8601 specificationpublic Classification getClassification(String id) throws ClassificationNotFoundException
ClassificationServicegetClassification in interface ClassificationServiceid - the id of the searched-for classificationsClassificationNotFoundException - if no classification is found that matches the id.public Classification getClassification(String key, String domain) throws ClassificationNotFoundException
ClassificationServicegetClassification in interface ClassificationServicekey - 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 master domain.public ClassificationQuery createClassificationQuery()
ClassificationServicecreateClassificationQuery in interface ClassificationServiceClassificationQuerypublic Classification newClassification(String key, String domain, String type)
ClassificationServiceClassification with unchangeable default values. It will be only generated and is not
persisted until CREATE-call.newClassification in interface ClassificationServicekey - the key of the classificationdomain - the domain of the new classificationtype - the type of the new classificationpublic void deleteClassification(String classificationKey, String domain) throws ClassificationInUseException, ClassificationNotFoundException, NotAuthorizedException
ClassificationServicedeleteClassification in interface ClassificationServiceclassificationKey - 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 ADMINpublic void deleteClassification(String classificationId) throws ClassificationInUseException, ClassificationNotFoundException, NotAuthorizedException
ClassificationServicedeleteClassification in interface ClassificationServiceclassificationId - 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 ADMINCopyright © 2019. All rights reserved.