Class MockWorkflowScheme

java.lang.Object
com.atlassian.jira.workflow.MockWorkflowScheme
All Implemented Interfaces:
WorkflowScheme
Direct Known Subclasses:
MockAssignableWorkflowScheme, MockDraftWorkflowScheme

public abstract class MockWorkflowScheme extends Object implements WorkflowScheme
Since:
v5.2
  • Constructor Details

    • MockWorkflowScheme

      public MockWorkflowScheme()
    • MockWorkflowScheme

      public MockWorkflowScheme(Long id)
    • MockWorkflowScheme

      public MockWorkflowScheme(WorkflowScheme workflowScheme)
  • Method Details

    • getId

      public Long getId()
      Description copied from interface: WorkflowScheme
      The id of the workflow scheme. Will only be null when not stored.
      Specified by:
      getId in interface WorkflowScheme
      Returns:
      the id of the workflow scheme.
    • getActualWorkflow

      @Nonnull public String getActualWorkflow(String issueTypeId)
      Description copied from interface: WorkflowScheme
      Returns the workflow to use given the passed issueTypeId.
      Specified by:
      getActualWorkflow in interface WorkflowScheme
      Parameters:
      issueTypeId - the issue type.
      Returns:
      the workflow associated with the passed issue type. Never null.
    • getActualDefaultWorkflow

      @Nonnull public String getActualDefaultWorkflow()
      Description copied from interface: WorkflowScheme
      Get the default workflow for the scheme. Never null.
      Specified by:
      getActualDefaultWorkflow in interface WorkflowScheme
      Returns:
      the default workflow for the scheme.
    • getMappings

      @Nonnull public Map<String,String> getMappings()
      Description copied from interface: WorkflowScheme
      Returns a map of the form issueTypeId -> workflowName. The null issueTypeId is used to hold the value of the default workflow (if configured).
      Specified by:
      getMappings in interface WorkflowScheme
      Returns:
      Returns a map of the form issueTypeId -> workflowName.
    • getConfiguredDefaultWorkflow

      public String getConfiguredDefaultWorkflow()
      Description copied from interface: WorkflowScheme
      Return the default workflow as saved in the database. Can return null if no default is stored.
      Specified by:
      getConfiguredDefaultWorkflow in interface WorkflowScheme
      Returns:
      the default workflow as configured in the database or null if no such default is configured.
    • getConfiguredWorkflow

      public String getConfiguredWorkflow(String issueTypeId)
      Description copied from interface: WorkflowScheme
      Return the Workflow for the passed IssueType as saved in the databse. Can return null if no Workflow is associated with the passed IssueType.
      Specified by:
      getConfiguredWorkflow in interface WorkflowScheme
      Returns:
      the Workflow associated with the passed workflow.
    • setId

      public MockWorkflowScheme setId(Long id)
    • setMappings

      public MockWorkflowScheme setMappings(Map<String,String> workflowMap)
    • setMapping

      public MockWorkflowScheme setMapping(String issueType, String workflow)
    • setDefaultWorkflow

      public MockWorkflowScheme setDefaultWorkflow(String workflow)
    • clearMappings

      public MockWorkflowScheme clearMappings()
    • removeMapping

      public MockWorkflowScheme removeMapping(String issueTypeId)
    • removeDefault

      public MockWorkflowScheme removeDefault()
    • removeWorkflow

      public MockWorkflowScheme removeWorkflow(String workflowName)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object