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.
  • Constructor Details

    • 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 Details

    • 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 the DomainCredentials
      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 interface ReconfigurableDescribable<UserProperty>
      Overrides:
      reconfigure in class UserProperty