Class CredentialsSelectHelper.WrappedCredentialsStore
java.lang.Object
com.cloudbees.plugins.credentials.CredentialsSelectHelper.WrappedCredentialsStore
- All Implemented Interfaces:
ModelObject
,IconSpec
- Enclosing class:
- CredentialsSelectHelper
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public static final class CredentialsSelectHelper.WrappedCredentialsStore
extends Object
implements IconSpec, ModelObject
Stapler binding for a
CredentialsStore
.- Since:
- 2.0
-
Constructor Summary
ConstructorDescriptionWrappedCredentialsStore
(CredentialsSelectHelper.ContextResolver resolver, CredentialsProvider provider, String token, CredentialsStore store) Our constructor. -
Method Summary
Modifier and TypeMethodDescriptionnet.sf.json.JSONObject
doAddCredentials
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Stapler web binding for adding credentials to the domain.Exposes theCredentialsDescriptor
instances appropriate for thisCredentialsStore
.Exposes the description of this store (i.e.getStore()
The backingCredentialsStore
.getUrl()
Exposes our URL (as we will be invoked from an unknown page so we need an absolute URL).Returns aCredentialsStoreAction.DomainWrapper
to use for contextualizing the credentials form.TheCredentialsStoreAction.DomainWrapper
instances.
-
Constructor Details
-
WrappedCredentialsStore
public WrappedCredentialsStore(@NonNull CredentialsSelectHelper.ContextResolver resolver, @NonNull CredentialsProvider provider, @NonNull String token, @NonNull CredentialsStore store) Our constructor.- Parameters:
resolver
- theCredentialsSelectHelper.ContextResolver
provider
- theCredentialsProvider
token
- the context'sCredentialsSelectHelper.ContextResolver.getToken(ModelObject)
.store
- theCredentialsStore
-
-
Method Details
-
doAddCredentials
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public net.sf.json.JSONObject doAddCredentials(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException Stapler web binding for adding credentials to the domain.- Parameters:
req
- the request.rsp
- the response.- Throws:
IOException
- if something goes wrong.javax.servlet.ServletException
- if something goes wrong.
-
getWrapper
Returns aCredentialsStoreAction.DomainWrapper
to use for contextualizing the credentials form.- Returns:
- a
CredentialsStoreAction.DomainWrapper
to use for contextualizing the credentials form.
-
getIconClassName
- Specified by:
getIconClassName
in interfaceIconSpec
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-
getDescription
Exposes the description of this store (i.e. theCredentialsProvider.getDisplayName()
.- Returns:
- the description of this store (i.e. the
CredentialsProvider.getDisplayName()
.
-
getUrl
Exposes our URL (as we will be invoked from an unknown page so we need an absolute URL).- Returns:
- our URL.
-
getCredentialsDescriptors
Exposes theCredentialsDescriptor
instances appropriate for thisCredentialsStore
.- Returns:
- the
CredentialsDescriptor
instances appropriate for thisCredentialsStore
.
-
getWrappers
TheCredentialsStoreAction.DomainWrapper
instances.- Returns:
- the
CredentialsStoreAction.DomainWrapper
instances.
-
getStore
The backingCredentialsStore
.- Returns:
- backing
CredentialsStore
. - Since:
- 2.1.5
-