public class ProjectResource extends Object
Modifier and Type | Field and Description |
---|---|
static RestRepositoryList |
SEARCH_AVAILABLE_REPOSITORIES_EXAMPLE |
Constructor and Description |
---|
ProjectResource(com.atlassian.sal.api.ApplicationProperties applicationProperties,
BambooPermissionManager bambooPermissionManager,
BambooUserManager bambooUserManager,
CachedPlanManager cachedPlanManager,
FeatureManager featureManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
LabelManager labelManager,
ProjectManager projectManager,
PlanRestService planRestService,
RepositoryDefinitionManager repositoryDefinitionManager,
CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager,
RssPermissionManager rssPermissionManager,
ProjectConfigurationService projectConfigurationService,
SpecsExporter specsExporter,
VariableDefinitionManager variableDefinitionManager,
VariableConfigurationService variableConfigurationService,
CredentialsManager credentialsManager,
PaginatedDataCollector paginatedDataCollector,
VcsRepositoryManager vcsRepositoryManager,
LinkService linkService,
SharedCredentialConversionFunction sharedCredentialConversionFunction) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addAssignedRepository(String projectKey,
RestIdContainer idContainer,
javax.ws.rs.core.UriInfo uriInfo)
Grant permission to create/edit plan in given project by Bamboo Specs from given repository.
|
javax.ws.rs.core.Response |
createOrUpdateVariable(String projectKey,
RestVariable request)
Create or update project variable.
|
javax.ws.rs.core.Response |
createProject(RestProject request,
javax.ws.rs.core.UriInfo uriInfo)
Create project.
|
javax.ws.rs.core.Response |
deleteProject(String projectKey)
Marks project for deletion.
|
javax.ws.rs.core.Response |
deleteProjectSharedCredentials(String projectKey,
long sharedCredentialsId)
Deletes shared project credentials specified by id
|
javax.ws.rs.core.Response |
deleteRepositoryMapping(String projectKey,
Long repositoryId)
Remove approval to create plans in given project by given repository
|
javax.ws.rs.core.Response |
exportProjectSpecs(String projectKey,
String packageNameOpt,
String formatParam)
Export all of the plans for a project to Bamboo specs
|
RestPageModel<RestProjectRepository> |
getPaginatedProjectRepositories(String projectKey,
String filter,
PageRequest pageRequest,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders)
Retrieves paginated project repositories specified by the project key.
|
RestPageModel<RestSharedCredential> |
getPaginatedProjectSharedCredentials(String projectKey,
String filter,
PageRequest pageRequest,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders)
Retrieves paginated shared credentials for the project specified by the project key.
|
RestProject |
getProject(String projectKey,
boolean showEmpty,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Method used to retrieve information for project specified as project key.
|
RestProjects |
getProjects(boolean showEmpty,
javax.ws.rs.core.UriInfo uriInfo,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Method used to list all projects defined in Bamboo.
|
List<RestRepository> |
listAssignedRepositories(String projectKey)
Fetch list of repositories which granted to create plan in given project by Repository stored Bamboo Specs.
|
RestRepositoryList |
searchAvailableRepositories(String projectKey,
String searchTerm,
javax.ws.rs.core.UriInfo uriInfo)
Search for linked repositories which can be granted to create plans by Repository stored Bamboo Specs in given
project
|
public static final RestRepositoryList SEARCH_AVAILABLE_REPOSITORIES_EXAMPLE
public ProjectResource(com.atlassian.sal.api.ApplicationProperties applicationProperties, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, CachedPlanManager cachedPlanManager, FeatureManager featureManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, LabelManager labelManager, ProjectManager projectManager, PlanRestService planRestService, RepositoryDefinitionManager repositoryDefinitionManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, RssPermissionManager rssPermissionManager, ProjectConfigurationService projectConfigurationService, SpecsExporter specsExporter, VariableDefinitionManager variableDefinitionManager, VariableConfigurationService variableConfigurationService, CredentialsManager credentialsManager, PaginatedDataCollector paginatedDataCollector, VcsRepositoryManager vcsRepositoryManager, LinkService linkService, SharedCredentialConversionFunction sharedCredentialConversionFunction)
public RestProjects getProjects(boolean showEmpty, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Possible expand parameters:
showEmpty
- flag to display projects without planspublic RestProject getProject(String projectKey, boolean showEmpty, @Context javax.ws.rs.core.UriInfo uriInfo, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Possible expand parameters:
projectKey
- project keyshowEmpty
- flag to return project without planspublic RestPageModel<RestProjectRepository> getPaginatedProjectRepositories(String projectKey, String filter, @Context PageRequest pageRequest, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders)
projectKey
- project keypageRequest
- represents the params that define which page the request is afteruriInfo
- URI info from the requestfilter
- filter to retrieve matching resultshttpHeaders
- headers of the requestpublic javax.ws.rs.core.Response addAssignedRepository(String projectKey, @Nullable RestIdContainer idContainer, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException, WebValidationException
projectKey
- project keyidContainer
- repository idNotFoundException
- if project or repository not foundWebValidationException
- if idContainer is empty or nullAccessDeniedException
- when user has not administration permission to projectpublic RestRepositoryList searchAvailableRepositories(String projectKey, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) throws NotFoundException
projectKey
- project keysearchTerm
- part of repository name. Used to filter output.NotFoundException
- if project not foundAccessDeniedException
- when user has not administration permission to projectpublic List<RestRepository> listAssignedRepositories(String projectKey) throws NotFoundException
projectKey
- project keyNotFoundException
- if project not foundAccessDeniedException
- when user has not administration permission to projectpublic javax.ws.rs.core.Response deleteRepositoryMapping(String projectKey, Long repositoryId) throws NotFoundException
projectKey
- project keyrepositoryId
- linked repository root idNotFoundException
- if can't find project or repositoryAccessDeniedException
- when user has not administration permission to projectpublic javax.ws.rs.core.Response deleteProject(String projectKey) throws NotFoundException, NotAuthorizedException
projectKey
- project keyNotFoundException
- if project not foundAccessDeniedException
- when user has not administration permission to projectNotAuthorizedException
public javax.ws.rs.core.Response createProject(@Nullable RestProject request, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
request
- WebValidationException
- when validation error happens.AccessDeniedException
- when user don't have global CREATE permission.public javax.ws.rs.core.Response createOrUpdateVariable(String projectKey, @Nullable RestVariable request) throws WebValidationException
projectKey
- project keyrequest
- variableWebValidationException
- when validation error happens.AccessDeniedException
- when user don't have global ADMINISTRATION permission.public RestPageModel<RestSharedCredential> getPaginatedProjectSharedCredentials(String projectKey, String filter, @Context PageRequest pageRequest, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders) throws WebValidationException, NotFoundException
projectKey
- project keypageRequest
- represents the params that define which page the request is afteruriInfo
- URI info from the requestfilter
- filter to retrieve matching resultshttpHeaders
- headers of the requestWebValidationException
NotFoundException
public javax.ws.rs.core.Response deleteProjectSharedCredentials(String projectKey, long sharedCredentialsId)
projectKey
- project keysharedCredentialsId
- project shared credentials idNotFoundException
- if credentials are global or not foundAccessDeniedException
- if credentials exist but belong to different projectCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.