public abstract class CredentialsStore extends Object implements hudson.security.AccessControlled
Credentials.| Constructor and Description |
|---|
CredentialsStore() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
addCredentials(Domain domain,
Credentials credentials)
|
boolean |
addDomain(Domain domain,
Credentials... credentials)
Adds a new
Domain with seed credentials. |
boolean |
addDomain(Domain domain,
List<Credentials> credentials)
Adds a new
Domain with seed credentials. |
void |
checkPermission(hudson.security.Permission p)
Checks if the current security principal has this permission.
|
hudson.security.ACL |
getACL() |
abstract hudson.model.ModelObject |
getContext()
Returns the context within which this store operates.
|
abstract List<Credentials> |
getCredentials(Domain domain)
Returns an unmodifiable list of credentials for the specified domain.
|
List<Domain> |
getDomains()
Returns all the
Domains that this credential provider has. |
abstract boolean |
hasPermission(org.acegisecurity.Authentication a,
hudson.security.Permission permission)
Checks if the given principle has the given permission.
|
boolean |
hasPermission(hudson.security.Permission p)
Checks if the current security principal has this permission.
|
boolean |
isDomainsModifiable()
Identifies whether this
CredentialsStore supports making changes to the list of domains or
whether it only supports a fixed set of domains (which may only be one domain). |
abstract boolean |
removeCredentials(Domain domain,
Credentials credentials)
|
boolean |
removeDomain(Domain domain)
Removes an existing
Domain and all associated Credentials. |
abstract boolean |
updateCredentials(Domain domain,
Credentials current,
Credentials replacement)
Updates the specified
Credentials from the specified Domain for this CredentialsStore with the supplied replacement. |
boolean |
updateDomain(Domain current,
Domain replacement)
Updates an existing
Domain keeping the existing associated Credentials. |
public abstract hudson.model.ModelObject getContext()
CredentialsScope.SYSTEM is valid for the store) but will not be available to
parent contexts.public final void checkPermission(@NonNull
hudson.security.Permission p)
checkPermission in interface hudson.security.AccessControlledorg.acegisecurity.AccessDeniedException - if the user doesn't have the permission.public final boolean hasPermission(@NonNull
hudson.security.Permission p)
hasPermission in interface hudson.security.AccessControlledpublic abstract boolean hasPermission(@NonNull
org.acegisecurity.Authentication a,
@NonNull
hudson.security.Permission permission)
public hudson.security.ACL getACL()
getACL in interface hudson.security.AccessControlled@NonNull public List<Domain> getDomains()
Domains that this credential provider has.
Most implementers of CredentialsStore will probably want to override this method.public final boolean isDomainsModifiable()
CredentialsStore supports making changes to the list of domains or
whether it only supports a fixed set of domains (which may only be one domain).
Note: in order for implementations to return true all of the following methods must be overridden:
true iff addDomain(Domain, List)
addDomain(Domain, Credentials...), removeDomain(Domain)
and updateDomain(Domain, Domain) are expected to work@NonNull public abstract List<Credentials> getCredentials(@NonNull Domain domain)
domain - the domain.Domain) unmodifiable list of credentials for the
specified domain.public final boolean addDomain(@NonNull
Domain domain,
Credentials... credentials)
throws IOException
Domain with seed credentials.domain - the domain.credentials - the initial credentials with which to populate the domain.true if the CredentialsStore was modified.IOException - if the change could not be persisted.public boolean addDomain(@NonNull
Domain domain,
List<Credentials> credentials)
throws IOException
Domain with seed credentials.domain - the domain.credentials - the initial credentials with which to populate the domain.true if the CredentialsStore was modified.IOException - if the change could not be persisted.public boolean removeDomain(@NonNull
Domain domain)
throws IOException
Domain and all associated Credentials.domain - the domain.true if the CredentialsStore was modified.IOException - if the change could not be persisted.public boolean updateDomain(@NonNull
Domain current,
@NonNull
Domain replacement)
throws IOException
Domain keeping the existing associated Credentials.current - the domain to update.replacement - the new replacement domain.true if the CredentialsStore was modified.IOException - if the change could not be persisted.public abstract boolean addCredentials(@NonNull
Domain domain,
@NonNull
Credentials credentials)
throws IOException
domain - the domain.credentials - the credentialstrue if the CredentialsStore was modified.IOException - if the change could not be persisted.public abstract boolean removeCredentials(@NonNull
Domain domain,
@NonNull
Credentials credentials)
throws IOException
domain - the domain.credentials - the credentialstrue if the CredentialsStore was modified.IOException - if the change could not be persisted.public abstract boolean updateCredentials(@NonNull
Domain domain,
@NonNull
Credentials current,
@NonNull
Credentials replacement)
throws IOException
Credentials from the specified Domain for this CredentialsStore with the supplied replacement.domain - the domain.current - the credentials to update.replacement - the new replacement credentials.true if the CredentialsStore was modified.IOException - if the change could not be persisted.Copyright © 2004-2015. All Rights Reserved.