org.jenkinsci.plugins.builduser.varsetter
Interface IUsernameSettable<T extends hudson.model.Cause>

All Known Implementing Classes:
UserCauseDeterminant, UserIdCauseDeterminant

public interface IUsernameSettable<T extends hudson.model.Cause>

Interface declaring method for setting jenkins user build variables parametrized by Cause subclasses.

User based Cause instance is the source of username data.

Author:
GKonovalenko

Field Summary
static String BUILD_USER_FIRST_NAME_VAR_NAME
          First name of user started build
static String BUILD_USER_ID
          Id of user started build
static String BUILD_USER_LAST_NAME_VAR_NAME
          Last name of user started build
static String BUILD_USER_VAR_NAME
          Full name of user started build
static String UNDEFINED
          Optional value for variable which value couldn't be defined.
 
Method Summary
 Class<T> getUsedCauseClass()
          Returns Cause subclass used to determine user name.
 boolean setJenkinsUserBuildVars(T cause, Map<String,String> variables)
          Adds username build variables extracted from build cause to map of build variables.
 

Field Detail

BUILD_USER_VAR_NAME

static final String BUILD_USER_VAR_NAME
Full name of user started build

See Also:
Constant Field Values

BUILD_USER_FIRST_NAME_VAR_NAME

static final String BUILD_USER_FIRST_NAME_VAR_NAME
First name of user started build

See Also:
Constant Field Values

BUILD_USER_LAST_NAME_VAR_NAME

static final String BUILD_USER_LAST_NAME_VAR_NAME
Last name of user started build

See Also:
Constant Field Values

BUILD_USER_ID

static final String BUILD_USER_ID
Id of user started build

See Also:
Constant Field Values

UNDEFINED

static final String UNDEFINED
Optional value for variable which value couldn't be defined.

See Also:
Constant Field Values
Method Detail

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 - map 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 user name.

Returns:
class used to determine user name.


Copyright © 2004-2012. All Rights Reserved.