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 aCredentialsStore
.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description WrappedCredentialsStore(CredentialsSelectHelper.ContextResolver resolver, CredentialsProvider provider, String token, CredentialsStore store)
Our constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doAddCredentials(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Stapler web binding for adding credentials to the domain.List<CredentialsDescriptor>
getCredentialsDescriptors()
Exposes theCredentialsDescriptor
instances appropriate for thisCredentialsStore
.String
getDescription()
Exposes the description of this store (i.e.String
getDisplayName()
String
getIconClassName()
CredentialsStore
getStore()
The backingCredentialsStore
.String
getUrl()
Exposes our URL (as we will be invoked from an unknown page so we need an absolute URL).CredentialsStoreAction.DomainWrapper
getWrapper()
Returns aCredentialsStoreAction.DomainWrapper
to use for contextualizing the credentials form.Map<String,CredentialsStoreAction.DomainWrapper>
getWrappers()
TheCredentialsStoreAction.DomainWrapper
instances.
-
-
-
Constructor Detail
-
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 Detail
-
doAddCredentials
public void 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
public CredentialsStoreAction.DomainWrapper getWrapper()
Returns aCredentialsStoreAction.DomainWrapper
to use for contextualizing the credentials form.- Returns:
- a
CredentialsStoreAction.DomainWrapper
to use for contextualizing the credentials form.
-
getIconClassName
public String getIconClassName()
- Specified by:
getIconClassName
in interfaceIconSpec
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
-
getDescription
public String getDescription()
Exposes the description of this store (i.e. theCredentialsProvider.getDisplayName()
.- Returns:
- the description of this store (i.e. the
CredentialsProvider.getDisplayName()
.
-
getUrl
public String getUrl()
Exposes our URL (as we will be invoked from an unknown page so we need an absolute URL).- Returns:
- our URL.
-
getCredentialsDescriptors
public List<CredentialsDescriptor> getCredentialsDescriptors()
Exposes theCredentialsDescriptor
instances appropriate for thisCredentialsStore
.- Returns:
- the
CredentialsDescriptor
instances appropriate for thisCredentialsStore
.
-
getWrappers
public Map<String,CredentialsStoreAction.DomainWrapper> getWrappers()
TheCredentialsStoreAction.DomainWrapper
instances.- Returns:
- the
CredentialsStoreAction.DomainWrapper
instances.
-
getStore
public CredentialsStore getStore()
The backingCredentialsStore
.- Returns:
- backing
CredentialsStore
. - Since:
- 2.1.5
-
-