Class ViewCredentialsAction
- java.lang.Object
-
- com.cloudbees.plugins.credentials.ViewCredentialsAction
-
- All Implemented Interfaces:
Action
,ModelObject
,AccessControlled
,ModelObjectWithContextMenu
,IconSpec
- Direct Known Subclasses:
ViewCredentialsAction.RootActionImpl
@ExportedBean public class ViewCredentialsAction extends Object implements Action, IconSpec, AccessControlled, ModelObjectWithContextMenu
AnAction
that lets you view the available credentials for anyModelObject
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ViewCredentialsAction.RootActionImpl
Add theViewCredentialsAction
to theJenkins
root.static class
ViewCredentialsAction.TableEntry
Value class to simplify creating the table.static class
ViewCredentialsAction.TransientTopLevelItemActionFactoryImpl
Add theViewCredentialsAction
to allTopLevelItem
instances.static class
ViewCredentialsAction.TransientUserActionFactoryImpl
Add theViewCredentialsAction
to allUser
instances.-
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
-
Field Summary
Fields Modifier and Type Field Description static Permission
MANAGE_DOMAINS
ExposeCredentialsProvider.MANAGE_DOMAINS
for Jelly.static Permission
VIEW
ExposeCredentialsProvider.VIEW
for Jelly.
-
Constructor Summary
Constructors Constructor Description ViewCredentialsAction(ModelObject context)
Constructor.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
-
-
-
Field Detail
-
VIEW
public static final Permission VIEW
ExposeCredentialsProvider.VIEW
for Jelly.
-
MANAGE_DOMAINS
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final Permission MANAGE_DOMAINS
ExposeCredentialsProvider.MANAGE_DOMAINS
for Jelly.
-
-
Constructor Detail
-
ViewCredentialsAction
public ViewCredentialsAction(ModelObject context)
Constructor.- Parameters:
context
- the context.
-
-
Method Detail
-
getContext
public ModelObject getContext()
Gets the context.- Returns:
- the context.
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getParentStores
@NonNull public List<CredentialsStore> getParentStores()
Exposes theCredentialsStore
instances available to thegetContext()
.- Returns:
- the
CredentialsStore
instances available to thegetContext()
.
-
getLocalStores
@NonNull public List<CredentialsStore> getLocalStores()
Exposes theCredentialsStore
instances available to thegetContext()
.- Returns:
- the
CredentialsStore
instances available to thegetContext()
.
-
getStoreActions
@NonNull public List<CredentialsStoreAction> getStoreActions()
Exposes thegetLocalStores()
CredentialsStore.getStoreAction()
.- Returns:
- the
getLocalStores()
CredentialsStore.getStoreAction()
.
-
getStoreActionsMap
@NonNull @Exported(name="stores") public Map<String,CredentialsStoreAction> getStoreActionsMap()
Exposes thegetLocalStores()
for the XML API.- Returns:
- the
getLocalStores()
for the XML API. - Since:
- 2.1.0
-
getStore
@CheckForNull public CredentialsStoreAction getStore(String name)
Exposes thegetStoreActions()
byCredentialsStoreAction.getUrlName()
for Stapler.- Parameters:
name
- theCredentialsStoreAction.getUrlName()
to match.- Returns:
- the
CredentialsStoreAction
ornull
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
isVisible
public boolean isVisible()
Tests if theViewCredentialsAction
should be visible.- Returns:
true
if the action should be visible.
-
getTableEntries
public List<ViewCredentialsAction.TableEntry> getTableEntries()
Returns the credential entries.- Returns:
- the credential entries.
-
getIconClassName
public String getIconClassName()
- Specified by:
getIconClassName
in interfaceIconSpec
-
getFullName
public final String getFullName()
Returns the full name of this action.- Returns:
- the full name of this action.
-
getContextFullName
public String getContextFullName()
Returns the full name of thegetContext()
.- Returns:
- the full name of the
getContext()
.
-
getFullDisplayName
public final String getFullDisplayName()
Returns the full display name of this action.- Returns:
- the full display name of this action.
-
getContextFullDisplayName
public String getContextFullDisplayName()
Returns the full display name of thegetContext()
.- Returns:
- the full display name of the
getContext()
.
-
getACL
@NonNull public ACL getACL()
- Specified by:
getACL
in interfaceAccessControlled
-
doContextMenu
public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
- Specified by:
doContextMenu
in interfaceModelObjectWithContextMenu
-
-