com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger
Enum GerritTriggerParameters

java.lang.Object
  extended by java.lang.Enum<GerritTriggerParameters>
      extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerParameters
All Implemented Interfaces:
Serializable, Comparable<GerritTriggerParameters>

public enum GerritTriggerParameters
extends Enum<GerritTriggerParameters>

The parameters to add to a build.

Author:
Robert Sandell <robert.sandell@sonyericsson.com>

Enum Constant Summary
GERRIT_BRANCH
          Parameter name for the branch.
GERRIT_CHANGE_ABANDONER
          The name and email of the abandoner of the change.
GERRIT_CHANGE_ABANDONER_EMAIL
          The email of the abandoner of the change.
GERRIT_CHANGE_ABANDONER_NAME
          The name of the abandoner of the change.
GERRIT_CHANGE_COMMIT_MESSAGE
          Parameter name for the full commit message.
GERRIT_CHANGE_ID
          Parameter name for the change-id.
GERRIT_CHANGE_NUMBER
          Parameter name for the change number.
GERRIT_CHANGE_OWNER
          The name and email of the owner of the change.
GERRIT_CHANGE_OWNER_EMAIL
          The email of the owner of the change.
GERRIT_CHANGE_OWNER_NAME
          The name of the owner of the change.
GERRIT_CHANGE_RESTORER
          The name and email of the restorer of the change.
GERRIT_CHANGE_RESTORER_EMAIL
          The email of the restorer of the change.
GERRIT_CHANGE_RESTORER_NAME
          The name of the restorer of the change.
GERRIT_CHANGE_SUBJECT
          Parameter name for the commit subject (commit message's 1st line).
GERRIT_CHANGE_URL
          Parameter name for the URL to the change.
GERRIT_EVENT_ACCOUNT
          The name and email of the person who triggered the event.
GERRIT_EVENT_ACCOUNT_EMAIL
          The email of the person who triggered the event.
GERRIT_EVENT_ACCOUNT_NAME
          The name of the person who triggered the event.
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_HOST
          The host of the Gerrit instance.
GERRIT_NAME
          The name of the Gerrit instance.
GERRIT_NEWREV
          The new revision in a ref-updated event.
GERRIT_OLDREV
          The old revision in a ref-updated event.
GERRIT_PATCHSET_NUMBER
          Parameter name for the patch set number.
GERRIT_PATCHSET_REVISION
          Parameter name for the patch set revision.
GERRIT_PATCHSET_UPLOADER
          The name and email of the uploader of the patch-set.
GERRIT_PATCHSET_UPLOADER_EMAIL
          The email of the uploader of the patch-set.
GERRIT_PATCHSET_UPLOADER_NAME
          The name of the uploader of the patch-set.
GERRIT_PORT
          The port number of the Gerrit instance.
GERRIT_PROJECT
          Parameter name for the Gerrit project name.
GERRIT_REFNAME
          The refname in a ref-updated event.
GERRIT_REFSPEC
          Parameter name for the refspec.
GERRIT_SCHEME
          The protocol scheme of the Gerrit instance.
GERRIT_SUBMITTER
          The submitter in a ref-updated event.
GERRIT_SUBMITTER_EMAIL
          The email of the submitter in a ref-updated event.
GERRIT_SUBMITTER_NAME
          The name of the submitter in a ref-updated event.
GERRIT_TOPIC
          Parameter name for the topic.
GERRIT_VERSION
          The version of the Gerrit instance.
 
Method Summary
static void setOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent, hudson.model.AbstractProject project, List<hudson.model.ParameterValue> parameters)
          Adds or sets all the Gerrit-parameter values to the provided list.
static void setOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent, List<hudson.model.ParameterValue> parameters)
          Adds or sets all the Gerrit-parameter values to the provided list.
 void setOrCreateStringParameterValue(List<hudson.model.ParameterValue> parameters, String value, boolean escapeQuotes)
          Creates a StringParameterValue and adds it to the provided list.
 void setOrCreateTextParameterValue(List<hudson.model.ParameterValue> parameters, String value, boolean escapeQuotes)
          Creates a TextParameterValue and adds it to the provided list.
static GerritTriggerParameters valueOf(String name)
          Returns 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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GERRIT_CHANGE_SUBJECT

