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.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Constructor Summary
ConstructorsConstructorDescriptionCredentialsWrapper(CredentialsStoreAction.DomainWrapper domain, Credentials credentials, String id) 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.doContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) org.kohsuke.stapler.HttpResponsedoDoDelete(org.kohsuke.stapler.StaplerRequest2 req) Deletes the credentials.org.kohsuke.stapler.HttpResponseMoves the credential.org.kohsuke.stapler.HttpResponsedoUpdateSubmit(org.kohsuke.stapler.StaplerRequest2 req) Updates the credentials.getACL()getApi()Expose a JenkinsApi.getContextMenu(String prefix) Creates the context menu with the supplied prefix to all URLs.Exposes the backingCredentials.Gets the description of theCredentials.Gets the display name of theCredentials.Exposes the backingCredentialsStoreAction.DomainWrapper.Exposes the fingerprint for Jelly pages.final StringGets the full display name of theCredentials.final StringGets the full name of theCredentials.getId()Return the id for the XML API.Exposes the backingCredentialsStoreAction.DomainWrapper.getStore()Exposes the backingCredentialsStore.Gets the display name of theCredentialsDescriptor.Return the URL name.booleanhasPermission(Permission permission) booleanvoidupdateByXml(Source source) Updates aCredentialsby its XML definition.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptorMethods 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 jenkins.model.ModelObjectWithContextMenu
doContextMenu
-
Constructor Details
-
CredentialsWrapper
public CredentialsWrapper(CredentialsStoreAction.DomainWrapper domain, Credentials credentials, String id) Constructor.- Parameters:
domain- the wrapped domain.credentials- the credentials.id- the id.
-
-
Method Details
-
getId
Return the id for the XML API.- Returns:
- the id.
- Since:
- 2.1.0
-
getUrlName
Return the URL name.- Returns:
- the URL name.
-
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec
-
getApi
Expose a JenkinsApi.- Returns:
- the
Api.
-
getDisplayName
Gets the display name of theCredentials.- Specified by:
getDisplayNamein interfaceModelObject- Returns:
- the display name of the
Credentials.
-
getTypeName
Gets the display name of theCredentialsDescriptor.- Returns:
- the display name of the
CredentialsDescriptor.
-
getDescription
Gets the description of theCredentials.- Returns:
- the description of the
Credentials.
-
getFullName
Gets the full name of theCredentials.- Returns:
- the full name of the
Credentials.
-
getFullDisplayName
Gets the full display name of theCredentials.- Returns:
- the full display name of the
Credentials.
-
getCredentials
Exposes the backingCredentials.- Returns:
- the backing
Credentials.
-
getDomain
Exposes the backingCredentialsStoreAction.DomainWrapper.- Returns:
- the backing
CredentialsStoreAction.DomainWrapper.
-
getParent
Exposes the backingCredentialsStoreAction.DomainWrapper.- Returns:
- the backing
CredentialsStoreAction.DomainWrapper.
-
getStore
Exposes the backingCredentialsStore.- Returns:
- the backing
CredentialsStore.
-
getFingerprint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Exported(visibility=1) public Fingerprint getFingerprint() throws IOExceptionExposes the fingerprint for Jelly pages.- Returns:
- the
Fingerprint. - Throws:
IOException- if theFingerprintcould 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.StaplerRequest2 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.StaplerRequest2 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.StaplerRequest2 req) throws jakarta.servlet.ServletException, IOException Updates the credentials.- Parameters:
req- the request.- Returns:
- the response.
- Throws:
jakarta.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.ContextMenuornull - Since:
- 2.0
-
doContextMenu
public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) - Specified by:
doContextMenuin interfaceModelObjectWithContextMenu
-
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
-