public class ClassificationServiceImpl extends Object implements ClassificationService
| Constructor and Description |
|---|
ClassificationServiceImpl(TaskanaEngine taskanaEngine,
ClassificationMapper classificationMapper) |
| 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 classificationKey,
String domain)
Delete a classification with all child classifications.
|
List<ClassificationSummary> |
getAllClassifications(String key,
String domain)
Get all ClassificationSummaries with the given key.
|
Classification |
getClassification(String key,
String domain)
Get the Classification for key and domain.
|
List<ClassificationSummary> |
getClassificationTree()
Get all available Classification summaries as a tree.
|
Classification |
newClassification(String domain,
String key,
String type)
Creating a new
Classification with unchangeable default values. |
Classification |
updateClassification(Classification classification)
Update a Classification.
|
public ClassificationServiceImpl(TaskanaEngine taskanaEngine, ClassificationMapper classificationMapper)
public List<ClassificationSummary> getClassificationTree()
ClassificationServicegetClassificationTree in interface ClassificationServicepublic Classification createClassification(Classification classification) throws ClassificationAlreadyExistException
ClassificationServicecreateClassification in interface ClassificationServiceclassification - the classification to insertClassificationAlreadyExistException - when the classification does already exists at the given domain.public Classification updateClassification(Classification classification)
ClassificationServiceupdateClassification in interface ClassificationServiceclassification - the Classification to updatepublic List<ClassificationSummary> getAllClassifications(String key, String domain)
ClassificationServicegetAllClassifications in interface ClassificationServicekey - the key of the searched-for classificationsdomain - the domain of the searched-for classificationspublic 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 root domain.public ClassificationQuery createClassificationQuery()
ClassificationServicecreateClassificationQuery in interface ClassificationServiceClassificationQuerypublic Classification newClassification(String domain, String key, String type)
ClassificationServiceClassification with unchangeable default values. It will be only generated and is not
persisted until CREATE-call.newClassification in interface ClassificationServicedomain - the domain of the new classificationkey - the key of the classificationtype - the type of the new classificationpublic void deleteClassification(String classificationKey, String domain) throws ClassificationInUseException, ClassificationNotFoundException
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.Copyright © 2018. All rights reserved.