public static class UserCredentialsProvider.StoreImpl extends CredentialsStore
Modifier and Type | Method and Description |
---|---|
boolean |
addCredentials(Domain domain,
Credentials credentials)
|
boolean |
addDomain(Domain domain,
List<Credentials> credentials)
Adds a new
Domain with seed credentials. |
hudson.security.ACL |
getACL() |
hudson.model.ModelObject |
getContext()
Returns the context within which this store operates.
|
List<Credentials> |
getCredentials(Domain domain)
Returns an unmodifiable list of credentials for the specified domain.
|
List<Domain> |
getDomains()
Returns all the
Domain s that this credential provider has. |
boolean |
hasPermission(org.acegisecurity.Authentication a,
hudson.security.Permission permission)
Checks if the given principle has the given permission.
|
boolean |
removeCredentials(Domain domain,
Credentials credentials)
|
boolean |
removeDomain(Domain domain)
Removes an existing
Domain and all associated Credentials . |
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 . |
addDomain, checkPermission, hasPermission, isDomainsModifiable
public hudson.model.ModelObject getContext()
CredentialsStore
CredentialsScope.SYSTEM
is valid for the store) but will not be available to
parent contexts.getContext
in class CredentialsStore
public boolean hasPermission(@NonNull org.acegisecurity.Authentication a, @NonNull hudson.security.Permission permission)
CredentialsStore
hasPermission
in class CredentialsStore
public hudson.security.ACL getACL()
CredentialsStore
getACL
in interface hudson.security.AccessControlled
getACL
in class CredentialsStore
@NonNull @Exported public List<Domain> getDomains()
Domain
s that this credential provider has.
Most implementers of CredentialsStore
will probably want to override this method.getDomains
in class CredentialsStore
public boolean addDomain(@NonNull Domain domain, List<Credentials> credentials) throws IOException
Domain
with seed credentials.addDomain
in class CredentialsStore
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
.removeDomain
in class CredentialsStore
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
.updateDomain
in class CredentialsStore
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 boolean addCredentials(@NonNull Domain domain, @NonNull Credentials credentials) throws IOException
addCredentials
in class CredentialsStore
domain
- the domain.credentials
- the credentialstrue
if the CredentialsStore
was modified.IOException
- if the change could not be persisted.@NonNull @Exported public List<Credentials> getCredentials(@NonNull Domain domain)
getCredentials
in class CredentialsStore
domain
- the domain.Domain
) unmodifiable list of credentials for the
specified domain.public boolean removeCredentials(@NonNull Domain domain, @NonNull Credentials credentials) throws IOException
removeCredentials
in class CredentialsStore
domain
- the domain.credentials
- the credentialstrue
if the CredentialsStore
was modified.IOException
- if the change could not be persisted.public 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.updateCredentials
in class CredentialsStore
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 © 2016. All rights reserved.