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
ConstructorsConstructorDescriptionWrappedCredentialsStore(CredentialsSelectHelper.ContextResolver resolver, CredentialsProvider provider, String token, CredentialsStore store) Our constructor. -
Method Summary
Modifier and TypeMethodDescriptionnet.sf.json.JSONObjectdoAddCredentials(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Stapler web binding for adding credentials to the domain.Exposes theCredentialsDescriptorinstances 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.DomainWrapperto use for contextualizing the credentials form.TheCredentialsStoreAction.DomainWrapperinstances.
-
Constructor Details
-
WrappedCredentialsStore
public WrappedCredentialsStore(@NonNull CredentialsSelectHelper.ContextResolver resolver, @NonNull CredentialsProvider provider, @NonNull String token, @NonNull CredentialsStore store) Our constructor.- Parameters:
resolver- theCredentialsSelectHelper.ContextResolverprovider- theCredentialsProvidertoken- 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.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Stapler web binding for adding credentials to the domain.- Parameters:
req- the request.rsp- the response.- Throws:
IOException- if something goes wrong.jakarta.servlet.ServletException- if something goes wrong.
-
getWrapper
Returns aCredentialsStoreAction.DomainWrapperto use for contextualizing the credentials form.- Returns:
- a
CredentialsStoreAction.DomainWrapperto use for contextualizing the credentials form.
-
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec
-
getDisplayName
- Specified by:
getDisplayNamein 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 theCredentialsDescriptorinstances appropriate for thisCredentialsStore.- Returns:
- the
CredentialsDescriptorinstances appropriate for thisCredentialsStore.
-
getWrappers
TheCredentialsStoreAction.DomainWrapperinstances.- Returns:
- the
CredentialsStoreAction.DomainWrapperinstances.
-
getStore
The backingCredentialsStore.- Returns:
- backing
CredentialsStore. - Since:
- 2.1.5
-