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 StringBUILD_ID_PARAM_NAMEstatic StringBUILD_TYPE_ID_PARAM_NAMEstatic StringIDE_PLUGIN_PARAM_NAMEstatic intMAX_LENGTHstatic StringPARAMETERS_PREFIXstatic StringRE_ADDED_AFTER_STOP_NAMEstatic StringRE_ADDED_INSTEAD_OFstatic StringSHOW_AS_ISstatic StringTRIGGER_ID_PARAM_NAMEstatic StringTYPE_PARAM_NAMEstatic StringUSER_PARAM_NAMEstatic StringVCS_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 voidaddParameter(String paramName, String paramValue)Adds new parameter to the map.voidaddParameters(Map<String,String> params)Adds new parameters to the map.voidreset()Clears all added parameters.StringtoString()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 IllegalArgumentExceptionAdds 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 IllegalArgumentExceptionAdds 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.
-
-