Interface IUsernameSettable<T extends Cause>

All Known Implementing Classes:
BranchIndexingTriggerDeterminant, RemoteCauseDeterminant, SCMTriggerCauseDeterminant, TimerTriggerCauseDeterminant, UserCauseDeterminant, UserIdCauseDeterminant

public interface IUsernameSettable<T extends Cause>
Interface declaring method for setting jenkins user build variables parametrized by Cause subclasses.

User based Cause instance is the source of username data.

  • BUILD_USER -- full name of user started build,
  • BUILD_USER_FIRST_NAME -- first name of user started build,
  • BUILD_USER_LAST_NAME -- last name of user started build,
  • BUILD_USER_ID -- id of user started build.
Author:
GKonovalenko
  • Method Details

    • setJenkinsUserBuildVars

      boolean setJenkinsUserBuildVars(T cause, Map<String,String> variables)
      Adds username build variables extracted from build cause to map of build variables.
      Parameters:
      cause - cause where to get username from.
      variables - ap of build variables, where to add username variables.
      Returns:
      true if username was determined and added to the passed map, false otherwise.
    • getUsedCauseClass

      Class<T> getUsedCauseClass()
      Returns Cause subclass used to determine username.
      Returns:
      class used to determine username.