public class SharedCredentialResource extends Object
Modifier and Type | Field and Description |
---|---|
static RestSharedCredential |
PASSWORD_SHARED_CREDENTIAL |
static RestListModel<RestSharedCredential> |
PASSWORD_SHARED_CREDENTIALS |
static RestSharedCredential |
SSH_SHARED_CREDENTIAL |
static RestListModel<RestSharedCredential> |
SSH_SHARED_CREDENTIALS |
Constructor and Description |
---|
SharedCredentialResource(CredentialsManager credentialsManager,
ProjectManager projectManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
LinkService linkService,
RestPermissionCheck restPermissionCheck,
SharedCredentialConversionFunction sharedCredentialConversionFunction) |
Modifier and Type | Method and Description |
---|---|
RestSharedCredential |
createPasswordSharedCredential(RestSharedCredential restSharedCredential,
javax.ws.rs.core.UriInfo uriInfo)
Create a new username/password shared credential.
|
RestSharedCredential |
createSshSharedCredential(RestSharedCredential restSharedCredential,
javax.ws.rs.core.UriInfo uriInfo)
Create a new Ssh shared credential.
|
javax.ws.rs.core.Response |
deletePasswordSharedCredential(long sharedCredentialId)
Delete the given username/password shared credential
|
javax.ws.rs.core.Response |
deleteSshSharedCredential(long sharedCredentialId)
Delete the given ssh shared credential
|
RestSharedCredential |
getPasswordSharedCredential(Long sharedCredentialId,
javax.ws.rs.core.UriInfo uriInfo)
Get configuration of a shared username/password credential.
|
RestListModel<RestSharedCredential> |
getPasswordSharedCredentials(javax.ws.rs.core.UriInfo uriInfo,
Expansion expansion)
Rest endpoint to retrieve all username/password shared credentials.
|
RestSharedCredential |
getSshSharedCredential(Long sharedCredentialId,
javax.ws.rs.core.UriInfo uriInfo)
Get configuration of a shared ssh credential.
|
RestListModel<RestSharedCredential> |
getSshSharedCredentials(javax.ws.rs.core.UriInfo uriInfo,
Expansion expansion)
Rest endpoint to retrieve all ssh shared credentials.
|
RestSharedCredential |
updatePasswordSharedCredential(long sharedCredentialId,
RestSharedCredential restSharedCredential,
javax.ws.rs.core.UriInfo uriInfo)
Update existing username/password shared credential.
|
RestSharedCredential |
updateSshSharedCredential(long sharedCredentialId,
RestSharedCredential restSharedCredential,
javax.ws.rs.core.UriInfo uriInfo)
Update existing ssh shared credential.
|
protected ErrorCollection |
validate(RestSharedCredential restSharedCredential,
Long sharedCredentialId) |
public static final RestSharedCredential SSH_SHARED_CREDENTIAL
public static final RestSharedCredential PASSWORD_SHARED_CREDENTIAL
public static final RestListModel<RestSharedCredential> SSH_SHARED_CREDENTIALS
public static final RestListModel<RestSharedCredential> PASSWORD_SHARED_CREDENTIALS
public SharedCredentialResource(CredentialsManager credentialsManager, ProjectManager projectManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, LinkService linkService, RestPermissionCheck restPermissionCheck, SharedCredentialConversionFunction sharedCredentialConversionFunction)
@NotNull public RestListModel<RestSharedCredential> getSshSharedCredentials(@Context @NotNull javax.ws.rs.core.UriInfo uriInfo, @Context @NotNull Expansion expansion)
uriInfo
- Provides information about current requestexpansion
- Represents an expansion tree of additional information we want to retrieve@NotNull public RestSharedCredential getSshSharedCredential(@NotNull Long sharedCredentialId, @Context @NotNull javax.ws.rs.core.UriInfo uriInfo)
sharedCredentialId
- Id of the shared credentialuriInfo
- Provides information about current request@NotNull public RestSharedCredential createSshSharedCredential(@NotNull RestSharedCredential restSharedCredential, @Context @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
restSharedCredential
- Configuration of the shared credentialuriInfo
- Provides information about current requestWebValidationException
public RestSharedCredential updateSshSharedCredential(long sharedCredentialId, @NotNull RestSharedCredential restSharedCredential, @Context @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
sharedCredentialId
- Id of the shared credentialrestSharedCredential
- New configurationuriInfo
- Provides information about current requestWebValidationException
public javax.ws.rs.core.Response deleteSshSharedCredential(long sharedCredentialId)
sharedCredentialId
- Id of the shared credential to be deletedResponse
indicates status of the deletion@NotNull public RestListModel<RestSharedCredential> getPasswordSharedCredentials(@Context @NotNull javax.ws.rs.core.UriInfo uriInfo, @Context @NotNull Expansion expansion)
uriInfo
- Provides information about current requestexpansion
- Represents an expansion tree of additional information we want to retrieve@NotNull public RestSharedCredential getPasswordSharedCredential(@NotNull Long sharedCredentialId, @Context @NotNull javax.ws.rs.core.UriInfo uriInfo)
sharedCredentialId
- Id of the shared credentialuriInfo
- Provides information about current request@NotNull public RestSharedCredential createPasswordSharedCredential(@NotNull RestSharedCredential restSharedCredential, @Context @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
restSharedCredential
- Configuration of the shared credentialuriInfo
- Provides information about current requestWebValidationException
public RestSharedCredential updatePasswordSharedCredential(long sharedCredentialId, @NotNull RestSharedCredential restSharedCredential, @Context @NotNull javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
sharedCredentialId
- Id of the shared credentialrestSharedCredential
- New configurationuriInfo
- Provides information about current requestWebValidationException
public javax.ws.rs.core.Response deletePasswordSharedCredential(long sharedCredentialId)
sharedCredentialId
- Id of the shared credential to be deletedResponse
indicates status of the deletion@NotNull protected ErrorCollection validate(@NotNull RestSharedCredential restSharedCredential, @Nullable Long sharedCredentialId)
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.