Class CredentialsParameterBinder
- java.lang.Object
-
- hudson.model.InvisibleAction
-
- com.cloudbees.plugins.credentials.builds.CredentialsParameterBinder
-
- All Implemented Interfaces:
Action
,ModelObject
public final class CredentialsParameterBinder extends InvisibleAction
Tracks credentials being bound and unbound to a build. An instance is created and attached to a build when it is first looked up viagetOrCreate(Run)
. This binds any existingCredentialsParameterValue
s using theCause.UserIdCause
if available. Other plugins may bind and unbind parameters during a build.- Since:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor Description CredentialsParameterBinder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindCredentialsParameter(String userId, CredentialsParameterValue parameterValue)
Binds a credentials parameter with an optional user ID.CredentialsParameterBinding
forParameterName(String parameterName)
static CredentialsParameterBinder
getOrCreate(Run<?,?> run)
Gets or creates a CredentialsParameterBinder for the given run.void
unbindCredentialsParameter(String parameterName)
Unbinds a credentials parameter.-
Methods inherited from class hudson.model.InvisibleAction
getDisplayName, getIconFileName, getUrlName
-
-
-
-
Method Detail
-
getOrCreate
@NonNull public static CredentialsParameterBinder getOrCreate(@NonNull Run<?,?> run)
Gets or creates a CredentialsParameterBinder for the given run. This automatically imports credentials parameters provided in aParametersAction
.
-
bindCredentialsParameter
public void bindCredentialsParameter(@CheckForNull String userId, @NonNull CredentialsParameterValue parameterValue)
Binds a credentials parameter with an optional user ID. User credentials require a user ID.
-
unbindCredentialsParameter
public void unbindCredentialsParameter(@NonNull String parameterName)
Unbinds a credentials parameter.
-
forParameterName
@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public CredentialsParameterBinding forParameterName(@NonNull String parameterName)
-
-