Class UserCredentialsProvider.UserCredentialsProperty
- java.lang.Object
-
- hudson.model.UserProperty
-
- com.cloudbees.plugins.credentials.UserCredentialsProvider.UserCredentialsProperty
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<UserProperty>
,ReconfigurableDescribable<UserProperty>
- Enclosing class:
- UserCredentialsProvider
public static class UserCredentialsProvider.UserCredentialsProperty extends UserProperty
Need a user property to hold the user's personal credentials.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserCredentialsProvider.UserCredentialsProperty.DescriptorImpl
Our user property descriptor.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.UserProperty
user
-
-
Constructor Summary
Constructors Constructor Description UserCredentialsProperty(DomainCredentials[] domainCredentials)
Constructor for stapler.UserCredentialsProperty(List<Credentials> credentials)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Credentials>
getCredentials()
Gets all the user's credentials.<C extends Credentials>
List<C>getCredentials(Class<C> type)
Helper method.List<DomainCredentials>
getDomainCredentials()
Returns theDomainCredentials
Map<Domain,List<Credentials>>
getDomainCredentialsMap()
The map of domain credentials.UserProperty
reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form)
void
setDomainCredentialsMap(Map<Domain,List<Credentials>> domainCredentialsMap)
Sets the map of domain credentials.-
Methods inherited from class hudson.model.UserProperty
all, getDescriptor, setUser
-
-
-
-
Constructor Detail
-
UserCredentialsProperty
@Deprecated public UserCredentialsProperty(List<Credentials> credentials)
Deprecated.Backwards compatibility.- Parameters:
credentials
- the credentials.
-
UserCredentialsProperty
@DataBoundConstructor public UserCredentialsProperty(DomainCredentials[] domainCredentials)
Constructor for stapler.- Parameters:
domainCredentials
- the credentials.- Since:
- 1.5
-
-
Method Detail
-
getCredentials
public <C extends Credentials> List<C> getCredentials(Class<C> type)
Helper method.- Type Parameters:
C
- type of credentials to get.- Parameters:
type
- type of credentials to get.- Returns:
- the subset of the user's credentials that are of the specified type.
-
getCredentials
public List<Credentials> getCredentials()
Gets all the user's credentials.- Returns:
- all the user's credentials.
-
getDomainCredentials
public List<DomainCredentials> getDomainCredentials()
Returns theDomainCredentials
- Returns:
- the
DomainCredentials
- Since:
- 1.5
-
getDomainCredentialsMap
@NonNull public Map<Domain,List<Credentials>> getDomainCredentialsMap()
The map of domain credentials.- Returns:
- The map of domain credentials.
- Since:
- 1.5
-
setDomainCredentialsMap
public void setDomainCredentialsMap(Map<Domain,List<Credentials>> domainCredentialsMap)
Sets the map of domain credentials.- Parameters:
domainCredentialsMap
- the map of domain credentials.- Since:
- 1.5
-
reconfigure
public UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form)
- Specified by:
reconfigure
in interfaceReconfigurableDescribable<UserProperty>
- Overrides:
reconfigure
in classUserProperty
-
-