Klasse WorkflowMgr

java.lang.Object
de.dlr.proseo.procmgr.rest.WorkflowMgr

@Component @Transactional(isolation=REPEATABLE_READ) public class WorkflowMgr extends Object
Service methods required to create, modify and delete workflows in the prosEO database, and to query the database about such workflows
Autor:
Katharina Bassler
  • Felddetails

    • rtb

      @Autowired org.springframework.boot.web.client.RestTemplateBuilder rtb
      REST template builder
    • config

      The processor manager configuration
  • Konstruktordetails

    • WorkflowMgr

      public WorkflowMgr()
  • Methodendetails

    • countWorkflows

      public String countWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled)
      Count the workflows matching the specified workflowName, workflowVersion, inputProductClass, or configured processor.
      Parameter:
      missionCode - the mission code
      workflowName - the workflow name
      workflowVersion - the workflow version
      inputProductClass - the input product class
      configuredProcessor - the configured processor
      enabled - whether the workflow is enabled
      Gibt zurück:
      the number of workflows found as string
      Löst aus:
      SecurityException - if a cross-mission data access was attempted
    • createWorkflow

      public RestWorkflow createWorkflow(RestWorkflow restWorkflow) throws IllegalArgumentException, SecurityException
      Create a new workflow
      Parameter:
      restWorkflow - a Json representation of the new workflow
      Gibt zurück:
      a Json representation of the workflow after creation (with ID and version number)
      Löst aus:
      IllegalArgumentException - if any of the input data was invalid
      SecurityException - if a cross-mission data access was attempted
    • deleteWorkflowById

      public void deleteWorkflowById(Long id) throws javax.persistence.EntityNotFoundException, SecurityException, IllegalArgumentException, RuntimeException
      Delete a workflow by ID
      Parameter:
      id - the ID of the workflow to delete
      Löst aus:
      javax.persistence.EntityNotFoundException - if the workflow to delete does not exist in the database
      RuntimeException - if the deletion was not performed as expected
      IllegalArgumentException - if the ID of the workflow to delete was not given, or if dependent objects exist
      SecurityException - if a cross-mission data access was attempted
    • getWorkflowById

      public RestWorkflow getWorkflowById(Long id) throws IllegalArgumentException, javax.persistence.NoResultException, SecurityException
      Get a workflow by ID
      Parameter:
      id - the workflow ID
      Gibt zurück:
      a Json object corresponding to the workflow found
      Löst aus:
      IllegalArgumentException - if no workflow ID was given
      javax.persistence.NoResultException - if no workflow with the given ID exists
      SecurityException - if a cross-mission data access was attempted
    • modifyWorkflow

      public RestWorkflow modifyWorkflow(Long id, RestWorkflow restWorkflow) throws javax.persistence.EntityNotFoundException, IllegalArgumentException, SecurityException, ConcurrentModificationException
      Update a workflow by ID
      Parameter:
      id - the ID of the workflow to update
      restWorkflow - a Json object containing the modified (and unmodified) attributes
      Gibt zurück:
      a response containing a Json object corresponding to the workflow after modification (with ID and version for all contained objects)
      Löst aus:
      javax.persistence.EntityNotFoundException - if no workflow with the given ID exists
      IllegalArgumentException - if any of the input data was invalid
      SecurityException - if a cross-mission data access was attempted
      ConcurrentModificationException - if the workflow has been modified since retrieval by the client
    • getWorkflows

      public List<RestWorkflow> getWorkflows(String missionCode, String workflowName, String workflowVersion, String inputProductClass, String configuredProcessor, Boolean enabled, Integer recordFrom, Integer recordTo) throws javax.persistence.NoResultException, SecurityException
      Get workflows by mission, name and version (user-defined version, not database version)
      Parameter:
      missionCode - the mission code
      workflowName - the name of the workflow (class)
      workflowVersion - the workflow version
      inputProductClass - the input product class
      configuredProcessor - the configured processor
      enabled - whether the workflow is enabled
      recordFrom - first record of filtered and ordered result to return
      recordTo - last record of filtered and ordered result to return
      Gibt zurück:
      a list of Json objects representing workflows satisfying the search criteria
      Löst aus:
      javax.persistence.NoResultException - if no workflows matching the given search criteria could be found
      SecurityException - if a cross-mission data access was attempted