public class VersionResource extends Object
Constructor and Description |
---|
VersionResource(VersionService versionService,
ProjectService projectService,
JiraAuthenticationContext authContext,
I18nHelper i18n,
RemoteVersionLinkResource remoteVersionLinkResource,
VersionBeanFactory versionBeanFactory,
VersionIssueCountsBeanFactory versionIssueCountsBeanFactory,
VersionUnresolvedIssueCountsBeanFactory versionUnresolvedIssueCountsBeanFactory,
DateFieldFormat dateFieldFormat,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createOrUpdateRemoteVersionLink(String versionId,
String json)
Create a remote version link via POST.
|
javax.ws.rs.core.Response |
createOrUpdateRemoteVersionLink(String versionId,
String globalId,
String json)
Create a remote version link via POST using the provided global ID.
|
javax.ws.rs.core.Response |
createVersion(VersionBean bean)
Create a version via POST.
|
javax.ws.rs.core.Response |
delete(String id,
DeleteAndReplaceVersionBean parameters)
Delete a project version.
|
javax.ws.rs.core.Response |
delete(String id,
String moveFixIssuesTo,
String moveAffectedIssuesTo)
Deprecated.
use
delete(String, DeleteAndReplaceVersionBean) that
supports swapping version in custom fields.
Since v7.0.6 |
javax.ws.rs.core.Response |
deleteRemoteVersionLink(String versionId,
String globalId)
Delete a specific remote version link with the given version ID and global ID.
|
javax.ws.rs.core.Response |
deleteRemoteVersionLinksByVersionId(String versionId)
Delete all remote version links for a given version ID.
|
javax.ws.rs.core.Response |
getRemoteVersionLink(String versionId,
String globalId)
A REST sub-resource representing a remote version link
|
javax.ws.rs.core.Response |
getRemoteVersionLinks(String globalId)
Returns the remote version links for a given global ID.
|
javax.ws.rs.core.Response |
getRemoteVersionLinksByVersionId(String versionId)
Returns the remote version links associated with the given version ID.
|
javax.ws.rs.core.Response |
getVersion(String id,
String expand)
Returns a project version.
|
javax.ws.rs.core.Response |
getVersionRelatedIssues(String id)
Returns a bean containing the number of fixed in and affected issues for the given version.
|
javax.ws.rs.core.Response |
getVersionUnresolvedIssues(String id)
Returns the number of unresolved issues for the given version
|
javax.ws.rs.core.Response |
merge(String id,
String moveIssuesTo)
Merge versions
|
javax.ws.rs.core.Response |
moveVersion(String id,
VersionMoveBean bean)
Modify a version's sequence within a project.
|
javax.ws.rs.core.Response |
updateVersion(String id,
VersionBean bean)
Modify a version via PUT.
|
public VersionResource(VersionService versionService, ProjectService projectService, JiraAuthenticationContext authContext, I18nHelper i18n, RemoteVersionLinkResource remoteVersionLinkResource, VersionBeanFactory versionBeanFactory, VersionIssueCountsBeanFactory versionIssueCountsBeanFactory, VersionUnresolvedIssueCountsBeanFactory versionUnresolvedIssueCountsBeanFactory, DateFieldFormat dateFieldFormat, com.atlassian.event.api.EventPublisher eventPublisher)
public javax.ws.rs.core.Response getVersion(String id, String expand)
id
- a String containing the version idpublic javax.ws.rs.core.Response updateVersion(String id, VersionBean bean)
public javax.ws.rs.core.Response createVersion(VersionBean bean)
public javax.ws.rs.core.Response delete(String id, String moveFixIssuesTo, String moveAffectedIssuesTo)
delete(String, DeleteAndReplaceVersionBean)
that
supports swapping version in custom fields.
Since v7.0.6id
- The version to deletemoveFixIssuesTo
- The version to set fixVersion to on issues where the deleted version is the fix version,
If null then the fixVersion is removed.moveAffectedIssuesTo
- The version to set affectedVersion to on issues where the deleted version is the affected version,
If null then the affectedVersion is removed.public javax.ws.rs.core.Response delete(String id, DeleteAndReplaceVersionBean parameters)
id
- The version to deleteparameters
- specifies what version should replace given version in fields.public javax.ws.rs.core.Response merge(String id, String moveIssuesTo)
id
- The version that will be merged to version moveIssuesTo
and removedmoveIssuesTo
- The version to set fixVersion to on issues where the deleted version is the fix version,
If null then the fixVersion is removed.public javax.ws.rs.core.Response getVersionRelatedIssues(String id)
id
- a String containing the version idpublic javax.ws.rs.core.Response getVersionUnresolvedIssues(String id)
id
- a String containing the version idpublic javax.ws.rs.core.Response moveVersion(String id, VersionMoveBean bean)
id
- a String containing the version idbean
- a MoveVersionBean that describes the move to be performed.public javax.ws.rs.core.Response getRemoteVersionLinks(String globalId)
globalId
- the global ID of the remote resource that is linked to the versionspublic javax.ws.rs.core.Response getRemoteVersionLinksByVersionId(String versionId)
versionId
- a String containing the version IDpublic javax.ws.rs.core.Response getRemoteVersionLink(String versionId, String globalId)
versionId
- a String containing the version idglobalId
- The id of the remote issue link to be returned. If null
(not provided) all
remote links for the issue are returned.
Remote version links follow the same general rules that Issue Links do, except that they are permitted to use any arbitrary well-formed JSON data format with no restrictions imposed. It is recommended, but not required, that they follow the same format used for Remote Issue Links, as described at https://developer.atlassian.com/display/JIRADEV/Fields+in+Remote+Issue+Links.
Response
containing a RemoteEntityLinksJsonBean
s
is returned. Otherwise, a Response containing a RemoteEntityLinkJsonBean
with the given
globalId
is returned.public javax.ws.rs.core.Response createOrUpdateRemoteVersionLink(String versionId, String json)
public javax.ws.rs.core.Response createOrUpdateRemoteVersionLink(String versionId, String globalId, String json)
public javax.ws.rs.core.Response deleteRemoteVersionLinksByVersionId(String versionId)
versionId
- The version for which to delete ALL existing remote version linkspublic javax.ws.rs.core.Response deleteRemoteVersionLink(String versionId, String globalId)
versionId
- The version ID of the remote linkglobalId
- The global ID of the remote linkCopyright © 2002-2019 Atlassian. All Rights Reserved.