Enum GerritTriggerParameters
java.lang.Object
java.lang.Enum<GerritTriggerParameters>
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerParameters
- All Implemented Interfaces:
Serializable,Comparable<GerritTriggerParameters>
The parameters to add to a build.
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow a parameter should be added to the triggered build. -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHashtags added to Gerrit in a hashtags-changed event.Parameter name for the branch.The name and email of the abandoner of the change.The email of the abandoner of the change.The name of the abandoner of the change.The username of the abandoner of the change.Parameter name for the full commit message.Parameter name for the change-id.Parameter name for the change number.The name and email of the owner of the change.The email of the owner of the change.The name of the owner of the change.The username of the owner of the change.Parameter name for change private state.The name and email of the restorer of the change.The email of the restorer of the change.The name of the restorer of the change.The username of the restorer of the change.Parameter name for the commit subject (commit message's 1st line).Parameter name for the URL to the change.Parameter name for change wip state.The name and email of the person who triggered the event.The email of the person who triggered the event.The name of the person who triggered the event.The username of the person who triggered the event.Comment posted to Gerrit in a comment-added event.A hashcode of the Gerrit event object, to make sure every set of parameters is unique (allowing jenkins to queue duplicate builds).The type of the event.Updated approvals.Hashtags posted to Gerrit in a change based event.The host of the Gerrit instance.The name of the Gerrit instance.The new revision in a ref-updated or change-merged event.Parameter name for the old topic (in case of topic was changed).The old revision in a ref-updated event.Parameter name for the patch set number.Parameter name for the patch set revision.The name and email of the uploader of the patch-set.The email of the uploader of the patch-set.The name of the uploader of the patch-set.The username of the uploader of the patch-set.The port number of the Gerrit instance.Parameter name for the Gerrit project name.The refname in a ref-updated event.Parameter name for the refspec.Hashtags removed to Gerrit in a hashtags-changed event.The protocol scheme of the Gerrit instance.The submitter in a ref-updated event.The email of the submitter in a ref-updated event.The name of the submitter in a ref-updated event.The username of the submitter in a ref-updated event.Parameter name for the topic.The name and email of the changer of the topic.The email of the changer of the topic.The name of the changer of the topic.The username of the changer of the topic.The version of the Gerrit instance. -
Method Summary
Modifier and TypeMethodDescriptionA set of all the declared parameter names.voidsetOrCreateBase64EncodedStringParameterValue(List<ParameterValue> parameters, String value, boolean escapeQuotes) Creates aBase64EncodedStringParameterValueand adds it to the provided list.static voidsetOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent, Job project, List<ParameterValue> parameters) Adds or sets all the Gerrit-parameter values to the provided list.static voidsetOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent, List<ParameterValue> parameters) Adds or sets all the Gerrit-parameter values to the provided list.voidsetOrCreateStringParameterValue(List<ParameterValue> parameters, String value, boolean escapeQuotes) Creates aStringParameterValueand adds it to the provided list.voidsetOrCreateTextParameterValue(List<ParameterValue> parameters, String value, boolean escapeQuotes) Creates aTextParameterValueand adds it to the provided list.static GerritTriggerParametersReturns the enum constant of this type with the specified name.static GerritTriggerParameters[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
GERRIT_CHANGE_PRIVATE_STATE
Parameter name for change private state. -
GERRIT_CHANGE_WIP_STATE
Parameter name for change wip state. -
GERRIT_CHANGE_SUBJECT
Parameter name for the commit subject (commit message's 1st line). -
GERRIT_CHANGE_COMMIT_MESSAGE
Parameter name for the full commit message. -
GERRIT_BRANCH
Parameter name for the branch. -
GERRIT_TOPIC
Parameter name for the topic. -
GERRIT_OLD_TOPIC
Parameter name for the old topic (in case of topic was changed). -
GERRIT_TOPIC_CHANGER
The name and email of the changer of the topic. -
GERRIT_TOPIC_CHANGER_NAME
The name of the changer of the topic. -
GERRIT_TOPIC_CHANGER_EMAIL
The email of the changer of the topic. -
GERRIT_TOPIC_CHANGER_USERNAME
The username of the changer of the topic. -
GERRIT_CHANGE_ID
Parameter name for the change-id. -
GERRIT_CHANGE_NUMBER
Parameter name for the change number. -
GERRIT_CHANGE_URL
Parameter name for the URL to the change. -
GERRIT_PATCHSET_NUMBER
Parameter name for the patch set number. -
GERRIT_PATCHSET_REVISION
Parameter name for the patch set revision. -
GERRIT_PROJECT
Parameter name for the Gerrit project name. -
GERRIT_REFSPEC
Parameter name for the refspec. -
GERRIT_CHANGE_ABANDONER
The name and email of the abandoner of the change. -
GERRIT_CHANGE_ABANDONER_NAME
The name of the abandoner of the change. -
GERRIT_CHANGE_ABANDONER_EMAIL
The email of the abandoner of the change. -
GERRIT_CHANGE_ABANDONER_USERNAME
The username of the abandoner of the change. -
GERRIT_CHANGE_OWNER
The name and email of the owner of the change. -
GERRIT_CHANGE_OWNER_NAME
The name of the owner of the change. -
GERRIT_CHANGE_OWNER_EMAIL
The email of the owner of the change. -
GERRIT_CHANGE_OWNER_USERNAME
The username of the owner of the change. -
GERRIT_CHANGE_RESTORER
The name and email of the restorer of the change. -
GERRIT_CHANGE_RESTORER_NAME
The name of the restorer of the change. -
GERRIT_CHANGE_RESTORER_EMAIL
The email of the restorer of the change. -
GERRIT_CHANGE_RESTORER_USERNAME
The username of the restorer of the change. -
GERRIT_PATCHSET_UPLOADER
The name and email of the uploader of the patch-set. -
GERRIT_PATCHSET_UPLOADER_NAME
The name of the uploader of the patch-set. -
GERRIT_PATCHSET_UPLOADER_EMAIL
The email of the uploader of the patch-set. -
GERRIT_PATCHSET_UPLOADER_USERNAME
The username of the uploader of the patch-set. -
GERRIT_EVENT_ACCOUNT
The name and email of the person who triggered the event. -
GERRIT_EVENT_ACCOUNT_NAME
The name of the person who triggered the event. -
GERRIT_EVENT_ACCOUNT_EMAIL
The email of the person who triggered the event. -
GERRIT_EVENT_ACCOUNT_USERNAME
The username of the person who triggered the event. -
GERRIT_REFNAME
The refname in a ref-updated event. -
GERRIT_OLDREV
The old revision in a ref-updated event. -
GERRIT_NEWREV
The new revision in a ref-updated or change-merged event. -
GERRIT_SUBMITTER
The submitter in a ref-updated event. -
GERRIT_SUBMITTER_NAME
The name of the submitter in a ref-updated event. -
GERRIT_SUBMITTER_EMAIL
The email of the submitter in a ref-updated event. -
GERRIT_SUBMITTER_USERNAME
The username of the submitter in a ref-updated event. -
GERRIT_NAME
The name of the Gerrit instance. -
GERRIT_HOST
The host of the Gerrit instance. -
GERRIT_PORT
The port number of the Gerrit instance. -
GERRIT_SCHEME
The protocol scheme of the Gerrit instance. -
GERRIT_VERSION
The version of the Gerrit instance. -
GERRIT_EVENT_HASH
A hashcode of the Gerrit event object, to make sure every set of parameters is unique (allowing jenkins to queue duplicate builds). -
GERRIT_EVENT_TYPE
The type of the event. -
GERRIT_EVENT_COMMENT_TEXT
Comment posted to Gerrit in a comment-added event. -
GERRIT_EVENT_UPDATED_APPROVALS
Updated approvals. -
GERRIT_HASHTAGS
Hashtags posted to Gerrit in a change based event. -
GERRIT_REMOVED_HASHTAGS
Hashtags removed to Gerrit in a hashtags-changed event. -
GERRIT_ADDED_HASHTAGS
Hashtags added to Gerrit in a hashtags-changed event.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNamesSet
A set of all the declared parameter names.- Returns:
- the names of the parameters
- See Also:
-
setOrCreateStringParameterValue
public void setOrCreateStringParameterValue(List<ParameterValue> parameters, String value, boolean escapeQuotes) Creates aStringParameterValueand adds it to the provided list. If the parameter with the same name already exists in the list it will be replaced by the new parameter, but its description will be used, unless the parameter type is something else than a StringParameterValue.- Parameters:
parameters- the list of existing parameters.value- the value.escapeQuotes- if quote characters should be escaped.
-
setOrCreateTextParameterValue
public void setOrCreateTextParameterValue(List<ParameterValue> parameters, String value, boolean escapeQuotes) Creates aTextParameterValueand adds it to the provided list. If the parameter with the same name already exists in the list it will be replaced by the new parameter, but its description will be used, unless the parameter type is something else than a TextParameterValue.- Parameters:
parameters- the list of existing parameters.value- the value.escapeQuotes- if quote characters should be escaped.
-
setOrCreateBase64EncodedStringParameterValue
public void setOrCreateBase64EncodedStringParameterValue(List<ParameterValue> parameters, String value, boolean escapeQuotes) Creates aBase64EncodedStringParameterValueand adds it to the provided list. If the parameter with the same name already exists in the list it will be replaced by the new parameter, but its description will be used, unless the parameter type is something else than a Base64EncodedStringParameterValue.- Parameters:
parameters- the list of existing parameters.value- the value.escapeQuotes- if quote characters should be escaped.
-
setOrCreateParameters
public static void setOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent, List<ParameterValue> parameters) Adds or sets all the Gerrit-parameter values to the provided list.- Parameters:
gerritEvent- the event.parameters- the default parameters- See Also:
-
setOrCreateParameters
public static void setOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent, Job project, List<ParameterValue> parameters) Adds or sets all the Gerrit-parameter values to the provided list.- Parameters:
gerritEvent- the event.project- the project for which the parameters are being setparameters- the default parameters- See Also:
-