com.sonyericsson.hudson.plugins.gerrit.trigger.config
Class Config

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.trigger.config.Config
All Implemented Interfaces:
IGerritHudsonTriggerConfig, com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig, com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2, com.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig, com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

public class Config
extends Object
implements IGerritHudsonTriggerConfig

Configuration bean for the global configuration.

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

Field Summary
static boolean DEFAULT_BUILD_CURRENT_PATCHES_ONLY
          Default value for isGerritBuildCurrentPatchesOnly().
static boolean DEFAULT_ENABLE_MANUAL_TRIGGER
          Default manual trigger enabled.
static boolean DEFAULT_ENABLE_PLUGIN_MESSAGES
          Default plug-in messages enabled.
static int DEFAULT_GERRIT_BUILD_FAILURE_CODE_REVIEW_VALUE
          Default code review vote to Gerrit when a build is failed.
static int DEFAULT_GERRIT_BUILD_FAILURE_VERIFIED_VALUE
          Default verified vote to Gerrit when a build is failed.
static int DEFAULT_GERRIT_BUILD_NOT_BUILT_CODE_REVIEW_VALUE
          Default code review vote to Gerrit when a build is not built.
static int DEFAULT_GERRIT_BUILD_NOT_BUILT_VERIFIED_VALUE
          Default verified vote to Gerrit when a build is not built.
static int DEFAULT_GERRIT_BUILD_STARTED_CODE_REVIEW_VALUE
          Default code review vote to Gerrit when a build is started.
static int DEFAULT_GERRIT_BUILD_STARTED_VERIFIED_VALUE
          Default verified vote to Gerrit when a build is started.
static int DEFAULT_GERRIT_BUILD_SUCCESSFUL_CODE_REVIEW_VALUE
          Default code review vote to Gerrit when a build is successful.
static int DEFAULT_GERRIT_BUILD_SUCCESSFUL_VERIFIED_VALUE
          Default verified vote to Gerrit when a build is successful.
static int DEFAULT_GERRIT_BUILD_UNSTABLE_CODE_REVIEW_VALUE
          Default code review vote to Gerrit when a build is unstable.
static int DEFAULT_GERRIT_BUILD_UNSTABLE_VERIFIED_VALUE
          Default verified vote to Gerrit when a build is unstable.
static int DEFAULT_GERRIT_WATCHDOG_TIMEOUT_MINUTES
          Default timeout value in minutes for the connection watchdog.
 
Constructor Summary
Config()
          Constructs a config with default data.
Config(IGerritHudsonTriggerConfig config)
          Copy constructor.
Config(net.sf.json.JSONObject formData)
          Constructor.
Config(net.sf.json.JSONObject formData, org.kohsuke.stapler.StaplerRequest req)
          Unused Constructor?
 
