Class MultiBinding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>
java.lang.Object
hudson.model.AbstractDescribableImpl<MultiBinding<C>>
org.jenkinsci.plugins.credentialsbinding.MultiBinding<C>
- Type Parameters:
- C- a kind of credentials
- All Implemented Interfaces:
- ExtensionPoint,- Describable<MultiBinding<C>>
- Direct Known Subclasses:
- Binding,- CertificateMultiBinding,- SSHUserPrivateKeyBinding,- UsernamePasswordMultiBinding
public abstract class MultiBinding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>
extends AbstractDescribableImpl<MultiBinding<C>>
implements ExtensionPoint
A way of binding a kind of credentials to an environment variable during a build.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classprotected static final classNo-op callback.static interfaceCallback run at the end of a build.Nested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedMultiBinding(String credentialsId) For use withDataBoundConstructor.
- 
Method SummaryModifier and TypeMethodDescriptionabstract MultiBinding.MultiEnvironmentbind(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) Sets up bindings for a build.protected final CgetCredentials(Run<?, ?> build) Looks up the actual credentials.final StringIdentifier of the credentials to be bound.type()Type token.Deprecated.Defines keys expected to be set inMultiBinding.MultiEnvironment.getSecretValues(), particularly any that might be sensitive.
- 
Constructor Details- 
MultiBindingFor use withDataBoundConstructor.
 
- 
- 
Method Details- 
typeType token.
- 
getCredentialsIdIdentifier of the credentials to be bound.
- 
bindpublic abstract MultiBinding.MultiEnvironment bind(@NonNull Run<?, ?> build, @Nullable FilePath workspace, @Nullable Launcher launcher, @NonNull TaskListener listener) throws IOException, InterruptedExceptionSets up bindings for a build.- Parameters:
- build- The build. Cannot be null
- workspace- The workspace - can be null if- BindingDescriptor.requiresWorkspace()is false.
- launcher- The launcher - can be null if- BindingDescriptor.requiresWorkspace()is false.
- listener- The task listener. Cannot be null.
- Returns:
- The configured MultiBinding.MultiEnvironment
- Throws:
- IOException
- InterruptedException
 
- 
variablesDeprecated.overridevariables(Run)
- 
variablesDefines keys expected to be set inMultiBinding.MultiEnvironment.getSecretValues(), particularly any that might be sensitive.- Throws:
- CredentialNotFoundException
 
- 
getCredentials@NonNull protected final C getCredentials(@NonNull Run<?, ?> build) throws CredentialNotFoundExceptionLooks up the actual credentials.- Parameters:
- build- the build.
- Returns:
- the credentials
- Throws:
- CredentialNotFoundException- if the credentials could not be found (for convenience, rather than returning null)
 
- 
getDescriptor- Specified by:
- getDescriptorin interface- Describable<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>
- Overrides:
- getDescriptorin class- AbstractDescribableImpl<MultiBinding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>>
 
 
- 
variables(Run)