Class CredentialsStoreAction.CredentialsWrapper

java.lang.Object
hudson.model.AbstractDescribableImpl<CredentialsStoreAction.CredentialsWrapper>
com.cloudbees.plugins.credentials.CredentialsStoreAction.CredentialsWrapper
All Implemented Interfaces:
Describable<CredentialsStoreAction.CredentialsWrapper>, ModelObject, AccessControlled, ModelObjectWithContextMenu, IconSpec
Enclosing class:
CredentialsStoreAction

@ExportedBean public static class CredentialsStoreAction.CredentialsWrapper extends AbstractDescribableImpl<CredentialsStoreAction.CredentialsWrapper> implements IconSpec, ModelObjectWithContextMenu, AccessControlled
A wrapper object to bind and expose Credentials instances into the web UI.
  • Constructor Details

  • Method Details

    • getId

      @Exported public String getId()
      Return the id for the XML API.
      Returns:
      the id.
      Since:
      2.1.0
    • getUrlName

      public String getUrlName()
      Return the URL name.
      Returns:
      the URL name.
    • getIconClassName

      public String getIconClassName()
      Specified by:
      getIconClassName in interface IconSpec
    • getApi

      public Api getApi()
      Expose a Jenkins Api.
      Returns:
      the Api.
    • getDisplayName

      @Exported public String getDisplayName()
      Gets the display name of the Credentials.
      Specified by:
      getDisplayName in interface ModelObject
      Returns:
      the display name of the Credentials.
    • getTypeName

      @Exported public String getTypeName()
      Gets the display name of the CredentialsDescriptor.
      Returns:
      the display name of the CredentialsDescriptor.
    • getDescription

      @Exported public String getDescription()
      Gets the description of the Credentials.
      Returns:
      the description of the Credentials.
    • getFullName

      @Exported public final String getFullName()
      Gets the full name of the Credentials.
      Returns:
      the full name of the Credentials.
    • getFullDisplayName

      public final String getFullDisplayName()
      Gets the full display name of the Credentials.
      Returns:
      the full display name of the Credentials.
    • getCredentials

      public Credentials getCredentials()
      Exposes the backing Credentials.
      Returns:
      the backing Credentials.
    • getDomain

      Returns:
      the backing CredentialsStoreAction.DomainWrapper.
    • getParent

      Returns:
      the backing CredentialsStoreAction.DomainWrapper.
    • getStore

      public CredentialsStore getStore()
      Exposes the backing CredentialsStore.
      Returns:
      the backing CredentialsStore.
    • getFingerprint

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Exported(visibility=1) public Fingerprint getFingerprint() throws IOException
      Exposes the fingerprint for Jelly pages.
      Returns:
      the Fingerprint.
      Throws:
      IOException - if the Fingerprint could not be retrieved.
      Since:
      2.1.1
    • isFingerprintEnabled

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isFingerprintEnabled()
    • doDoDelete

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doDoDelete(org.kohsuke.stapler.StaplerRequest req) throws IOException
      Deletes the credentials.
      Parameters:
      req - the request.
      Returns:
      the response.
      Throws:
      IOException - if something goes wrong.
    • doDoMove

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doDoMove(org.kohsuke.stapler.StaplerRequest req, @QueryParameter String destination) throws IOException
      Moves the credential.
      Parameters:
      req - the request.
      destination - the destination
      Returns:
      the response.
      Throws:
      IOException - if something goes wrong.
    • doUpdateSubmit

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doUpdateSubmit(org.kohsuke.stapler.StaplerRequest req) throws javax.servlet.ServletException, IOException
      Updates the credentials.
      Parameters:
      req - the request.
      Returns:
      the response.
      Throws:
      javax.servlet.ServletException - if something goes wrong.
      IOException - if something goes wrong.
    • getContextMenu

      @CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public ModelObjectWithContextMenu.ContextMenu getContextMenu(String prefix)
      Creates the context menu with the supplied prefix to all URLs.
      Parameters:
      prefix - the prefix to prepend to relative urls.
      Returns:
      the ModelObjectWithContextMenu.ContextMenu or null
      Since:
      2.0
    • doContextMenu

      public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
      Specified by:
      doContextMenu in interface ModelObjectWithContextMenu
    • doConfigDotXml

      @WebMethod(name="config.xml") @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doConfigDotXml(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
      Accepts config.xml submission, as well as serve it.
      Parameters:
      req - the request
      rsp - the response
      Throws:
      IOException - if things go wrong
      Since:
      2.1.1
    • updateByXml

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void updateByXml(Source source) throws IOException
      Updates a Credentials by its XML definition.
      Parameters:
      source - source of the Item's new definition. The source should be either a StreamSource or a SAXSource, other sources may not be handled.
      Throws:
      IOException - if things go wrong
      Since:
      2.1.1
    • getACL

      @NonNull public ACL getACL()
      Specified by:
      getACL in interface AccessControlled
    • checkPermission

      public void checkPermission(@NonNull Permission permission) throws org.springframework.security.access.AccessDeniedException
      Specified by:
      checkPermission in interface AccessControlled
      Throws:
      org.springframework.security.access.AccessDeniedException
    • hasPermission

      public boolean hasPermission(@NonNull Permission permission)
      Specified by:
      hasPermission in interface AccessControlled