Method Summary
 int getBuildScheduleDelay()
          Returns the BuildScheduleDelay.
 List<VerdictCategory> getCategories()
          Get the list of available VerdictCategories.
 int getDynamicConfigRefreshInterval()
          Returns the dynamicConfigRefreshInterval.
 com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData getExceptionData()
           
 com.sonymobile.tools.gerrit.gerritevents.ssh.Authentication getGerritAuthentication()
           
 File getGerritAuthKeyFile()
           
 String getGerritAuthKeyFilePassword()
           
 int getGerritBuildFailedCodeReviewValue()
          The default code review value for build failed.
 int getGerritBuildFailedVerifiedValue()
          The default verified value for build failed.
 int getGerritBuildNotBuiltCodeReviewValue()
          The default code review value for build not built.
 int getGerritBuildNotBuiltVerifiedValue()
          The default verified value for build not built.
 int getGerritBuildStartedCodeReviewValue()
          The default code review value for build started.
 int getGerritBuildStartedVerifiedValue()
          The default verified value for build started.
 int getGerritBuildSuccessfulCodeReviewValue()
          The default code review value for build successful.
 int getGerritBuildSuccessfulVerifiedValue()
          The default verified value for build successful.
 int getGerritBuildUnstableCodeReviewValue()
          The default code review value for build unstable.
 int getGerritBuildUnstableVerifiedValue()
          The default verified value for build unstable.
 String getGerritCmdBuildFailed()
          The command template to use when sending build-failed messages to Gerrit.
 String getGerritCmdBuildNotBuilt()
          The command template to use when sending build-not-built messages to Gerrit.
 String getGerritCmdBuildStarted()
          The command template to use when sending build-started messages to Gerrit.
 String getGerritCmdBuildSuccessful()
          The command template to use when sending build-successful messages to Gerrit.
 String getGerritCmdBuildUnstable()
          The command template to use when sending build-unstable messages to Gerrit.
 String getGerritEMail()
           
 String getGerritFrontEndUrl()
          Base URL for the Gerrit UI.
 String getGerritFrontEndUrlFor(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
          Creates a URL to the provided changeset number.
 String getGerritFrontEndUrlFor(String changeSetNumber, String revision)
          Creates a URL to the provided changeset number.
 String getGerritHostName()
           
 String getGerritHttpPassword()
          The password for the HTTP REST API.
 String getGerritHttpUserName()
          The user name for the HTTP REST API.
 String getGerritProxy()
           
 int getGerritSshPort()
           
 String getGerritUserName()
           
 org.apache.http.auth.Credentials getHttpCredentials()
           
 int getNumberOfReceivingWorkerThreads()
          Deprecated. 
 int getNumberOfSendingWorkerThreads()
          Deprecated. 
 ReplicationConfig getReplicationConfig()
          The configurations related to event replication.
 int getWatchdogTimeoutMinutes()
          Convenience getter for the jelly view.
 int getWatchdogTimeoutSeconds()
           
 boolean hasDefaultValues()
          If the plugin still has default values for hostname and frontendurl.
 boolean isEnableManualTrigger()
          Getter for the enableManualTrigger value.
 boolean isEnablePluginMessages()
          If other plugins are allowed to contribute messages to be forwarded to Gerrit.
 boolean isGerritBuildCurrentPatchesOnly()
          If enabled, then old patch revision builds will be canceled.
 boolean isUseRestApi()
          If the HTTP REST API should be used for change approval instead of the sh API.
 void setBuildScheduleDelay(int buildScheduleDelay)
          Setting buildScheduleDelay.
 void setCategories(List<VerdictCategory> categories)
          Setter for the list of VerdictCategories, used to make testing easier.
 void setDynamicConfigRefreshInterval(int dynamicConfigRefreshInterval)
          Setting dynamicConfigRefreshInterval.
 void setEnableManualTrigger(boolean enableManualTrigger)
          Sets if the manual trigger should be enabled or not.
 void setGerritAuthKeyFile(File gerritAuthKeyFile)
          GerritAuthKeyFile.
 void setGerritAuthKeyFilePassword(String gerritAuthKeyFilePassword)
          GerritAuthKeyFilePassword.
 void setGerritBuildCurrentPatchesOnly(boolean gerritBuildCurrentPatchesOnly)
          GerritBuildCurrentPatchesOnly.
 void setGerritEMail(String gerritEMail)
          The e-mail address for the user in gerrit.
 void setGerritFrontEndURL(String gerritFrontEndURL)
          GerritFrontEndURL.
 void setGerritHostName(String gerritHostName)
          GerritHostName.
 void setGerritHttpPassword(String gerritHttpPassword)
          Sets gerritHttpPassword.
 void setGerritHttpUserName(String gerritHttpUserName)
          Sets gerritHttpUserName.
 void setGerritProxy(String gerritProxy)
          GerritProxy.
 void setGerritSshPort(int gerritSshPort)
          GerritSshPort.
 void setGerritUserName(String gerritUserName)
          GerritUserName.
 void setGerritVerifiedCmdBuildFailed(String cmd)
          GerritVerifiedCmdBuildFailed.
 void setGerritVerifiedCmdBuildNotBuilt(String cmd)
          GerritVerifiedCmdBuildNotBuilt.
 void setGerritVerifiedCmdBuildStarted(String cmd)
          GerritVerifiedCmdBuildStarted.
 void setGerritVerifiedCmdBuildSuccessful(String cmd)
          GerritVerifiedCmdBuildSuccessful.
 void setGerritVerifiedCmdBuildUnstable(String cmd)
          GerritVerifiedCmdBuildUnstable.
 void setNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads)
          Deprecated. 
 void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
          Deprecated. 
 void setUseRestApi(boolean useRestApi)
          Sets useRestApi.
 void setValues(net.sf.json.JSONObject formData)
          Sets all config values from the provided JSONObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_GERRIT_BUILD_STARTED_VERIFIED_VALUE

