public abstract static class CredentialsSelectHelper.ContextResolver extends Object implements hudson.ExtensionPoint
ModelObject instances.| Modifier and Type | Field and Description |
|---|---|
static CredentialsSelectHelper.ContextResolver |
NONE
A
CredentialsSelectHelper.ContextResolver that can be used as a marker. |
| Constructor and Description |
|---|
ContextResolver() |
| Modifier and Type | Method and Description |
|---|---|
static String |
displayName(CredentialsSelectHelper.ContextResolver resolver)
Returns a human readable descripton of the type of context objects that the specified resolver resolves.
|
abstract hudson.model.ModelObject |
getContext(String token)
Maps a token from
getToken(ModelObject) back to its original ModelObject. |
abstract String |
getDisplayName()
Returns a human readable descripton of the type of context objects that this resolver resolves.
|
abstract String |
getToken(hudson.model.ModelObject context)
Maps a context object (a
ModelObject) into a token that can be used to recover the context. |
public static final CredentialsSelectHelper.ContextResolver NONE
CredentialsSelectHelper.ContextResolver that can be used as a marker.@CheckForNull public abstract String getToken(hudson.model.ModelObject context)
ModelObject) into a token that can be used to recover the context.context - the ModelObject.CredentialsSelectHelper.ContextResolver can recover the object or null if the
ModelObject type is not supported by this CredentialsSelectHelper.ContextResolver.@CheckForNull public abstract hudson.model.ModelObject getContext(String token)
getToken(ModelObject) back to its original ModelObject.token - the token.ModelObject or null if the object no longer exists or if the
user does not have permission to access that object.@NonNull public abstract String getDisplayName()
AbstractMethodError - if somebody compiled against pre-2.1.1 implementations. Use
displayName(CredentialsSelectHelper.ContextResolver)
if you would prefer not to have to catch them.public static String displayName(CredentialsSelectHelper.ContextResolver resolver)
resolver - the context resolver to get the display name of.Copyright © 2016–2017. All rights reserved.