com.atlassian.jira.workflow
Class MockDraftWorkflowScheme.MockBuilder

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

public static class MockDraftWorkflowScheme.MockBuilder
extends Object
implements DraftWorkflowScheme.Builder


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

Constructor Detail

MockDraftWorkflowScheme.MockBuilder

public MockDraftWorkflowScheme.MockBuilder(DraftWorkflowScheme ws)
Method Detail

getLastModifiedUser

public ApplicationUser getLastModifiedUser()
Specified by:
getLastModifiedUser in interface DraftWorkflowScheme.Builder

getLastModifiedDate

public Date getLastModifiedDate()
Specified by:
getLastModifiedDate in interface DraftWorkflowScheme.Builder

getParentScheme

public AssignableWorkflowScheme getParentScheme()
Specified by:
getParentScheme in interface DraftWorkflowScheme.Builder

build

public DraftWorkflowScheme build()
Specified by:
build in interface DraftWorkflowScheme.Builder

getDefaultWorkflow

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

getMapping

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

getMappings

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

getId

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

isDraft

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

isDefault

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

getDescription

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

getName

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

setDefaultWorkflow

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

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

setMapping

@Nonnull
public DraftWorkflowScheme.Builder 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<DraftWorkflowScheme.Builder>
Parameters:
issueTypeId - the issue type to map.
workflowName - the workflow to map
Returns:
the builder.

setMappings

@Nonnull
public DraftWorkflowScheme.Builder 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<DraftWorkflowScheme.Builder>
Parameters:
mappings - the mappings to set in the scheme.
Returns:
this builder.

removeMapping

@Nonnull
public DraftWorkflowScheme.Builder 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<DraftWorkflowScheme.Builder>
Parameters:
issueTypeId - the issue type whose mapping is to be removed.
Returns:
this builder.

removeDefault

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

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

clearMappings

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

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

removeWorkflow

@Nonnull
public DraftWorkflowScheme.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<DraftWorkflowScheme.Builder>
Parameters:
workflowName - the name of the workflow to remove.
Returns:
this builder.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2013 Atlassian. All Rights Reserved.