public static final int DEFAULT_GERRIT_BUILD_STARTED_VERIFIED_VALUE
Default verified vote to Gerrit when a build is started.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_STARTED_CODE_REVIEW_VALUE

public static final int DEFAULT_GERRIT_BUILD_STARTED_CODE_REVIEW_VALUE
Default code review vote to Gerrit when a build is started.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_UNSTABLE_VERIFIED_VALUE

public static final int DEFAULT_GERRIT_BUILD_UNSTABLE_VERIFIED_VALUE
Default verified vote to Gerrit when a build is unstable.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_UNSTABLE_CODE_REVIEW_VALUE

public static final int DEFAULT_GERRIT_BUILD_UNSTABLE_CODE_REVIEW_VALUE
Default code review vote to Gerrit when a build is unstable.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_FAILURE_VERIFIED_VALUE

public static final int DEFAULT_GERRIT_BUILD_FAILURE_VERIFIED_VALUE
Default verified vote to Gerrit when a build is failed.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_FAILURE_CODE_REVIEW_VALUE

public static final int DEFAULT_GERRIT_BUILD_FAILURE_CODE_REVIEW_VALUE
Default code review vote to Gerrit when a build is failed.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_SUCCESSFUL_CODE_REVIEW_VALUE

public static final int DEFAULT_GERRIT_BUILD_SUCCESSFUL_CODE_REVIEW_VALUE
Default code review vote to Gerrit when a build is successful.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_SUCCESSFUL_VERIFIED_VALUE

public static final int DEFAULT_GERRIT_BUILD_SUCCESSFUL_VERIFIED_VALUE
Default verified vote to Gerrit when a build is successful.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_NOT_BUILT_VERIFIED_VALUE

public static final int DEFAULT_GERRIT_BUILD_NOT_BUILT_VERIFIED_VALUE
Default verified vote to Gerrit when a build is not built.

See Also:
Constant Field Values

DEFAULT_GERRIT_BUILD_NOT_BUILT_CODE_REVIEW_VALUE

public static final int DEFAULT_GERRIT_BUILD_NOT_BUILT_CODE_REVIEW_VALUE
Default code review vote to Gerrit when a build is not built.

See Also:
Constant Field Values

DEFAULT_GERRIT_WATCHDOG_TIMEOUT_MINUTES

public static final int DEFAULT_GERRIT_WATCHDOG_TIMEOUT_MINUTES
Default timeout value in minutes for the connection watchdog.

See Also:
Constant Field Values

DEFAULT_ENABLE_MANUAL_TRIGGER

public static final boolean DEFAULT_ENABLE_MANUAL_TRIGGER
Default manual trigger enabled.

See Also:
Constant Field Values

DEFAULT_ENABLE_PLUGIN_MESSAGES

public static final boolean DEFAULT_ENABLE_PLUGIN_MESSAGES
Default plug-in messages enabled.

See Also:
Constant Field Values

DEFAULT_BUILD_CURRENT_PATCHES_ONLY

public static final boolean DEFAULT_BUILD_CURRENT_PATCHES_ONLY
Default value for isGerritBuildCurrentPatchesOnly().

See Also:
Constant Field Values
Constructor Detail

Config

public Config(net.sf.json.JSONObject formData)
Constructor.

Parameters:
formData - the data.

Config

public Config(IGerritHudsonTriggerConfig config)
Copy constructor.

Parameters:
config - the Config object to be copied.

Config

public Config()
Constructs a config with default data.


Config

public Config(net.sf.json.JSONObject formData,
              org.kohsuke.stapler.StaplerRequest req)
Unused Constructor?

Parameters:
formData - the data
req - a path.
Method Detail

setValues

public void setValues(net.sf.json.JSONObject formData)
Description copied from interface: IGerritHudsonTriggerConfig
Sets all config values from the provided JSONObject.

