Package com.atlassian.jira.workflow
Class MockAssignableWorkflowScheme.MockBuilder
java.lang.Object
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Remove all the mappings currently stored in the builder.getId()
getMapping
(String issueTypeId) getName()
boolean
boolean
isDraft()
Remove the default mapping from the scheme.removeMapping
(String issueTypeId) Remove the mapping for the passed issue type from the scheme.removeWorkflow
(String workflowName) Remove all explicit references to the passed workflow from the scheme.setDefaultWorkflow
(String workflowName) Set the default workflow for the scheme.setDescription
(String description) Set the description of the workflow scheme.setMapping
(String issueTypeId, String workflowName) Set the workflow for the passed issue type.setMappings
(Map<String, String> mappings) Set the workflow map for the scheme.Set the name of the worklflow scheme.
-
Constructor Details
-
MockBuilder
-
-
Method Details
-
setName
Description copied from interface:AssignableWorkflowScheme.Builder
Set the name of the worklflow scheme.- Specified by:
setName
in interfaceAssignableWorkflowScheme.Builder
- Parameters:
name
- the name of the workflow scheme.- Returns:
- the builder.
-
setDescription
Description copied from interface:AssignableWorkflowScheme.Builder
Set the description of the workflow scheme.- Specified by:
setDescription
in interfaceAssignableWorkflowScheme.Builder
- Parameters:
description
- the description of the workflow scheme.- Returns:
- the builder.
-
build
- Specified by:
build
in interfaceAssignableWorkflowScheme.Builder
-
getDefaultWorkflow
- Specified by:
getDefaultWorkflow
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
-
getMapping
- Specified by:
getMapping
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
-
getMappings
- Specified by:
getMappings
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
-
getId
- Specified by:
getId
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
-
isDraft
public boolean isDraft()- Specified by:
isDraft
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
-
isDefault
public boolean isDefault()- Specified by:
isDefault
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
-
getDescription
- Specified by:
getDescription
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
-
getName
- Specified by:
getName
in interfaceWorkflowScheme.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 interfaceWorkflowScheme.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 interfaceWorkflowScheme.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 fromissueTypeId -> workflowName
.- Specified by:
setMappings
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
- Parameters:
mappings
- the mappings to set in the scheme.- Returns:
- this builder.
-
removeMapping
Description copied from interface:WorkflowScheme.Builder
Remove the mapping for the passed issue type from the scheme.- Specified by:
removeMapping
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
- Parameters:
issueTypeId
- the issue type whose mapping is to be removed.- Returns:
- this builder.
-
removeDefault
Description copied from interface:WorkflowScheme.Builder
Remove the default mapping from the scheme.- Specified by:
removeDefault
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
- Returns:
- this builder.
-
clearMappings
Description copied from interface:WorkflowScheme.Builder
Remove all the mappings currently stored in the builder.- Specified by:
clearMappings
in interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
- Returns:
- this builder
-
removeWorkflow
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 interfaceWorkflowScheme.Builder<AssignableWorkflowScheme.Builder>
- Parameters:
workflowName
- the name of the workflow to remove.- Returns:
- this builder.
-