Class CredentialsStoreAction.DomainWrapper

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

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

    • DomainWrapper

      public DomainWrapper(CredentialsStoreAction parent, Domain domain)
      Our constructor.
      Parameters:
      parent - our parent action.
      domain - the domain we are wrapping.
  • Method Details

    • getApi

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

      public CredentialsStore getStore()
      Expose the backing CredentialsStore.
      Returns:
      the backing CredentialsStore.
    • getDomain

      public Domain getDomain()
      Expose the backing Domain.
      Returns:
      the backing Domain.
    • getParent

      public CredentialsStoreAction getParent()
      Expose the parent CredentialsStoreAction.
      Returns:
      the parent CredentialsStoreAction.
    • getUrlName

      @Exported public String getUrlName()
      Return the URL name.
      Returns:
      the URL name.
    • getDisplayName

      @Exported public String getDisplayName()
      Return the display name.
      Specified by:
      getDisplayName in interface ModelObject
      Returns:
      the display name.
    • getFullName

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

      @Exported public final String getFullDisplayName()
      Return the full display name.
      Returns:
      the full display name.
    • getDescription

      @Exported public String getDescription()
      Returns:
      the Domain.getDescription().
    • isGlobal

      @Exported public boolean isGlobal()
      Expose a flag to indicate that the wrapped domain is the global domain.
      Returns:
      true if and only if the wrapped domain is the global domain.
    • getCredentialDescriptor

      Returns:
      the CredentialsStoreAction.CredentialsWrapper.DescriptorImpl singleton.
    • getCredentials

      @NonNull public Map<String,CredentialsStoreAction.CredentialsWrapper> getCredentials()
      Exposes a map of the wrapped credentials.
      Returns:
      a map of the wrapped credentials.
    • getCredentialsList

      @NonNull @Exported(name="credentials", visibility=1) public List<CredentialsStoreAction.CredentialsWrapper> getCredentialsList()
      Exposes the wrapped credentials for the XML API.
      Returns:
      the wrapped credentials for the XML API.
      Since:
      2.1.0
    • getCredential

      @CheckForNull public CredentialsStoreAction.CredentialsWrapper getCredential(String id)
      Get a credential by id.
      Parameters:
      id - the id.
      Returns:
      the CredentialsStoreAction.CredentialsWrapper.
    • doCreateCredentials

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doCreateCredentials(org.kohsuke.stapler.StaplerRequest req) throws javax.servlet.ServletException, IOException
      Creates a credential.
      Parameters:
      req - the request.
      Returns:
      the response.
      Throws:
      javax.servlet.ServletException - if something goes wrong.
      IOException - if something goes wrong.
    • doConfigSubmit

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

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

      @CheckForNull 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
    • getChildrenContextMenu

      @CheckForNull public ModelObjectWithContextMenu.ContextMenu getChildrenContextMenu(String prefix)
      Creates the children 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
    • doChildrenContextMenu

      public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
      Specified by:
      doChildrenContextMenu in interface ModelObjectWithChildren
    • 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