com.atlassian.jira.workflow
Class MockAssignableWorkflowScheme.MockBuilder

java.lang.Object
  extended by com.atlassian.jira.workflow.MockAssignableWorkflowScheme.MockBuilder
All Implemented Interfaces:
AssignableWorkflowScheme.Builder, WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Enclosing class:
MockAssignableWorkflowScheme

public static class MockAssignableWorkflowScheme.MockBuilder
extends Object
implements AssignableWorkflowScheme.Builder


Constructor Summary
MockAssignableWorkflowScheme.MockBuilder(AssignableWorkflowScheme ws)
           
 
Method Summary
 MockAssignableWorkflowScheme build()
           
 MockAssignableWorkflowScheme.MockBuilder clearMappings()
          Remove all the mappings currently stored in the builder.
 String getDefaultWorkflow()
           
 String getDescription()
           
 Long getId()
           
 String getMapping(String issueTypeId)
           
 Map<String,String> getMappings()
           
 String getName()
           
 boolean isDefault()
           
 boolean isDraft()
           
 MockAssignableWorkflowScheme.MockBuilder removeDefault()
          Remove the default mapping from the scheme.
 MockAssignableWorkflowScheme.MockBuilder removeMapping(String issueTypeId)
          Remove the mapping for the passed issue type from the scheme.
 AssignableWorkflowScheme.Builder removeWorkflow(String workflowName)
          Remove all explicit references to the passed workflow from the scheme.
 MockAssignableWorkflowScheme.MockBuilder setDefaultWorkflow(String workflowName)
          Set the default workflow for the scheme.
 AssignableWorkflowScheme.Builder setDescription(String description)
          Set the description of the workflow scheme.
 MockAssignableWorkflowScheme.MockBuilder setMapping(String issueTypeId, String workflowName)
          Set the workflow for the passed issue type.
 MockAssignableWorkflowScheme.MockBuilder setMappings(Map<String,String> mappings)
          Set the workflow map for the scheme.
 AssignableWorkflowScheme.Builder setName(String name)
          Set the name of the worklflow scheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockAssignableWorkflowScheme.MockBuilder

public MockAssignableWorkflowScheme.MockBuilder(AssignableWorkflowScheme ws)
Method Detail

setName

@Nonnull
public AssignableWorkflowScheme.Builder setName(@Nonnull
                                                        String name)
Description copied from interface: AssignableWorkflowScheme.Builder
Set the name of the worklflow scheme.

Specified by:
setName in interface AssignableWorkflowScheme.Builder
Parameters:
name - the name of the workflow scheme.
Returns:
the builder.

setDescription

@Nonnull
public AssignableWorkflowScheme.Builder setDescription(String description)
Description copied from interface: AssignableWorkflowScheme.Builder
Set the description of the workflow scheme.

Specified by:
setDescription in interface AssignableWorkflowScheme.Builder
Parameters:
description - the description of the workflow scheme.
Returns:
the builder.

build

@Nonnull
public MockAssignableWorkflowScheme build()
Specified by:
build in interface AssignableWorkflowScheme.Builder

getDefaultWorkflow

public String getDefaultWorkflow()
Specified by:
getDefaultWorkflow in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

getMapping

public String getMapping(@Nonnull
                         String issueTypeId)
Specified by:
getMapping in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

getMappings

public Map<String,String> getMappings()
Specified by:
getMappings in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

getId

public Long getId()
Specified by:
getId in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

isDraft

public boolean isDraft()
Specified by:
isDraft in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

isDefault

public boolean isDefault()
Specified by:
isDefault in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

getDescription

public String getDescription()
Specified by:
getDescription in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

getName

public String getName()
Specified by:
getName in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>

setDefaultWorkflow

@Nonnull
public MockAssignableWorkflowScheme.MockBuilder setDefaultWorkflow(@Nonnull
                                                                           String workflowName)
Description copied from interface: WorkflowScheme.Builder
Set the default workflow for the scheme.

Specified by:
setDefaultWorkflow in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Parameters:
workflowName - the default workflow for the scheme.
Returns:
the builder.

setMapping

@Nonnull
public MockAssignableWorkflowScheme.MockBuilder setMapping(@Nonnull
                                                                   String issueTypeId,
                                                                   @Nonnull
                                                                   String workflowName)
Description copied from interface: WorkflowScheme.Builder
Set the workflow for the passed issue type.

Specified by:
setMapping in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Parameters:
issueTypeId - the issue type to map.
workflowName - the workflow to map
Returns:
the builder.

setMappings

@Nonnull
public MockAssignableWorkflowScheme.MockBuilder setMappings(@Nonnull
                                                                    Map<String,String> mappings)
Description copied from interface: WorkflowScheme.Builder
Set the workflow map for the scheme. Its basically a mapping from issueTypeId -> workflowName.

Specified by:
setMappings in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Parameters:
mappings - the mappings to set in the scheme.
Returns:
this builder.

removeMapping

@Nonnull
public MockAssignableWorkflowScheme.MockBuilder removeMapping(@Nonnull
                                                                      String issueTypeId)
Description copied from interface: WorkflowScheme.Builder
Remove the mapping for the passed issue type from the scheme.

Specified by:
removeMapping in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Parameters:
issueTypeId - the issue type whose mapping is to be removed.
Returns:
this builder.

removeDefault

@Nonnull
public MockAssignableWorkflowScheme.MockBuilder removeDefault()
Description copied from interface: WorkflowScheme.Builder
Remove the default mapping from the scheme.

Specified by:
removeDefault in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Returns:
this builder.

clearMappings

@Nonnull
public MockAssignableWorkflowScheme.MockBuilder clearMappings()
Description copied from interface: WorkflowScheme.Builder
Remove all the mappings currently stored in the builder.

Specified by:
clearMappings in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Returns:
this builder

removeWorkflow

@Nonnull
public AssignableWorkflowScheme.Builder removeWorkflow(@Nonnull
                                                               String workflowName)
Description copied from interface: WorkflowScheme.Builder
Remove all explicit references to the passed workflow from the scheme. This method sets the default workflow to null if it matches the passed workflow.

Specified by:
removeWorkflow in interface WorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
Parameters:
workflowName - the name of the workflow to remove.
Returns:
this builder.


Copyright © 2002-2013 Atlassian. All Rights Reserved.