Specified by:
setValues in interface IGerritHudsonTriggerConfig
Parameters:
formData - the JSON object with form data.

getGerritAuthKeyFile

public File getGerritAuthKeyFile()
Specified by:
getGerritAuthKeyFile in interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

setGerritAuthKeyFile

public void setGerritAuthKeyFile(File gerritAuthKeyFile)
GerritAuthKeyFile.

Parameters:
gerritAuthKeyFile - the file
See Also:
getGerritAuthKeyFile()

getGerritAuthKeyFilePassword

public String getGerritAuthKeyFilePassword()
Specified by:
getGerritAuthKeyFilePassword in interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

setGerritAuthKeyFilePassword

public void setGerritAuthKeyFilePassword(String gerritAuthKeyFilePassword)
GerritAuthKeyFilePassword.

Parameters:
gerritAuthKeyFilePassword - the password
See Also:
getGerritAuthKeyFilePassword()

setGerritBuildCurrentPatchesOnly

public void setGerritBuildCurrentPatchesOnly(boolean gerritBuildCurrentPatchesOnly)
GerritBuildCurrentPatchesOnly.

Parameters:
gerritBuildCurrentPatchesOnly - whether to only build the current patch set
See Also:
isGerritBuildCurrentPatchesOnly()

getGerritFrontEndUrl

public String getGerritFrontEndUrl()
Description copied from interface: IGerritHudsonTriggerConfig
Base URL for the Gerrit UI.

Specified by:
getGerritFrontEndUrl in interface IGerritHudsonTriggerConfig
Specified by:
getGerritFrontEndUrl in interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig
Specified by:
getGerritFrontEndUrl in interface com.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig
Returns:
the gerrit front end URL. Always ends with '/'

setGerritFrontEndURL

public void setGerritFrontEndURL(String gerritFrontEndURL)
GerritFrontEndURL.

Parameters:
gerritFrontEndURL - the URL
See Also:
getGerritFrontEndUrl()

getGerritHostName

public String getGerritHostName()
Specified by:
getGerritHostName in interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

setGerritHostName

public void setGerritHostName(String gerritHostName)
GerritHostName.

Parameters:
gerritHostName - the hostname
See Also:
getGerritHostName()

getGerritSshPort

public int getGerritSshPort()
Specified by:
getGerritSshPort in interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

setGerritSshPort

public void setGerritSshPort(int gerritSshPort)
GerritSshPort.

Parameters:
gerritSshPort - the port
See Also:
getGerritSshPort()

getGerritProxy

public String getGerritProxy()
Specified by:
getGerritProxy in interface com.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig
Specified by:
getGerritProxy in interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

setGerritProxy

public void setGerritProxy(String gerritProxy)
GerritProxy.

Parameters:
gerritProxy - the proxy url
See Also:
getGerritProxy()

getBuildScheduleDelay

public int getBuildScheduleDelay()
Description copied from interface: IGerritHudsonTriggerConfig
Returns the BuildScheduleDelay.

Specified by:
getBuildScheduleDelay in interface IGerritHudsonTriggerConfig
Returns:
the value.

setBuildScheduleDelay

public void setBuildScheduleDelay(int buildScheduleDelay)
Setting buildScheduleDelay.

Parameters:
buildScheduleDelay - the delay time
See Also:
getBuildScheduleDelay()

getDynamicConfigRefreshInterval

public int getDynamicConfigRefreshInterval()
Description copied from interface: IGerritHudsonTriggerConfig
Returns the dynamicConfigRefreshInterval.

Specified by:
getDynamicConfigRefreshInterval in interface IGerritHudsonTriggerConfig
Returns:
the value.

setDynamicConfigRefreshInterval

public void setDynamicConfigRefreshInterval(int dynamicConfigRefreshInterval)
Setting dynamicConfigRefreshInterval.

Parameters:
dynamicConfigRefreshInterval - the interval between the fetches.
See Also:
getDynamicConfigRefreshInterval()

getGerritUserName

public String getGerritUserName()
Specified by:
getGerritUserName in interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

setGerritUserName

