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_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_SUBJECT
          Parameter name for the commit subject (commit message's 1st line).
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_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_PROJECT
          Parameter name for the Gerrit project name.
GERRIT_REFSPEC
          Parameter name for the refspec.
 
Method Summary
static void setOrCreateParameters(PatchsetCreated event, List<hudson.model.ParameterValue> parameters, boolean escapeQuotes)
          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.
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_BRANCH

public static final GerritTriggerParameters GERRIT_BRANCH
Parameter name for the branch.


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_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_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.

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.

setOrCreateParameters

public static void setOrCreateParameters(PatchsetCreated event,
                                         List<hudson.model.ParameterValue> parameters,
                                         boolean escapeQuotes)
Adds or sets all the Gerrit-parameter values to the provided list.

Parameters:
event - the event.
parameters - the default parameters
escapeQuotes - if quotes should be escaped or not.
See Also:
setOrCreateStringParameterValue(java.util.List, String, boolean)


Copyright © 2004-2011. All Rights Reserved.