public class WorkflowSchemeResource extends Object
Constructor and Description |
---|
WorkflowSchemeResource(AssignableRestWorkflowScheme.Factory factory,
WorkflowManager workflowManager,
IssueTypeManager issueTypeManager,
JiraAuthenticationContext authenticationContext) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createDraftForParent(long id)
Create a draft for the passed scheme.
|
javax.ws.rs.core.Response |
createScheme(WorkflowSchemeBean bean)
Create a new workflow scheme.
|
javax.ws.rs.core.Response |
deleteDefault(long id,
boolean updateDraftIfNeeded)
Remove the default workflow from the passed workflow scheme.
|
javax.ws.rs.core.Response |
deleteDraftById(long id)
Delete the passed draft workflow scheme.
|
javax.ws.rs.core.Response |
deleteDraftDefault(long id)
Remove the default workflow from the passed draft workflow scheme.
|
javax.ws.rs.core.Response |
deleteDraftIssueType(long id,
String issueType)
Remove the specified issue type mapping from the draft scheme.
|
javax.ws.rs.core.Response |
deleteDraftWorkflowMapping(long id,
String workflowName)
Delete the passed workflow from the draft workflow scheme.
|
javax.ws.rs.core.Response |
deleteIssueType(long id,
String issueType,
boolean updateDraftIfNeeded)
Remove the specified issue type mapping from the scheme.
|
javax.ws.rs.core.Response |
deleteScheme(long id)
Delete the passed workflow scheme.
|
javax.ws.rs.core.Response |
deleteWorkflowMapping(long id,
String workflowName,
boolean updateDraftIfNeeded)
Delete the passed workflow from the workflow scheme.
|
javax.ws.rs.core.Response |
getById(long id,
boolean returnDraftIfExists)
Returns the requested workflow scheme to the caller.
|
javax.ws.rs.core.Response |
getDefault(long id,
boolean returnDraftIfExists)
Return the default workflow from the passed workflow scheme.
|
javax.ws.rs.core.Response |
getDraftById(long id)
Returns the requested draft workflow scheme to the caller.
|
javax.ws.rs.core.Response |
getDraftDefault(long id)
Return the default workflow from the passed draft workflow scheme to the caller.
|
javax.ws.rs.core.Response |
getDraftIssueType(long id,
String issueType)
Returns the issue type mapping for the passed draft workflow scheme.
|
javax.ws.rs.core.Response |
getDraftWorkflow(long id,
String workflowName)
Returns the draft workflow mappings or requested mapping to the caller.
|
javax.ws.rs.core.Response |
getIssueType(long id,
String issueType,
boolean returnDraftIfExists)
Returns the issue type mapping for the passed workflow scheme.
|
javax.ws.rs.core.Response |
getWorkflow(long id,
String workflowName,
boolean returnDraftIfExists)
Returns the workflow mappings or requested mapping to the caller for the passed scheme.
|
javax.ws.rs.core.Response |
setDraftIssueType(long id,
String issueType,
IssueTypeMappingBean mappingBean)
Set the issue type mapping for the passed draft scheme.
|
javax.ws.rs.core.Response |
setIssueType(long id,
String issueType,
IssueTypeMappingBean mappingBean)
Set the issue type mapping for the passed scheme.
|
javax.ws.rs.core.Response |
update(long id,
WorkflowSchemeBean bean)
Update the passed workflow scheme.
|
javax.ws.rs.core.Response |
updateDefault(long id,
DefaultBean bean)
Set the default workflow for the passed workflow scheme.
|
javax.ws.rs.core.Response |
updateDraft(long id,
WorkflowSchemeBean bean)
Update a draft workflow scheme.
|
javax.ws.rs.core.Response |
updateDraftDefault(long id,
DefaultBean bean)
Set the default workflow for the passed draft workflow scheme.
|
javax.ws.rs.core.Response |
updateDraftWorkflowMapping(long id,
String workflowName,
WorkflowMappingBean updateBean)
Update the draft scheme to include the passed mapping.
|
javax.ws.rs.core.Response |
updateWorkflowMapping(long id,
String workflowName,
WorkflowMappingBean updateBean)
Update the scheme to include the passed mapping.
|
public WorkflowSchemeResource(AssignableRestWorkflowScheme.Factory factory, WorkflowManager workflowManager, IssueTypeManager issueTypeManager, JiraAuthenticationContext authenticationContext)
public javax.ws.rs.core.Response getById(long id, boolean returnDraftIfExists)
id
- the id of the scheme.returnDraftIfExists
- when true indicates that a scheme's draft, if it exists, should be queried instead of
the scheme itself.public javax.ws.rs.core.Response createScheme(WorkflowSchemeBean bean)
The body contains a representation of the new scheme. Values not passed are assumed to be set to their defaults.
public javax.ws.rs.core.Response deleteScheme(long id)
id
- the id of the scheme.public javax.ws.rs.core.Response update(long id, WorkflowSchemeBean bean)
The body of the request is a representation of the workflow scheme. Values not passed are assumed to indicate no change for that field.
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created and/or updated when the actual scheme cannot be edited (e.g. when the scheme is being used by a project). Values not appearing the body will not be touched.
id
- the id of the scheme.public javax.ws.rs.core.Response getDraftById(long id)
id
- the id of the parent scheme.public javax.ws.rs.core.Response deleteDraftById(long id)
id
- the id of the parent scheme.public javax.ws.rs.core.Response createDraftForParent(long id)
id
- the id of the parent scheme.public javax.ws.rs.core.Response updateDraft(long id, WorkflowSchemeBean bean)
The body is a representation of the workflow scheme. Values not passed are assumed to indicate no change for that field.
id
- the id of the parent scheme.public javax.ws.rs.core.Response getWorkflow(long id, String workflowName, boolean returnDraftIfExists)
id
- the id of the scheme.returnDraftIfExists
- when true indicates that a scheme's draft, if it exists, should be queried instead of
the scheme itself.workflowName
- the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name.public javax.ws.rs.core.Response getDraftWorkflow(long id, String workflowName)
id
- the id of the parent scheme.workflowName
- the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name.public javax.ws.rs.core.Response deleteWorkflowMapping(long id, String workflowName, boolean updateDraftIfNeeded)
id
- the id of the scheme.workflowName
- the name of the workflow to delete.updateDraftIfNeeded
- flag to indicate if a draft should be created if necessary to delete the workflow
from the scheme.public javax.ws.rs.core.Response deleteDraftWorkflowMapping(long id, String workflowName)
id
- the id of the parent scheme.workflowName
- the name of the workflow to delete.public javax.ws.rs.core.Response updateWorkflowMapping(long id, String workflowName, WorkflowMappingBean updateBean)
The body is a representation of the workflow mapping. Values not passed are assumed to indicate no change for that field.
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.
id
- the id of the scheme.workflowName
- the name of the workflow mapping to update.public javax.ws.rs.core.Response updateDraftWorkflowMapping(long id, String workflowName, WorkflowMappingBean updateBean)
The body is a representation of the workflow mapping. Values not passed are assumed to indicate no change for that field.
id
- the id of the parent scheme.workflowName
- the name of the workflow mapping to update.public javax.ws.rs.core.Response getIssueType(long id, String issueType, boolean returnDraftIfExists)
id
- the id of the scheme.returnDraftIfExists
- when true indicates that a scheme's draft, if it exists, should be queried instead of
the scheme itself.issueType
- the issue type to query.public javax.ws.rs.core.Response getDraftIssueType(long id, String issueType)
id
- the id of the parent scheme.issueType
- the issue type to query.public javax.ws.rs.core.Response deleteIssueType(long id, String issueType, boolean updateDraftIfNeeded)
id
- the id of the scheme.issueType
- the issue type to remove.updateDraftIfNeeded
- when true will create and return a draft when the workflow scheme cannot be edited
(e.g. when it is being used by a project).public javax.ws.rs.core.Response deleteDraftIssueType(long id, String issueType)
id
- the parent of the draft scheme.issueType
- the issue type to remove.public javax.ws.rs.core.Response setIssueType(long id, String issueType, IssueTypeMappingBean mappingBean)
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.
id
- the id of the scheme.issueType
- the issue type being set.mappingBean
- the new mapping for the issue type.public javax.ws.rs.core.Response setDraftIssueType(long id, String issueType, IssueTypeMappingBean mappingBean)
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.
id
- the id of the parent scheme.issueType
- the issue type being set.mappingBean
- the new mapping for the issue type.public javax.ws.rs.core.Response getDefault(long id, boolean returnDraftIfExists)
id
- the id of the scheme.returnDraftIfExists
- when true indicates that a scheme's draft, if it exists, should be queried instead of
the scheme itself.public javax.ws.rs.core.Response getDraftDefault(long id)
id
- the id of the parent scheme.public javax.ws.rs.core.Response deleteDefault(long id, boolean updateDraftIfNeeded)
id
- the id of the scheme.updateDraftIfNeeded
- when true will create and return a draft when the workflow scheme cannot be edited
(e.g. when it is being used by a project).public javax.ws.rs.core.Response deleteDraftDefault(long id)
id
- the id of the parent scheme.public javax.ws.rs.core.Response updateDefault(long id, DefaultBean bean)
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.
id
- the id of the scheme.bean
- the new default.public javax.ws.rs.core.Response updateDraftDefault(long id, DefaultBean bean)
id
- the id of the parent scheme.bean
- the new default.Copyright © 2002-2015 Atlassian. All Rights Reserved.