public void setGerritUserName(String gerritUserName)
GerritUserName.

Parameters:
gerritUserName - the username
See Also:
getGerritUserName()

getGerritEMail

public String getGerritEMail()
Specified by:
getGerritEMail in interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig

setGerritEMail

public void setGerritEMail(String gerritEMail)
The e-mail address for the user in gerrit. Comments added from this e-mail address will be ignored.

Parameters:
gerritEMail - the e-mail address.
See Also:
getGerritEMail()

getNumberOfReceivingWorkerThreads

@Deprecated
public int getNumberOfReceivingWorkerThreads()
Deprecated. 

Description copied from interface: IGerritHudsonTriggerConfig
The number of threads to handle incoming events with.

Specified by:
getNumberOfReceivingWorkerThreads in interface IGerritHudsonTriggerConfig
Returns:
the number of worker threads.

getNumberOfSendingWorkerThreads

@Deprecated
public int getNumberOfSendingWorkerThreads()
Deprecated. 

Description copied from interface: IGerritHudsonTriggerConfig
The default nr of worker threads that sends approvals/review commands.

Specified by:
getNumberOfSendingWorkerThreads in interface IGerritHudsonTriggerConfig
Returns:
the number of worker threads.

setNumberOfReceivingWorkerThreads

@Deprecated
public void setNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads)
Deprecated. 

NumberOfWorkerThreads.

Parameters:
numberOfReceivingWorkerThreads - nr of threads.
See Also:
getNumberOfReceivingWorkerThreads()

setNumberOfSendingWorkerThreads

@Deprecated
public void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
Deprecated. 

Description copied from interface: IGerritHudsonTriggerConfig
NumberOfSendingWorkerThreads. TODO: Should be removed in future.

Specified by:
setNumberOfSendingWorkerThreads in interface IGerritHudsonTriggerConfig
Parameters:
numberOfSendingWorkerThreads - nr of threads.

isGerritBuildCurrentPatchesOnly

public boolean isGerritBuildCurrentPatchesOnly()
Description copied from interface: IGerritHudsonTriggerConfig
If enabled, then old patch revision builds will be canceled.

Specified by:
isGerritBuildCurrentPatchesOnly in interface IGerritHudsonTriggerConfig
Returns:
true if so.

getGerritCmdBuildSuccessful

public String getGerritCmdBuildSuccessful()
Description copied from interface: IGerritHudsonTriggerConfig
The command template to use when sending build-successful messages to Gerrit.

Specified by:
getGerritCmdBuildSuccessful in interface IGerritHudsonTriggerConfig
Returns:
the command template.

setGerritVerifiedCmdBuildSuccessful

public void setGerritVerifiedCmdBuildSuccessful(String cmd)
GerritVerifiedCmdBuildSuccessful.

Parameters:
cmd - the command
See Also:
getGerritCmdBuildSuccessful()

getGerritCmdBuildUnstable

public String getGerritCmdBuildUnstable()
Description copied from interface: IGerritHudsonTriggerConfig
The command template to use when sending build-unstable messages to Gerrit.

Specified by:
getGerritCmdBuildUnstable in interface IGerritHudsonTriggerConfig
Returns:
the command template.

setGerritVerifiedCmdBuildUnstable

public void setGerritVerifiedCmdBuildUnstable(String cmd)
GerritVerifiedCmdBuildUnstable.

Parameters:
cmd - the command
See Also:
getGerritCmdBuildUnstable()

getGerritCmdBuildFailed

public String getGerritCmdBuildFailed()
Description copied from interface: IGerritHudsonTriggerConfig
The command template to use when sending build-failed messages to Gerrit.

Specified by:
getGerritCmdBuildFailed in interface IGerritHudsonTriggerConfig
Returns:
the command template.

setGerritVerifiedCmdBuildFailed

public void setGerritVerifiedCmdBuildFailed(String cmd)
GerritVerifiedCmdBuildFailed.

Parameters:
cmd - the command
See Also:
setGerritVerifiedCmdBuildFailed(java.lang.String)

getGerritCmdBuildStarted

public String getGerritCmdBuildStarted()
Description copied from interface: IGerritHudsonTriggerConfig
The command template to use when sending build-started messages to Gerrit.

