Class ClassificationDefinitionController

java.lang.Object
pro.taskana.classification.rest.ClassificationDefinitionController

@RestController @EnableHypermediaSupport(type=HAL) public class ClassificationDefinitionController extends Object
Controller for Importing / Exporting classifications.
  • Method Details

    • exportClassifications

      @GetMapping(path="/api/v1/classification-definitions") @Transactional(readOnly=true, rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<ClassificationDefinitionCollectionRepresentationModel> exportClassifications(@RequestParam(value="domain",required=false) String[] domain)
      This endpoint exports all configured Classifications.
      Parameters:
      domain - Filter the export by domain
      Returns:
      the configured Classifications.
    • importClassifications

      @PostMapping(path="/api/v1/classification-definitions") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<Void> importClassifications(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) throws pro.taskana.common.api.exceptions.InvalidArgumentException, pro.taskana.common.api.exceptions.ConcurrencyException, pro.taskana.classification.api.exceptions.ClassificationNotFoundException, pro.taskana.classification.api.exceptions.ClassificationAlreadyExistException, pro.taskana.common.api.exceptions.DomainNotFoundException, IOException, pro.taskana.classification.api.exceptions.MalformedServiceLevelException, pro.taskana.common.api.exceptions.NotAuthorizedException
      This endpoint imports all Classifications. Existing Classifications will not be removed. Existing Classifications with the same key/domain will be overridden.
      Parameters:
      file - the file containing the Classifications which should be imported.
      Returns:
      nothing
      Throws:
      pro.taskana.common.api.exceptions.InvalidArgumentException - if any Classification within the import file is invalid
      pro.taskana.common.api.exceptions.NotAuthorizedException - if the current user is not authorized to import Classifications
      pro.taskana.common.api.exceptions.ConcurrencyException - TODO: this makes no sense
      pro.taskana.classification.api.exceptions.ClassificationNotFoundException - TODO: this makes no sense
      pro.taskana.classification.api.exceptions.ClassificationAlreadyExistException - TODO: this makes no sense
      pro.taskana.common.api.exceptions.DomainNotFoundException - if the domain for a specific Classification does not exist
      IOException - if the import file could not be parsed
      pro.taskana.classification.api.exceptions.MalformedServiceLevelException - if the serviceLevel property does not comply * with the ISO 8601 specification