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 Classes Modifier and Type Class Description static interface
Binding.Environment
Deprecated.protected static class
Binding.SingleEnvironment
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Binding.Environment
bind(AbstractBuild build, Launcher launcher, BuildListener listener)
Deprecated.MultiBinding.MultiEnvironment
bind(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
Sets up bindings for a build.Binding.SingleEnvironment
bindSingle(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
Sets up bindings for a build.protected C
getCredentials(AbstractBuild<?,?> build)
Deprecated.String
getVariable()
Environment variable name.Set<String>
variables(Run<?,?> build)
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
-
-
-
-
Method Detail
-
getVariable
public String 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, InterruptedException
Sets 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, InterruptedException
Description 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
public final Set<String> variables(@NonNull Run<?,?> build)
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 IOException
Deprecated.- Throws:
IOException
-
-