@Singleton public class DeploymentProjectResource extends Object
Constructor and Description |
---|
DeploymentProjectResource(AdministrationConfigurationAccessor administrationConfigurationAccessor,
com.atlassian.sal.api.ApplicationProperties applicationProperties,
BambooPermissionManager bambooPermissionManager,
BambooUserManager bambooUserManager,
DeploymentProjectService deploymentProjectService,
DeploymentVersionService deploymentVersionService,
EnvironmentService environmentService,
FeatureManager featureManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
LinkedDeploymentProjectCacheService linkedDeploymentProjectCacheService,
RepositoryDefinitionManager repositoryDefinitionManager,
CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager,
ResultsSummaryManager resultsSummaryManager,
RssPermissionManager rssPermissionManager,
DeploymentProjectDeletionService deploymentProjectDeletionService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addAssignedRepository(Long deploymentProjectId,
RestIdContainer idContainer,
javax.ws.rs.core.UriInfo uriInfo)
Grant permission to create/edit plan in given deployment project by Bamboo Specs from given repository.
|
RestDeploymentProject |
addDeploymentProject(RestCreateDeploymentProjectRequest createDeploymentProjectRequest)
Create deployment project.
|
RestDeploymentVersion |
createVersion(long deploymentProjectId,
RestCreateVersionRequest createVersionRequest,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Create deployment version for given deployment project.
|
javax.ws.rs.core.Response |
deleteDeploymentProject(long deploymentProjectId)
Delete deployment project
|
javax.ws.rs.core.Response |
deleteRepositoryMapping(Long deploymentProjectId,
Long repositoryId)
Remove approval to create plans in given deployment project by given repository
|
RestDeploymentProject |
editDeploymentProject(long deploymentProjectId,
RestUpdateDeploymentProjectRequest updateDeploymentProjectRequest)
Update deployment project.
|
List<RestDeploymentProject> |
getAllDeploymentProjects()
Find all deployment projects with environments.
|
RestDeploymentProject |
getDeploymentProject(long deploymentProjectId)
Find deployment project by id.
|
List<RestLinkedDeploymentProject> |
getDeploymentProjectsForPlan(String planKey)
Get list of deployment projects for build plan.
|
RestDeploymentVersionList |
getDeploymentProjectVersions(long deploymentProjectId,
String planBranchKey,
javax.ws.rs.core.UriInfo uriInfo)
Get list of deployment versions by deployment project id
|
List<RestRepository> |
listAssignedRepositories(Long deploymentProjectId)
Fetch list of repositories which granted to create/edit environment in given deployment project by Repository stored Bamboo Specs.
|
RestRepositoryList |
searchAvailableRepositories(long deploymentProjectId,
String searchTerm,
javax.ws.rs.core.UriInfo uriInfo)
Search for linked repositories which can be granted to create/modify environment by Repository stored Bamboo Specs in given
deployment project.
|
public DeploymentProjectResource(AdministrationConfigurationAccessor administrationConfigurationAccessor, com.atlassian.sal.api.ApplicationProperties applicationProperties, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, DeploymentProjectService deploymentProjectService, DeploymentVersionService deploymentVersionService, EnvironmentService environmentService, FeatureManager featureManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, LinkedDeploymentProjectCacheService linkedDeploymentProjectCacheService, RepositoryDefinitionManager repositoryDefinitionManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, ResultsSummaryManager resultsSummaryManager, RssPermissionManager rssPermissionManager, DeploymentProjectDeletionService deploymentProjectDeletionService)
public List<RestDeploymentProject> getAllDeploymentProjects() throws Exception
Exception
public RestDeploymentProject addDeploymentProject(@Nullable RestCreateDeploymentProjectRequest createDeploymentProjectRequest) throws WebValidationException
createDeploymentProjectRequest
- deployment project to be createdWebValidationException
public RestDeploymentProject getDeploymentProject(long deploymentProjectId)
deploymentProjectId
- deployment project idpublic RestDeploymentProject editDeploymentProject(long deploymentProjectId, @Nullable RestUpdateDeploymentProjectRequest updateDeploymentProjectRequest) throws WebValidationException
deploymentProjectId
- deployment project idupdateDeploymentProjectRequest
- deployment projectWebValidationException
public RestDeploymentVersionList getDeploymentProjectVersions(long deploymentProjectId, @Nullable String planBranchKey, @Context javax.ws.rs.core.UriInfo uriInfo)
deploymentProjectId
- deployment project idplanBranchKey
- plan branch key. Can be empty if default branch is requireduriInfo
- uri infopublic RestDeploymentVersion createVersion(long deploymentProjectId, @Nullable RestCreateVersionRequest createVersionRequest, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext) throws WebValidationException, org.acegisecurity.AccessDeniedException
deploymentProjectId
- id of deployment projectcreateVersionRequest
- payloadauthenticationContext
- authentication contextWebValidationException
org.acegisecurity.AccessDeniedException
public List<RestLinkedDeploymentProject> getDeploymentProjectsForPlan(@Nullable String planKey) throws WebValidationException
planKey
- plan key. RequiredWebValidationException
public List<RestRepository> listAssignedRepositories(Long deploymentProjectId) throws NotFoundException
deploymentProjectId
- deployment project idNotFoundException
- if project not foundAccessDeniedException
- when user has not administration permission to projectpublic javax.ws.rs.core.Response addAssignedRepository(Long deploymentProjectId, @Nullable RestIdContainer idContainer, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException, WebValidationException
deploymentProjectId
- project keyidContainer
- repository idNotFoundException
- if project or repository not foundWebValidationException
- if idContainer is empty or nullAccessDeniedException
- when user has not administration permission to projectpublic javax.ws.rs.core.Response deleteRepositoryMapping(Long deploymentProjectId, Long repositoryId) throws NotFoundException
deploymentProjectId
- project keyrepositoryId
- linked repository root idNotFoundException
- if can't find project or repositoryAccessDeniedException
- when user has not administration permission to projectpublic RestRepositoryList searchAvailableRepositories(long deploymentProjectId, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException
deploymentProjectId
- deployment projectsearchTerm
- part of repository name. Used to filter output.NotFoundException
- if project not foundAccessDeniedException
- when user has not administration permission to projectpublic javax.ws.rs.core.Response deleteDeploymentProject(long deploymentProjectId)
deploymentProjectId
- deployment projectNotFoundException
- if deployment project not foundAccessDeniedException
- when user lacks administration permission to deployment projectCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.