Class CredentialsStoreAction
java.lang.Object
com.cloudbees.plugins.credentials.CredentialsStoreAction
- All Implemented Interfaces:
Action,ModelObject,AccessControlled,ModelObjectWithChildren,ModelObjectWithContextMenu,IconSpec
- Direct Known Subclasses:
SystemCredentialsProvider.UserFacingAction,UserCredentialsProvider.UserFacingAction
@ExportedBean
public abstract class CredentialsStoreAction
extends Object
implements Action, IconSpec, AccessControlled, ModelObjectWithContextMenu, ModelObjectWithChildren
An action for a
CredentialsStore-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA wrapper object to bind and exposeCredentialsinstances into the web UI.static classA wrapper object to bind and exposeDomaininstances into the web UI.Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PermissionExposeCredentialsProvider.CREATEfor Jelly.static final PermissionExposeCredentialsProvider.DELETEfor Jelly.static final XStream2AnXStream2that replacesSecretandSecretBytesinstances with a hash of the secret and omits fields that should be excluded from credentials fingerprinting.static final PermissionExposeCredentialsProvider.MANAGE_DOMAINSfor Jelly.static final XStream2static final PermissionExposeCredentialsProvider.UPDATEfor Jelly.static final PermissionExposeCredentialsProvider.VIEWfor Jelly. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckPermission(Permission permission) doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) doContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) org.kohsuke.stapler.HttpResponsedoCreateDomain(org.kohsuke.stapler.StaplerRequest2 req) Creates a domain.getACL()Any additional actions to display for thisCredentialsStore.getApi()Expose the action'sApi.getChildrenContextMenu(String prefix) Creates the children context menu with the supplied prefix to all URLs.getContextMenu(String prefix) Creates the context menu with the supplied prefix to all URLs.Gets the namedCredentialsStoreAction.DomainWrapper.ExposesCredentialsStoreAction.DomainWrapper.DescriptorImplfor Jelly.Returns the map ofCredentialsStoreAction.DomainWrapperinstances.getDynamic(String token) Exposes thegetActions()for Stapler.final StringReturns theItem.getFullDisplayName()or nearest approximation.final StringReturns theItem.getFullName()or nearest approximation.Gets all theDomainSpecificationdescriptors.abstract CredentialsStoregetStore()Returns theCredentialsStorebacking this action.booleanhasPermission(Permission permission) booleanExposesCredentialsStore.isDomainsModifiable()for Jelly.booleanChecks if this action should be visible.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 jenkins.model.ModelObjectWithChildren
doChildrenContextMenuMethods inherited from interface jenkins.model.ModelObjectWithContextMenu
doContextMenu
-
Field Details
-
VIEW
ExposeCredentialsProvider.VIEWfor Jelly. -
CREATE
ExposeCredentialsProvider.CREATEfor Jelly. -
UPDATE
ExposeCredentialsProvider.UPDATEfor Jelly. -
DELETE
ExposeCredentialsProvider.DELETEfor Jelly. -
MANAGE_DOMAINS
ExposeCredentialsProvider.MANAGE_DOMAINSfor Jelly. -
SECRETS_REDACTED
- Since:
- 2.1.1
-
FINGERPRINT_XML
AnXStream2that replacesSecretandSecretBytesinstances with a hash of the secret and omits fields that should be excluded from credentials fingerprinting.- Since:
- 2.1.15
-
-
Constructor Details
-
CredentialsStoreAction
public CredentialsStoreAction()
-
-
Method Details
-
getStore
Returns theCredentialsStorebacking this action.- Returns:
- the
CredentialsStore.
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getActions
Any additional actions to display for thisCredentialsStore.- Returns:
- Any additional actions to display for this
CredentialsStore. - Since:
- 2.0
-
getDynamic
Exposes thegetActions()for Stapler.- Parameters:
token- the name of the action.- Returns:
- the
Actionornull - Since:
- 2.0
-
getContextMenu
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
-
getChildrenContextMenu
Creates the children 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
-
doChildrenContextMenu
public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) - Specified by:
doChildrenContextMenuin interfaceModelObjectWithChildren
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getApi
Expose the action'sApi.- Returns:
- the action's
Api.
-
isVisible
public boolean isVisible()Checks if this action should be visible.- Returns:
trueif the action should be visible.
-
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec
-
getFullName
Returns theItem.getFullName()or nearest approximation.- Returns:
- the
Item.getFullName()or nearest approximation.
-
getFullDisplayName
Returns theItem.getFullDisplayName()or nearest approximation.- Returns:
- the
Item.getFullDisplayName()or nearest approximation.
-
getDomains
Returns the map ofCredentialsStoreAction.DomainWrapperinstances.- Returns:
- the map of
CredentialsStoreAction.DomainWrapperinstances.
-
getDomain
Gets the namedCredentialsStoreAction.DomainWrapper.- Parameters:
name- the name.- Returns:
- the named
CredentialsStoreAction.DomainWrapper.
-
isDomainsModifiable
public boolean isDomainsModifiable()ExposesCredentialsStore.isDomainsModifiable()for Jelly.- Returns:
CredentialsStore.isDomainsModifiable().
-
getDomainDescriptor
ExposesCredentialsStoreAction.DomainWrapper.DescriptorImplfor Jelly. -
getSpecificationDescriptors
public DescriptorExtensionList<DomainSpecification,Descriptor<DomainSpecification>> getSpecificationDescriptors()Gets all theDomainSpecificationdescriptors.- Returns:
- all the
DomainSpecificationdescriptors.
-
doCreateDomain
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.kohsuke.stapler.HttpResponse doCreateDomain(org.kohsuke.stapler.StaplerRequest2 req) throws jakarta.servlet.ServletException, IOException Creates a domain.- Parameters:
req- the request.- Returns:
- the response.
- Throws:
jakarta.servlet.ServletException- if something goes wrong.IOException- if something goes wrong.
-
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
-