public abstract class CredentialsDescriptor extends hudson.model.Descriptor<Credentials> implements org.jenkins.ui.icon.IconSpec
Modifier | Constructor and Description |
---|---|
protected |
CredentialsDescriptor()
Infers the type of the corresponding
Credentials from the outer class. |
protected |
CredentialsDescriptor(Class<? extends Credentials> clazz)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
hudson.util.ListBoxModel |
doFillScopeItems()
Fills in the scopes for a scope list-box.
|
String |
getCredentialsPage()
Returns the config page for the credentials.
|
String |
getIconClassName() |
boolean |
isScopeRelevant()
Checks if asking for a credentials scope is relevant.
|
boolean |
isScopeRelevant(CredentialsStoreAction.CredentialsWrapper wrapper)
Similar to
isScopeRelevant() but used by CredentialsStoreAction . |
boolean |
isScopeRelevant(CredentialsStoreAction.DomainWrapper wrapper)
Similar to
isScopeRelevant() but used by CredentialsStoreAction . |
boolean |
isScopeRelevant(hudson.model.ModelObject object)
Similar to
isScopeRelevant() but operating on a specific ModelObject rather than trying to
infer from the stapler request. |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
protected CredentialsDescriptor(Class<? extends Credentials> clazz)
clazz
- The concrete credentials class.protected CredentialsDescriptor()
Credentials
from the outer class.
This version works when you follow the common convention, where a descriptor
is written as the static nested class of the describable class.public hudson.util.ListBoxModel doFillScopeItems()
public boolean isScopeRelevant()
UserCredentialsProvider
, there is no need to specify the scope,
as it can only be CredentialsScope.USER
, but where the credential will be stored in
SystemCredentialsProvider
, there are multiple scopes relevant for that container, so the scope
field is relevant.true
if the nearest request object that acts as a container for credentials needs a scope
to be specified.public boolean isScopeRelevant(hudson.model.ModelObject object)
isScopeRelevant()
but operating on a specific ModelObject
rather than trying to
infer from the stapler request.object
- the object that is going to contain the credential.true
if there is more than one CredentialsScope
that can be used for the specified
object.public boolean isScopeRelevant(CredentialsStoreAction.DomainWrapper wrapper)
isScopeRelevant()
but used by CredentialsStoreAction
.wrapper
- the wrapper for the domain that is going to contain the credential.true
if there is more than one CredentialsScope
that can be used for the specified
object.public boolean isScopeRelevant(CredentialsStoreAction.CredentialsWrapper wrapper)
isScopeRelevant()
but used by CredentialsStoreAction
.wrapper
- the wrapper for the domain that is going to contain the credential.true
if there is more than one CredentialsScope
that can be used for the specified
object.public String getCredentialsPage()
public String getIconClassName()
getIconClassName
in interface org.jenkins.ui.icon.IconSpec
Copyright © 2016. All rights reserved.