@ExportedBean public static class SystemCredentialsProvider.StoreImpl extends CredentialsStore
CredentialsStore.| Constructor and Description |
|---|
StoreImpl()
Default constructor.
|
| 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
Domains that this credential provider has. |
CredentialsStoreAction |
getStoreAction()
Return the
CredentialsStoreAction for this store. |
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. |
void |
save()
Persists the state of this object into XML.
|
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. |
_isApplicable, addDomain, checkPermission, getContextDisplayName, getCredentialsDescriptors, getDomainByName, getProvider, getProviderOrDie, getRelativeLinkTo, getRelativeLinkToAction, getRelativeLinkToContext, getScopes, hasPermission, isApplicable, isDomainsModifiable@NonNull public hudson.model.ModelObject getContext()
CredentialsScope.SYSTEM is valid for the store) but will not be available to
parent contexts.getContext in class CredentialsStorepublic boolean hasPermission(@NonNull
org.acegisecurity.Authentication a,
@NonNull
hudson.security.Permission permission)
hasPermission in class CredentialsStorea - the principle.permission - the permission.false if the user doesn't have the permission.public hudson.security.ACL getACL()
CredentialsStoregetACL in interface hudson.security.AccessControlledgetACL in class CredentialsStore@NonNull @Exported public List<Domain> getDomains()
Domains that this credential provider has.
Most implementers of CredentialsStore will probably want to override this method.getDomains in class CredentialsStore@NonNull @Exported public List<Credentials> getCredentials(@NonNull Domain domain)
getCredentials in class CredentialsStoredomain - the domain.Domain) unmodifiable list of credentials for the
specified domain.public boolean addDomain(@NonNull
Domain domain,
List<Credentials> credentials)
throws IOException
Domain with seed credentials.addDomain in class CredentialsStoredomain - 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 CredentialsStoredomain - 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 CredentialsStorecurrent - 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 CredentialsStoredomain - the domain.credentials - the credentialstrue if the CredentialsStore was modified.IOException - if the change could not be persisted.public boolean removeCredentials(@NonNull
Domain domain,
@NonNull
Credentials credentials)
throws IOException
removeCredentials in class CredentialsStoredomain - 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 CredentialsStoredomain - 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.@Nullable public CredentialsStoreAction getStoreAction()
CredentialsStoreAction for this store. The action will be displayed as a sub-item of the
ViewCredentialsAction. Return null if this store will take control of displaying its action
(which will be the case for legacy implementations)getStoreAction in class CredentialsStoreCredentialsStoreAction for this store to be rendered in ViewCredentialsAction or
null for old implementations compiled against pre 2.0 versions of credentials plugin.public void save()
throws IOException
CredentialsStore.getContext() if it
implements Saveable otherwise dropping back to a no-op.save in interface hudson.model.Saveablesave in class CredentialsStoreIOExceptionSaveable.save()Copyright © 2016–2017. All rights reserved.