public class UserCauseDeterminant extends Object implements IUsernameSettable<Cause.UserCause>
Cause.UserCause
.
This could be used with legacy version of jenkins, where Cause.UserCause
is used instead of
Cause.UserIdCause
(before b1.427).
This will let to get following set of variables:
BUILD_USER_EMAIL, BUILD_USER_FIRST_NAME_VAR_NAME, BUILD_USER_ID, BUILD_USER_LAST_NAME_VAR_NAME, BUILD_USER_VAR_GROUPS, BUILD_USER_VAR_NAME, UNDEFINED
Constructor and Description |
---|
UserCauseDeterminant() |
Modifier and Type | Method and Description |
---|---|
Class<Cause.UserCause> |
getUsedCauseClass()
Returns
Cause subclass used to determine user name. |
boolean |
setJenkinsUserBuildVars(Cause.UserCause cause,
Map<String,String> variables)
Adds username build variables extracted from build cause to map of build variables.
|
public boolean setJenkinsUserBuildVars(Cause.UserCause cause, Map<String,String> variables)
Cause.UserCause
based implementation.
setJenkinsUserBuildVars
in interface IUsernameSettable<Cause.UserCause>
cause
- cause where to get username from.variables
- map of build variables, where to add username variables.true
if username was determined and added to the passed map,
false
otherwise.public Class<Cause.UserCause> getUsedCauseClass()
Cause
subclass used to determine user name.getUsedCauseClass
in interface IUsernameSettable<Cause.UserCause>
Copyright © 2016–2022. All rights reserved.