Specified by:
getGerritCmdBuildStarted in interface IGerritHudsonTriggerConfig
Returns:
the command template.

setGerritVerifiedCmdBuildStarted

public void setGerritVerifiedCmdBuildStarted(String cmd)
GerritVerifiedCmdBuildStarted.

Parameters:
cmd - the command
See Also:
getGerritCmdBuildStarted()

getGerritCmdBuildNotBuilt

public String getGerritCmdBuildNotBuilt()
Description copied from interface: IGerritHudsonTriggerConfig
The command template to use when sending build-not-built messages to Gerrit.

Specified by:
getGerritCmdBuildNotBuilt in interface IGerritHudsonTriggerConfig
Returns:
the command template.

setGerritVerifiedCmdBuildNotBuilt

public void setGerritVerifiedCmdBuildNotBuilt(String cmd)
GerritVerifiedCmdBuildNotBuilt.

Parameters:
cmd - the command
See Also:
getGerritCmdBuildNotBuilt()

getGerritBuildStartedVerifiedValue

public int getGerritBuildStartedVerifiedValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default verified value for build started.

Specified by:
getGerritBuildStartedVerifiedValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildStartedCodeReviewValue

public int getGerritBuildStartedCodeReviewValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default code review value for build started.

Specified by:
getGerritBuildStartedCodeReviewValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildSuccessfulVerifiedValue

public int getGerritBuildSuccessfulVerifiedValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default verified value for build successful.

Specified by:
getGerritBuildSuccessfulVerifiedValue in interface IGerritHudsonTriggerConfig
Returns:
the falue.

getGerritBuildSuccessfulCodeReviewValue

public int getGerritBuildSuccessfulCodeReviewValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default code review value for build successful.

Specified by:
getGerritBuildSuccessfulCodeReviewValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildFailedVerifiedValue

public int getGerritBuildFailedVerifiedValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default verified value for build failed.

Specified by:
getGerritBuildFailedVerifiedValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildFailedCodeReviewValue

public int getGerritBuildFailedCodeReviewValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default code review value for build failed.

Specified by:
getGerritBuildFailedCodeReviewValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildUnstableVerifiedValue

public int getGerritBuildUnstableVerifiedValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default verified value for build unstable.

Specified by:
getGerritBuildUnstableVerifiedValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildUnstableCodeReviewValue

public int getGerritBuildUnstableCodeReviewValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default code review value for build unstable.

Specified by:
getGerritBuildUnstableCodeReviewValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildNotBuiltVerifiedValue

public int getGerritBuildNotBuiltVerifiedValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default verified value for build not built.

Specified by:
getGerritBuildNotBuiltVerifiedValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritBuildNotBuiltCodeReviewValue

public int getGerritBuildNotBuiltCodeReviewValue()
Description copied from interface: IGerritHudsonTriggerConfig
The default code review value for build not built.

Specified by:
getGerritBuildNotBuiltCodeReviewValue in interface IGerritHudsonTriggerConfig
Returns:
the value.

getGerritFrontEndUrlFor

public String getGerritFrontEndUrlFor(String changeSetNumber,
                                      String revision)
Description copied from interface: IGerritHudsonTriggerConfig
Creates a URL to the provided changeset number.

Specified by:
getGerritFrontEndUrlFor in interface IGerritHudsonTriggerConfig
Parameters:
changeSetNumber - the changeset number
revision - the patch set number (currently not used)
Returns:
a URL based on IGerritHudsonTriggerConfig.getGerritFrontEndUrl() + / + number
See Also:
IGerritHudsonTriggerConfig.getGerritFrontEndUrl()

getGerritFrontEndUrlFor

