org.jenkinsci.plugins.builduser.varsetter.impl
Class UserCauseDeterminant
java.lang.Object
org.jenkinsci.plugins.builduser.varsetter.impl.UserCauseDeterminant
- All Implemented Interfaces:
- IUsernameSettable<hudson.model.Cause.UserCause>
public class UserCauseDeterminant
- extends Object
- implements IUsernameSettable<hudson.model.Cause.UserCause>
This implementation is used to determine build username variables from 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:
- Author:
- GKonovalenko
|
Method Summary |
Class<hudson.model.Cause.UserCause> |
getUsedCauseClass()
Returns Cause subclass used to determine user name. |
boolean |
setJenkinsUserBuildVars(hudson.model.Cause.UserCause cause,
Map<String,String> variables)
Adds username build variables extracted from build cause to map of build variables. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserCauseDeterminant
public UserCauseDeterminant()
setJenkinsUserBuildVars
public boolean setJenkinsUserBuildVars(hudson.model.Cause.UserCause cause,
Map<String,String> variables)
- Adds username build variables extracted from build cause to map of build variables.
Cause.UserCause based implementation.
- Specified by:
setJenkinsUserBuildVars in interface IUsernameSettable<hudson.model.Cause.UserCause>
- Parameters:
cause - cause where to get username from.variables - map of build variables, where to add username variables.
- Returns:
true if username was determined and added to the passed map,
false otherwise.
getUsedCauseClass
public Class<hudson.model.Cause.UserCause> getUsedCauseClass()
- Returns
Cause subclass used to determine user name.
- Specified by:
getUsedCauseClass in interface IUsernameSettable<hudson.model.Cause.UserCause>
- Returns:
- class used to determine user name.
Copyright © 2004-2012. All Rights Reserved.