public static final GerritTriggerParameters GERRIT_CHANGE_SUBJECT
Parameter name for the commit subject (commit message's 1st line).


GERRIT_CHANGE_COMMIT_MESSAGE

public static final GerritTriggerParameters GERRIT_CHANGE_COMMIT_MESSAGE
Parameter name for the full commit message.


GERRIT_BRANCH

public static final GerritTriggerParameters GERRIT_BRANCH
Parameter name for the branch.


GERRIT_TOPIC

public static final GerritTriggerParameters GERRIT_TOPIC
Parameter name for the topic.


GERRIT_CHANGE_ID

public static final GerritTriggerParameters GERRIT_CHANGE_ID
Parameter name for the change-id.


GERRIT_CHANGE_NUMBER

public static final GerritTriggerParameters GERRIT_CHANGE_NUMBER
Parameter name for the change number.


GERRIT_CHANGE_URL

public static final GerritTriggerParameters GERRIT_CHANGE_URL
Parameter name for the URL to the change.


GERRIT_PATCHSET_NUMBER

public static final GerritTriggerParameters GERRIT_PATCHSET_NUMBER
Parameter name for the patch set number.


GERRIT_PATCHSET_REVISION

public static final GerritTriggerParameters GERRIT_PATCHSET_REVISION
Parameter name for the patch set revision.


GERRIT_PROJECT

public static final GerritTriggerParameters GERRIT_PROJECT
Parameter name for the Gerrit project name.


GERRIT_REFSPEC

public static final GerritTriggerParameters GERRIT_REFSPEC
Parameter name for the refspec.


GERRIT_CHANGE_ABANDONER

public static final GerritTriggerParameters GERRIT_CHANGE_ABANDONER
The name and email of the abandoner of the change.


GERRIT_CHANGE_ABANDONER_NAME

public static final GerritTriggerParameters GERRIT_CHANGE_ABANDONER_NAME
The name of the abandoner of the change.


GERRIT_CHANGE_ABANDONER_EMAIL

public static final GerritTriggerParameters GERRIT_CHANGE_ABANDONER_EMAIL
The email of the abandoner of the change.


GERRIT_CHANGE_OWNER

public static final GerritTriggerParameters GERRIT_CHANGE_OWNER
The name and email of the owner of the change.


GERRIT_CHANGE_OWNER_NAME

public static final GerritTriggerParameters GERRIT_CHANGE_OWNER_NAME
The name of the owner of the change.


GERRIT_CHANGE_OWNER_EMAIL

public static final GerritTriggerParameters GERRIT_CHANGE_OWNER_EMAIL
The email of the owner of the change.


GERRIT_CHANGE_RESTORER

public static final GerritTriggerParameters GERRIT_CHANGE_RESTORER
The name and email of the restorer of the change.


GERRIT_CHANGE_RESTORER_NAME

public static final GerritTriggerParameters GERRIT_CHANGE_RESTORER_NAME
The name of the restorer of the change.


GERRIT_CHANGE_RESTORER_EMAIL

public static final GerritTriggerParameters GERRIT_CHANGE_RESTORER_EMAIL
The email of the restorer of the change.


GERRIT_PATCHSET_UPLOADER

public static final GerritTriggerParameters GERRIT_PATCHSET_UPLOADER
The name and email of the uploader of the patch-set.


GERRIT_PATCHSET_UPLOADER_NAME

public static final GerritTriggerParameters GERRIT_PATCHSET_UPLOADER_NAME
The name of the uploader of the patch-set.


GERRIT_PATCHSET_UPLOADER_EMAIL

public static final GerritTriggerParameters GERRIT_PATCHSET_UPLOADER_EMAIL
The email of the uploader of the patch-set.


GERRIT_EVENT_ACCOUNT

public static final GerritTriggerParameters GERRIT_EVENT_ACCOUNT
The name and email of the person who triggered the event.


GERRIT_EVENT_ACCOUNT_NAME

public static final GerritTriggerParameters GERRIT_EVENT_ACCOUNT_NAME
The name of the person who triggered the event.


GERRIT_EVENT_ACCOUNT_EMAIL

public static final GerritTriggerParameters GERRIT_EVENT_ACCOUNT_EMAIL
The email of the person who triggered the event.


GERRIT_REFNAME

public static final GerritTriggerParameters GERRIT_REFNAME
The refname in a ref-updated event.


GERRIT_OLDREV

public static final GerritTriggerParameters GERRIT_OLDREV
The old revision in a ref-updated event.


GERRIT_NEWREV

public static final GerritTriggerParameters GERRIT_NEWREV
The new revision in a ref-updated event.


GERRIT_SUBMITTER

public static final GerritTriggerParameters GERRIT_SUBMITTER
The submitter in a ref-updated event.


GERRIT_SUBMITTER_NAME

public static final GerritTriggerParameters GERRIT_SUBMITTER_NAME
The name of the submitter in a ref-updated event.


GERRIT_SUBMITTER_EMAIL

public static final GerritTriggerParameters GERRIT_SUBMITTER_EMAIL
The email of the submitter in a ref-updated event.


GERRIT_NAME

public static final GerritTriggerParameters GERRIT_NAME
The name of the Gerrit instance.


GERRIT_HOST

public static final GerritTriggerParameters GERRIT_HOST
The host of the Gerrit instance.


GERRIT_PORT

public static final GerritTriggerParameters GERRIT_PORT
The port number of the Gerrit instance.


GERRIT_SCHEME

public static final GerritTriggerParameters GERRIT_SCHEME
The protocol scheme of the Gerrit instance.


GERRIT_VERSION

public static final GerritTriggerParameters GERRIT_VERSION
The version of the Gerrit instance.


GERRIT_EVENT_HASH

public static final GerritTriggerParameters 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

public static final GerritTriggerParameters GERRIT_EVENT_TYPE
The type of the event.

Method Detail

values

public static GerritTriggerParameters[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GerritTriggerParameters c : GerritTriggerParameters.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GerritTriggerParameters valueOf(String name)
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 name
NullPointerException - if the argument is null

setOrCreateStringParameterValue

public void setOrCreateStringParameterValue(List<hudson.model.ParameterValue> parameters,
                                            String value,
                                            boolean escapeQuotes)
Creates a StringParameterValue and 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<hudson.model.ParameterValue> parameters,
                                          String value,
                                          boolean escapeQuotes)
Creates a TextParameterValue and 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.

setOrCreateParameters

public static void setOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent,
                                         List<hudson.model.ParameterValue> parameters)
Adds or sets all the Gerrit-parameter values to the provided list.

Parameters:
gerritEvent - the event.
parameters - the default parameters
See Also:
setOrCreateStringParameterValue(java.util.List, String, boolean)

setOrCreateParameters

public static void setOrCreateParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent,
                                         hudson.model.AbstractProject project,
                                         List<hudson.model.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 set
parameters - the default parameters
See Also:
setOrCreateStringParameterValue(java.util.List, String, boolean)


Copyright © 2004-2014. All Rights Reserved.