com.atlassian.jira.workflow
Class DraftWorkflowSchemeBuilder

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

public class DraftWorkflowSchemeBuilder
extends Object
implements DraftWorkflowScheme.Builder

Since:
v5.2

Method Summary
 DraftWorkflowScheme build()
           
 T 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()
           
 T removeDefault()
          Remove the default mapping from the scheme.
 T removeMapping(String issueTypeId)
          Remove the mapping for the passed issue type from the scheme.
 T removeWorkflow(String workflowName)
          Remove all explicit references to the passed workflow from the scheme.
 T setDefaultWorkflow(String workflowName)
          Set the default workflow for the scheme.
 T setMapping(String issueTypeId, String workflowName)
          Set the workflow for the passed issue type.
 T setMappings(Map<String,String> mappings)
          Set the workflow map for the scheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.workflow.WorkflowScheme.Builder
clearMappings, getDefaultWorkflow, getId, getMapping, getMappings, removeDefault, removeMapping, removeWorkflow, setDefaultWorkflow, setMapping, setMappings
 

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

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 T setDefaultWorkflow(@Nonnull
                                    String workflowName)
Description copied from interface: WorkflowScheme.Builder
Set the default workflow for the scheme.

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

setMapping

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

setMappings

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

removeMapping

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

removeDefault

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

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

clearMappings

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

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

removeWorkflow

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

getDefaultWorkflow

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

getMapping

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

getId

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

getMappings

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


Copyright © 2002-2013 Atlassian. All Rights Reserved.