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
Modifier and TypeClassDescriptionstatic interface
Deprecated.protected static final class
Nested classes/interfaces inherited from class org.jenkinsci.plugins.credentialsbinding.MultiBinding
MultiBinding.MultiEnvironment, MultiBinding.NullUnbinder, MultiBinding.Unbinder
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
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 C
getCredentials
(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:
IOException
InterruptedException
-
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:
IOException
InterruptedException
-
bind
public final MultiBinding.MultiEnvironment bind(@NonNull Run<?, ?> build, @Nullable FilePath workspace, @Nullable Launcher launcher, @NonNull TaskListener listener) throws IOException, InterruptedExceptionDescription copied from class:MultiBinding
Sets up bindings for a build.- Specified by:
bind
in 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:
IOException
InterruptedException
-
variables
Description copied from class:MultiBinding
Defines keys expected to be set inMultiBinding.MultiEnvironment.getSecretValues()
, particularly any that might be sensitive.- Overrides:
variables
in classMultiBinding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>
-
getCredentials
@Deprecated @NonNull protected final C getCredentials(@NonNull AbstractBuild<?, ?> build) throws IOExceptionDeprecated.- Throws:
IOException
-