Class Binding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>
java.lang.Object
hudson.model.AbstractDescribableImpl<MultiBinding<C>>
org.jenkinsci.plugins.credentialsbinding.MultiBinding<C>
org.jenkinsci.plugins.credentialsbinding.Binding<C>
- Type Parameters:
C- a kind of credentials
- All Implemented Interfaces:
ExtensionPoint,Describable<MultiBinding<C>>
- Direct Known Subclasses:
AbstractOnDiskBinding,StringBinding,UsernamePasswordBinding
public abstract class Binding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>
extends MultiBinding<C>
A binding of a single variable.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.protected static final classNested classes/interfaces inherited from class org.jenkinsci.plugins.credentialsbinding.MultiBinding
MultiBinding.MultiEnvironment, MultiBinding.NullUnbinder, MultiBinding.UnbinderNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind(AbstractBuild build, Launcher launcher, BuildListener listener) Deprecated.bind(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) Sets up bindings for a build.bindSingle(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) Sets up bindings for a build.protected final CgetCredentials(AbstractBuild<?, ?> build) Deprecated.Environment variable name.Defines keys expected to be set inMultiBinding.MultiEnvironment.getSecretValues(), particularly any that might be sensitive.Methods inherited from class org.jenkinsci.plugins.credentialsbinding.MultiBinding
getCredentials, getCredentialsId, getDescriptor, type, variables
-
Constructor Details
-
Binding
For use withDataBoundConstructor.
-
-
Method Details
-
getVariable
Environment variable name. -
bind
@Deprecated public Binding.Environment bind(@NonNull AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException Deprecated.- Throws:
IOExceptionInterruptedException
-
bindSingle
public Binding.SingleEnvironment bindSingle(@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 nullworkspace- The workspace - can be null ifBindingDescriptor.requiresWorkspace()is false.launcher- The launcher - can be null ifBindingDescriptor.requiresWorkspace()is false.listener- The task listener. Cannot be null.- Returns:
- The configured
Binding.SingleEnvironment - Throws:
IOExceptionInterruptedException
-
bind
public final MultiBinding.MultiEnvironment bind(@NonNull Run<?, ?> build, @Nullable FilePath workspace, @Nullable Launcher launcher, @NonNull TaskListener listener) throws IOException, InterruptedExceptionDescription copied from class:MultiBindingSets up bindings for a build.- Specified by:
bindin classMultiBinding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>- Parameters:
build- The build. Cannot be nullworkspace- The workspace - can be null ifBindingDescriptor.requiresWorkspace()is false.launcher- The launcher - can be null ifBindingDescriptor.requiresWorkspace()is false.listener- The task listener. Cannot be null.- Returns:
- The configured
MultiBinding.MultiEnvironment - Throws:
IOExceptionInterruptedException
-
variables
Description copied from class:MultiBindingDefines keys expected to be set inMultiBinding.MultiEnvironment.getSecretValues(), particularly any that might be sensitive.- Overrides:
variablesin classMultiBinding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>
-
getCredentials
@Deprecated @NonNull protected final C getCredentials(@NonNull AbstractBuild<?, ?> build) throws IOExceptionDeprecated.- Throws:
IOException
-