public class IssueTypeSchemeResource extends Object
An issue type scheme is a named, ordered collection of issue types that is associated with 0..n projects. The contents of the associated issue type scheme determine which issue types are available to a project.
As is the case with issue type deletion
, certain changes
to an issue type scheme require issue migrations on the part of affected projects. This resource does not support
such migrations, and users are encouraged to use the GUI to perform them when necessary.
Constructor and Description |
---|
IssueTypeSchemeResource(JiraAuthenticationContext authContext,
JiraBaseUrls jiraBaseUrls,
IssueTypeService issueTypeService,
ResponseFactory responseFactory,
OptionSetManager optionSetManager,
ProjectBeanFactory projectBeanFactory,
IssueTypeSchemeService issueTypeSchemeService,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addProjectAssociationsToScheme(String schemeId,
AssociateProjectsBean assocProjects)
Adds additional projects to those already associated with the specified issue type scheme.
|
javax.ws.rs.core.Response |
createIssueTypeScheme(IssueTypeSchemeCreateUpdateBean createBean)
Creates an issue type scheme from a JSON representation.
|
javax.ws.rs.core.Response |
deleteIssueTypeScheme(String schemeId)
Deletes the specified issue type scheme.
|
javax.ws.rs.core.Response |
getAllIssueTypeSchemes()
Returns a list of all issue type schemes visible to the user (must be admin).
|
javax.ws.rs.core.Response |
getAssociatedProjects(String schemeId,
String expand)
For the specified issue type scheme, returns all of the associated projects.
|
javax.ws.rs.core.Response |
getIssueTypeScheme(String schemeId)
Returns a full representation of the issue type scheme that has the given id (must be admin).
|
javax.ws.rs.core.Response |
removeAllProjectAssociations(String schemeId)
Removes all project associations for the specified issue type scheme.
|
javax.ws.rs.core.Response |
removeProjectAssociation(String schemeId,
String projIdOrKey)
For the specified issue type scheme, removes the given project association .
|
javax.ws.rs.core.Response |
setProjectAssociationsForScheme(String schemeId,
AssociateProjectsBean assocProjects)
Associates the given projects with the specified issue type scheme.
|
javax.ws.rs.core.Response |
updateIssueTypeScheme(String schemeId,
IssueTypeSchemeCreateUpdateBean updateBean)
Updates the specified issue type scheme from a JSON representation.
|
public IssueTypeSchemeResource(JiraAuthenticationContext authContext, JiraBaseUrls jiraBaseUrls, IssueTypeService issueTypeService, ResponseFactory responseFactory, OptionSetManager optionSetManager, ProjectBeanFactory projectBeanFactory, IssueTypeSchemeService issueTypeSchemeService, com.atlassian.event.api.EventPublisher eventPublisher)
public javax.ws.rs.core.Response createIssueTypeScheme(IssueTypeSchemeCreateUpdateBean createBean)
createBean
- public javax.ws.rs.core.Response getAllIssueTypeSchemes()
All issue types associated with the scheme will only be returned if an additional query parameter is provided:
expand=schemes.issueTypes
.
Similarly, the default issue type associated with the scheme (if one exists) will only be returned if
additional an query parameter is provided: expand=schemes.defaultIssueType
.
Note that both query parameters can be used together: expand=schemes.issueTypes,schemes.defaultIssueType
.
public javax.ws.rs.core.Response getIssueTypeScheme(String schemeId)
schemeId
- a String containing an issue type scheme's idpublic javax.ws.rs.core.Response updateIssueTypeScheme(String schemeId, IssueTypeSchemeCreateUpdateBean updateBean)
schemeId
- the id of the issue type scheme to update.updateBean
- specifies the new set of attributes that the issue type scheme will take on.public javax.ws.rs.core.Response deleteIssueTypeScheme(String schemeId)
schemeId
- the id of the issue type scheme to remove.public javax.ws.rs.core.Response addProjectAssociationsToScheme(String schemeId, AssociateProjectsBean assocProjects) throws SearchException
schemeId
- the id of the issue type scheme whose project associations we're adding to.assocProjects
- collection of projects, specified by id or key, to associate with this issue type schemeSearchException
public javax.ws.rs.core.Response getAssociatedProjects(String schemeId, String expand)
schemeId
- id of the issue type scheme whose projects we're accessingexpand
- the parameters to expand on the returned projects; defaults to none.public javax.ws.rs.core.Response setProjectAssociationsForScheme(String schemeId, AssociateProjectsBean assocProjects) throws SearchException
schemeId
- the id of the issue type scheme whose project associations we're replacing.assocProjects
- collection of projects, specified by id or key, to associate with this issue type schemeSearchException
public javax.ws.rs.core.Response removeAllProjectAssociations(String schemeId)
schemeId
- the id of the issue type scheme whose project associations we're removingpublic javax.ws.rs.core.Response removeProjectAssociation(String schemeId, String projIdOrKey)
schemeId
- the id of the issue type scheme whose project association we're removingprojIdOrKey
- the id or key of the project that is to be un-associated with the issue type schemeCopyright © 2002-2019 Atlassian. All Rights Reserved.