com.atlassian.jira.workflow
Class MockWorkflowScheme

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.workflow.WorkflowScheme
WorkflowScheme.Builder<T extends WorkflowScheme.Builder<T>>
 
Constructor Summary
MockWorkflowScheme()
           
MockWorkflowScheme(Long id)
           
MockWorkflowScheme(WorkflowScheme workflowScheme)
           
 
Method Summary
 MockWorkflowScheme clearMappings()
           
 boolean equals(Object o)
           
 String getActualDefaultWorkflow()
          Get the default workflow for the scheme.
 String getActualWorkflow(String issueTypeId)
          Returns the workflow to use given the passed issueTypeId.
 String getConfiguredDefaultWorkflow()
          Return the default workflow as saved in the database.
 String getConfiguredWorkflow(String issueTypeId)
          Return the Workflow for the passed IssueType as saved in the databse.
 Long getId()
          The id of the workflow scheme.
 Map<String,String> getMappings()
          Returns a map of the form issueTypeId -> workflowName.
 int hashCode()
           
 MockWorkflowScheme removeDefault()
           
 MockWorkflowScheme removeMapping(String issueTypeId)
           
 MockWorkflowScheme removeWorkflow(String workflowName)
           
 MockWorkflowScheme setDefaultWorkflow(String workflow)
           
 MockWorkflowScheme setId(Long id)
           
 MockWorkflowScheme setMapping(String issueType, String workflow)
           
 MockWorkflowScheme setMappings(Map<String,String> workflowMap)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.workflow.WorkflowScheme
getDescription, getName, isDefault, isDraft
 

Constructor Detail

MockWorkflowScheme

public MockWorkflowScheme()

MockWorkflowScheme

public MockWorkflowScheme(Long id)

MockWorkflowScheme

public MockWorkflowScheme(WorkflowScheme workflowScheme)
Method Detail

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


Copyright © 2002-2014 Atlassian. All Rights Reserved.