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,IconSpec
- Enclosing class:
CredentialsStoreAction
@ExportedBean
public static class CredentialsStoreAction.DomainWrapper
extends AbstractDescribableImpl<CredentialsStoreAction.DomainWrapper>
implements ModelObject, AccessControlled, IconSpec
A wrapper object to bind and expose
Domain instances into the web UI.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOur Descriptor. -
Constructor Summary
ConstructorsConstructorDescriptionDomainWrapper(CredentialsStoreAction parent, Domain domain) Our constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckPermission(Permission permission) voiddoConfigDotXml(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Accepts config.xml submission, as well as serve it.org.kohsuke.stapler.HttpResponsedoConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req) Updates the domain configuration.org.kohsuke.stapler.HttpResponsedoCreateCredentials(org.kohsuke.stapler.StaplerRequest2 req) Creates a credential.org.kohsuke.stapler.HttpResponsedoDoDelete(org.kohsuke.stapler.StaplerRequest2 req) Deletes a domain.getACL()getApi()Expose a JenkinsApi.getCredential(String id) Get a credential by id.ExposeCredentialsStoreAction.CredentialsWrapper.DescriptorImplto Jelly.Exposes a map of the wrapped credentials.Exposes the wrapped credentials for the XML API.Expose theDomain.getDescription().Return the display name.Expose the backingDomain.final StringReturn the full display name.final StringReturn the full name.Expose the parentCredentialsStoreAction.getStore()Expose the backingCredentialsStore.Return the URL name.booleanhasPermission(Permission permission) booleanisGlobal()Expose a flag to indicate that the wrapped domain is the global domain.voidupdateByXml(Source source) Updates aCredentialsby its XML definition.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, hasAnyPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
DomainWrapper
Our constructor.- Parameters:
parent- our parent action.domain- the domain we are wrapping.
-
-
Method Details
-
getApi
Expose a JenkinsApi.- Returns:
- the
Api.
-
getStore
Expose the backingCredentialsStore.- Returns:
- the backing
CredentialsStore.
-
getDomain
Expose the backingDomain.- Returns:
- the backing
Domain.
-
getParent
Expose the parentCredentialsStoreAction.- Returns:
- the parent
CredentialsStoreAction.
-
getUrlName
Return the URL name.- Returns:
- the URL name.
-
getDisplayName
Return the display name.- Specified by:
getDisplayNamein interfaceModelObject- Returns:
- the display name.
-
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec
-
getFullName
Return the full name.- Returns:
- the full name.
-
getFullDisplayName
Return the full display name.- Returns:
- the full display name.
-
getDescription
Expose theDomain.getDescription().- Returns:
- the
Domain.getDescription().
-
isGlobal
@Exported public boolean isGlobal()Expose a flag to indicate that the wrapped domain is the global domain.- Returns:
trueif and only if the wrapped domain is the global domain.
-
getCredentialDescriptor
ExposeCredentialsStoreAction.CredentialsWrapper.DescriptorImplto Jelly.- Returns:
- the
CredentialsStoreAction.CredentialsWrapper.DescriptorImplsingleton.
-
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
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.StaplerRequest2 req) throws jakarta.servlet.ServletException, IOException Creates a credential.- Parameters:
req- the request.- Returns:
- the response.
- Throws:
jakarta.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.StaplerRequest2 req) throws jakarta.servlet.ServletException, IOException Updates the domain configuration.- Parameters:
req- the request.- Returns:
- the response.
- Throws:
jakarta.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.StaplerRequest2 req) throws IOException Deletes a domain.- Parameters:
req- the request.- Returns:
- the response.
- Throws:
IOException- if something goes wrong.
-
doConfigDotXml
@WebMethod(name="config.xml") @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doConfigDotXml(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException Accepts config.xml submission, as well as serve it.- Parameters:
req- the requestrsp- 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 aCredentialsby its XML definition.- Parameters:
source- source of the Item's new definition. The source should be either aStreamSourceor aSAXSource, other sources may not be handled.- Throws:
IOException- if things go wrong.- Since:
- 2.1.1
-
getACL
- Specified by:
getACLin interfaceAccessControlled
-
checkPermission
public void checkPermission(@NonNull Permission permission) throws org.springframework.security.access.AccessDeniedException - Specified by:
checkPermissionin interfaceAccessControlled- Throws:
org.springframework.security.access.AccessDeniedException
-
hasPermission
- Specified by:
hasPermissionin interfaceAccessControlled
-