Interface Workflows

All Known Implementing Classes:
WorkflowsImpl

@Internal public interface Workflows
  • Method Details

    • getMutableWorkflow

      ServiceOutcome<Workflow> getMutableWorkflow(String workflowName)
      Get a workflow that can be changed.
      Parameters:
      workflowName - The workflow's name.
      Returns:
      A mutable version of the requested workflow or an error message.
    • getMutableWorkflowWithoutValidation

      Workflow getMutableWorkflowWithoutValidation(String workflowName)
      Gets a mutable workflow with no validation applied to it. This will either return the workflow or null if not found.
      Parameters:
      workflowName -
      Returns:
      Workflow
    • saveWorkflow

      ServiceOutcome<Workflow> saveWorkflow(Workflow workflow)
      Save changes that have been made to a workflow and return a ServiceOutcome.
      Parameters:
      workflow - The workflow to save.
      Returns:
      A ServiceOutcome containing value or an error message.
    • discardDraft

      ServiceOutcome<Void> discardDraft(String workflowName)
      Discard the draft for the specified workflow. If no draft existed for the specified workflow, it will treat the operation as successful.
      Parameters:
      workflowName - The name of the workflow of which the draft should be deleted.
      Returns:
      A ServiceOutcome containing null or an error message in case of failure.
    • getWorkflow

      Workflow getWorkflow(boolean isDraft, String workflowName)
      Get the workflow specified by the supplied name in the state specified by isDraft. If workflow exists and isDraft is true, draft workflow will be created when draft does not already exist.
      Parameters:
      isDraft - whether the draft workflow should be returned. If true, a draft will be created if it does not already exist
      workflowName - the name of the workflow
      Returns:
      A workflow object or null if the workflow could not be found.
    • getDraftWorkflow

      Workflow getDraftWorkflow(String workflowName)
      Retrieves a draft workflow with the given name.
      Parameters:
      workflowName - The workflow's name.
      Returns:
      the draft workflow iff a draft workflow with name workflowName exists. Returns null if no draft workflow with this name found.
    • workflowExists

      boolean workflowExists(boolean isDraft, String workflowName)
      Determine if a workflow with the given name exists. If workflow exists and isDraft is true, draft workflow will be created when it does not already exist.
      Parameters:
      isDraft - Whether the workflow is a draft. If true, a draft will be created if it does not already exist
      workflowName - The workflow's name.
      Returns:
      true iff a workflow named workflowName exists.
    • workflowIsEditable

      boolean workflowIsEditable(boolean isDraft, String workflowName)
      Determine if a workflow with the given name is editable. Non-existing workflow is considered non-editable.
      Parameters:
      isDraft - Whether the workflow is a draft.
      workflowName - The workflow's name.
      Returns:
      true iff a workflow named workflowName is editable.
    • publishDraft

      ServiceOutcome<Workflow> publishDraft(String parentWorkflowName)
      Publish a draft workflow.
      Parameters:
      parentWorkflowName - The parent workflow name that will be overwritten with its draft workflow.
      Returns:
      ServiceOutcome The workflow that was published or an error message.
    • getClone

      Workflow getClone(String workflowName)
      Get a clone of workflow. This does nothing to any existing drafts.
      Parameters:
      workflowName -
      Returns:
    • getWorkflow

      Workflow getWorkflow(@Nullable JiraWorkflow mutableWorkflow)
      Returns Workflow from mutable JiraWorkflow
      Parameters:
      mutableWorkflow -
      Returns:
      Workflow for passed mutableWorkflow or null if passed mutableWorkflow is null