public String getGerritFrontEndUrlFor(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Description copied from interface: IGerritHudsonTriggerConfig
Creates a URL to the provided changeset number.

Specified by:
getGerritFrontEndUrlFor in interface IGerritHudsonTriggerConfig
Parameters:
event - the gerrit triggered event
Returns:
a URL based on frontUrl + / + number
See Also:
IGerritHudsonTriggerConfig.getGerritFrontEndUrlFor(String, String)

getCategories

public List<VerdictCategory> getCategories()
Description copied from interface: IGerritHudsonTriggerConfig
Get the list of available VerdictCategories.

Specified by:
getCategories in interface IGerritHudsonTriggerConfig
Returns:
the list.

setCategories

public void setCategories(List<VerdictCategory> categories)
Setter for the list of VerdictCategories, used to make testing easier.

Specified by:
setCategories in interface IGerritHudsonTriggerConfig
Parameters:
categories - the list.

isEnableManualTrigger

public boolean isEnableManualTrigger()
Getter for the enableManualTrigger value.

Specified by:
isEnableManualTrigger in interface IGerritHudsonTriggerConfig
Returns:
true if manual triggering is enabled.

setEnableManualTrigger

public void setEnableManualTrigger(boolean enableManualTrigger)
Sets if the manual trigger should be enabled or not.

Parameters:
enableManualTrigger - true if it should be enabled/shown.
See Also:
isEnableManualTrigger()

getGerritAuthentication

public com.sonymobile.tools.gerrit.gerritevents.ssh.Authentication getGerritAuthentication()
Specified by:
getGerritAuthentication in interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig

hasDefaultValues

public boolean hasDefaultValues()
Description copied from interface: IGerritHudsonTriggerConfig
If the plugin still has default values for hostname and frontendurl.

Specified by:
hasDefaultValues in interface IGerritHudsonTriggerConfig
Returns:
true if so.

isEnablePluginMessages

public boolean isEnablePluginMessages()
Description copied from interface: IGerritHudsonTriggerConfig
If other plugins are allowed to contribute messages to be forwarded to Gerrit.

Specified by:
isEnablePluginMessages in interface IGerritHudsonTriggerConfig
Returns:
true if so

getReplicationConfig

public ReplicationConfig getReplicationConfig()
Description copied from interface: IGerritHudsonTriggerConfig
The configurations related to event replication.

Specified by:
getReplicationConfig in interface IGerritHudsonTriggerConfig
Returns:
the replication config.

getWatchdogTimeoutSeconds

public int getWatchdogTimeoutSeconds()
Specified by:
getWatchdogTimeoutSeconds in interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2

getWatchdogTimeoutMinutes

public int getWatchdogTimeoutMinutes()
Convenience getter for the jelly view.

Specified by:
getWatchdogTimeoutMinutes in interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2
Returns:
the watchdogTimeoutMinutes.

getExceptionData

public com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData getExceptionData()
Specified by:
getExceptionData in interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2

isUseRestApi

public boolean isUseRestApi()
Description copied from interface: IGerritHudsonTriggerConfig
If the HTTP REST API should be used for change approval instead of the sh API.

Specified by:
isUseRestApi in interface IGerritHudsonTriggerConfig
Returns:
true if so.

setUseRestApi

public void setUseRestApi(boolean useRestApi)
Sets useRestApi.

Parameters:
useRestApi - true if so
See Also:
isUseRestApi()

getGerritHttpPassword

public String getGerritHttpPassword()
Description copied from interface: IGerritHudsonTriggerConfig
The password for the HTTP REST API.

Specified by:
getGerritHttpPassword in interface IGerritHudsonTriggerConfig
Returns:
the password

setGerritHttpPassword

public void setGerritHttpPassword(String gerritHttpPassword)
Sets gerritHttpPassword.

Parameters:
gerritHttpPassword - the password
See Also:
getGerritHttpPassword()

getGerritHttpUserName

public String getGerritHttpUserName()
Description copied from interface: IGerritHudsonTriggerConfig
The user name for the HTTP REST API.

Specified by:
getGerritHttpUserName in interface IGerritHudsonTriggerConfig
Returns:
username

setGerritHttpUserName

public void setGerritHttpUserName(String gerritHttpUserName)
Sets gerritHttpUserName.

Parameters:
gerritHttpUserName - the username
See Also:
getGerritHttpUserName()

getHttpCredentials

public org.apache.http.auth.Credentials getHttpCredentials()
Specified by:
getHttpCredentials in interface com.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig


Copyright © 2004-2014. All Rights Reserved.