Package jetbrains.buildServer.serverSide
Class TriggeredByBuilder
- java.lang.Object
-
- jetbrains.buildServer.serverSide.TriggeredByBuilder
-
public class TriggeredByBuilder extends Object
Builder which can be used to store some relevant information in triggered by field of a build. Information can be stored as a number of name = value pairs. The map of name = value pairs will then be provided to jetbrains.buildServer.serverSide.TriggeredByProcessor extension to convert to a text which should be shown in the UI. The builder is not thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description static String
BUILD_ID_PARAM_NAME
static String
BUILD_TYPE_ID_PARAM_NAME
static String
IDE_PLUGIN_PARAM_NAME
static int
MAX_LENGTH
static String
PARAMETERS_PREFIX
static String
RE_ADDED_AFTER_STOP_NAME
static String
RE_ADDED_INSTEAD_OF
static String
SHOW_AS_IS
static String
TRIGGER_ID_PARAM_NAME
static String
TYPE_PARAM_NAME
static String
USER_PARAM_NAME
static String
VCS_NAME_PARAM_NAME
-
Constructor Summary
Constructors Constructor Description TriggeredByBuilder()
Use this constructor if build is not triggered by a user.TriggeredByBuilder(User userWhoTriggeredBuild)
Use this constructor if build is triggered manually by a user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(String paramName, String paramValue)
Adds new parameter to the map.void
addParameters(Map<String,String> params)
Adds new parameters to the map.void
reset()
Clears all added parameters.String
toString()
Transforms map to a string.
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
- See Also:
- Constant Field Values
-
PARAMETERS_PREFIX
public static final String PARAMETERS_PREFIX
- See Also:
- Constant Field Values
-
USER_PARAM_NAME
public static final String USER_PARAM_NAME
- See Also:
- Constant Field Values
-
IDE_PLUGIN_PARAM_NAME
public static final String IDE_PLUGIN_PARAM_NAME
- See Also:
- Constant Field Values
-
BUILD_TYPE_ID_PARAM_NAME
public static final String BUILD_TYPE_ID_PARAM_NAME
- See Also:
- Constant Field Values
-
BUILD_ID_PARAM_NAME
public static final String BUILD_ID_PARAM_NAME
- See Also:
- Constant Field Values
-
VCS_NAME_PARAM_NAME
public static final String VCS_NAME_PARAM_NAME
- See Also:
- Constant Field Values
-
TYPE_PARAM_NAME
public static final String TYPE_PARAM_NAME
- See Also:
- Constant Field Values
-
SHOW_AS_IS
public static final String SHOW_AS_IS
- See Also:
- Constant Field Values
-
TRIGGER_ID_PARAM_NAME
public static final String TRIGGER_ID_PARAM_NAME
- See Also:
- Constant Field Values
-
RE_ADDED_AFTER_STOP_NAME
public static final String RE_ADDED_AFTER_STOP_NAME
- See Also:
- Constant Field Values
-
RE_ADDED_INSTEAD_OF
public static final String RE_ADDED_INSTEAD_OF
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TriggeredByBuilder
public TriggeredByBuilder(@NotNull User userWhoTriggeredBuild)
Use this constructor if build is triggered manually by a user.- Parameters:
userWhoTriggeredBuild
- user triggered build
-
TriggeredByBuilder
public TriggeredByBuilder()
Use this constructor if build is not triggered by a user.
-
-
Method Detail
-
addParameter
public void addParameter(@NotNull String paramName, @NotNull String paramValue) throws IllegalArgumentException
Adds new parameter to the map.- Parameters:
paramName
- name of the parameterparamValue
- value of the parameter- Throws:
IllegalArgumentException
- in case if length of serialized map of parameters exceeds max lengthMAX_LENGTH
-
addParameters
public void addParameters(@NotNull Map<String,String> params) throws IllegalArgumentException
Adds new parameters to the map.- Parameters:
params
- parameters to add- Throws:
IllegalArgumentException
- in case if length of serialized map of parameters exceeds max lengthMAX_LENGTH
-
reset
public void reset()
Clears all added parameters.
-
-