Class CredentialsParameterBinder
java.lang.Object
hudson.model.InvisibleAction
com.cloudbees.plugins.credentials.builds.CredentialsParameterBinder
- All Implemented Interfaces:
Action
,ModelObject
Tracks credentials being bound and unbound to a build. An instance is created and attached to a build when it is
first looked up via
getOrCreate(Run)
. This binds any existing CredentialsParameterValue
s using the
Cause.UserIdCause
if available. Other plugins may
bind and
unbind parameters during a build.- Since:
- 2.3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bindCredentialsParameter
(String userId, CredentialsParameterValue parameterValue) Binds a credentials parameter with an optional user ID.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
-
Constructor Details
-
CredentialsParameterBinder
public CredentialsParameterBinder()
-
-
Method Details
-
getOrCreate
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
Unbinds a credentials parameter. -
forParameterName
@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public CredentialsParameterBinding forParameterName(@NonNull String parameterName)
-