Class 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 via getOrCreate(Run). This binds any existing CredentialsParameterValues using the Cause.UserIdCause if available. Other plugins may bind and unbind parameters during a build.
  • Constructor Details

    • CredentialsParameterBinder

      public CredentialsParameterBinder()
  • Method Details

    • 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 a ParametersAction.
    • 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)