com.sonyericsson.hudson.plugins.gerrit.trigger.config
Interface IGerritHudsonTriggerConfig

All Superinterfaces:
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
All Known Implementing Classes:
Config

public interface IGerritHudsonTriggerConfig
extends com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2

Interface for the Global configuration.

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

Method Summary
 int getBuildScheduleDelay()
          Returns the BuildScheduleDelay.
 List<VerdictCategory> getCategories()
          Get the list of available VerdictCategories.
 int getDynamicConfigRefreshInterval()
          Returns the dynamicConfigRefreshInterval.
 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 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 number, String revision)
          Creates a URL to the provided changeset number.
 String getGerritHttpPassword()
          The password for the HTTP REST API.
 String getGerritHttpUserName()
          The user name for the HTTP REST API.
 int getNumberOfReceivingWorkerThreads()
          Deprecated. 
 int getNumberOfSendingWorkerThreads()
          Deprecated. 
 ReplicationConfig getReplicationConfig()
          The configurations related to event replication.
 boolean hasDefaultValues()
          If the plugin still has default values for hostname and frontendurl.
 boolean isEnableManualTrigger()
          If the manual trigger is enabled (shown to users) or not.
 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 setCategories(List<VerdictCategory> categories)
          Set the list of available VerdictCategories.
 void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
          NumberOfSendingWorkerThreads.
 void setValues(net.sf.json.JSONObject form)
          Sets all config values from the provided JSONObject.
 
Methods inherited from interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2
getExceptionData, getWatchdogTimeoutMinutes, getWatchdogTimeoutSeconds
 
Methods inherited from interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig
getGerritEMail
 
Methods inherited from interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
getGerritAuthentication, getGerritAuthKeyFile, getGerritAuthKeyFilePassword, getGerritHostName, getGerritProxy, getGerritSshPort, getGerritUserName
 
Methods inherited from interface com.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig
getGerritProxy, getHttpCredentials
 

Method Detail

isGerritBuildCurrentPatchesOnly

boolean isGerritBuildCurrentPatchesOnly()
If enabled, then old patch revision builds will be canceled.

Returns:
true if so.

getGerritFrontEndUrl

String getGerritFrontEndUrl()
Base URL for the Gerrit UI.

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 '/'

getGerritCmdBuildStarted

String getGerritCmdBuildStarted()
The command template to use when sending build-started messages to Gerrit.

Returns:
the command template.

getGerritCmdBuildSuccessful

String getGerritCmdBuildSuccessful()
The command template to use when sending build-successful messages to Gerrit.

Returns:
the command template.

getGerritCmdBuildFailed

String getGerritCmdBuildFailed()
The command template to use when sending build-failed messages to Gerrit.

Returns:
the command template.

getGerritCmdBuildUnstable

String getGerritCmdBuildUnstable()
The command template to use when sending build-unstable messages to Gerrit.

Returns:
the command template.

getGerritCmdBuildNotBuilt

String getGerritCmdBuildNotBuilt()
The command template to use when sending build-not-built messages to Gerrit.

Returns:
the command template.

getGerritBuildStartedVerifiedValue

int getGerritBuildStartedVerifiedValue()
The default verified value for build started.

Returns:
the value.

getGerritBuildStartedCodeReviewValue

int getGerritBuildStartedCodeReviewValue()
The default code review value for build started.

Returns:
the value.

getGerritBuildSuccessfulVerifiedValue

int getGerritBuildSuccessfulVerifiedValue()
The default verified value for build successful.

Returns:
the falue.

getGerritBuildSuccessfulCodeReviewValue

int getGerritBuildSuccessfulCodeReviewValue()
The default code review value for build successful.

Returns:
the value.

getGerritBuildFailedVerifiedValue

int getGerritBuildFailedVerifiedValue()
The default verified value for build failed.

Returns:
the value.

getGerritBuildFailedCodeReviewValue

int getGerritBuildFailedCodeReviewValue()
The default code review value for build failed.

Returns:
the value.

getGerritBuildUnstableVerifiedValue

int getGerritBuildUnstableVerifiedValue()
The default verified value for build unstable.

Returns:
the value.

getGerritBuildUnstableCodeReviewValue

int getGerritBuildUnstableCodeReviewValue()
The default code review value for build unstable.

Returns:
the value.

getGerritBuildNotBuiltVerifiedValue

int getGerritBuildNotBuiltVerifiedValue()
The default verified value for build not built.

Returns:
the value.

getGerritBuildNotBuiltCodeReviewValue

int getGerritBuildNotBuiltCodeReviewValue()
The default code review value for build not built.

Returns:
the value.

setValues

void setValues(net.sf.json.JSONObject form)
Sets all config values from the provided JSONObject.

Parameters:
form - the JSON object with form data.

getGerritFrontEndUrlFor

String getGerritFrontEndUrlFor(String number,
                               String revision)
Creates a URL to the provided changeset number.

Parameters:
number - the changeset number
revision - the patch set number (currently not used)
Returns:
a URL based on getGerritFrontEndUrl() + / + number
See Also:
getGerritFrontEndUrl()

getGerritFrontEndUrlFor

String getGerritFrontEndUrlFor(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Creates a URL to the provided changeset number.

Parameters:
event - the gerrit triggered event
Returns:
a URL based on frontUrl + / + number
See Also:
getGerritFrontEndUrlFor(String, String)

getCategories

List<VerdictCategory> getCategories()
Get the list of available VerdictCategories.

Returns:
the list.

setCategories

void setCategories(List<VerdictCategory> categories)
Set the list of available VerdictCategories.

Parameters:
categories - the list.

isEnableManualTrigger

boolean isEnableManualTrigger()
If the manual trigger is enabled (shown to users) or not.

Returns:
true if so.

getBuildScheduleDelay

int getBuildScheduleDelay()
Returns the BuildScheduleDelay.

Returns:
the value.

getDynamicConfigRefreshInterval

int getDynamicConfigRefreshInterval()
Returns the dynamicConfigRefreshInterval.

Returns:
the value.

hasDefaultValues

boolean hasDefaultValues()
If the plugin still has default values for hostname and frontendurl.

Returns:
true if so.

isEnablePluginMessages

boolean isEnablePluginMessages()
If other plugins are allowed to contribute messages to be forwarded to Gerrit.

Returns:
true if so

isUseRestApi

boolean isUseRestApi()
If the HTTP REST API should be used for change approval instead of the sh API.

Returns:
true if so.

getGerritHttpPassword

String getGerritHttpPassword()
The password for the HTTP REST API.

Returns:
the password

getGerritHttpUserName

String getGerritHttpUserName()
The user name for the HTTP REST API.

Returns:
username

getReplicationConfig

ReplicationConfig getReplicationConfig()
The configurations related to event replication.

Returns:
the replication config.

setNumberOfSendingWorkerThreads

void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
NumberOfSendingWorkerThreads. TODO: Should be removed in future.

Parameters:
numberOfSendingWorkerThreads - nr of threads.

getNumberOfReceivingWorkerThreads

@Deprecated
int getNumberOfReceivingWorkerThreads()
Deprecated. 

The number of threads to handle incoming events with.

Returns:
the number of worker threads.

getNumberOfSendingWorkerThreads

@Deprecated
int getNumberOfSendingWorkerThreads()
Deprecated. 

The default nr of worker threads that sends approvals/review commands.

Returns:
the number of worker threads.


Copyright © 2004-2014. All Rights Reserved.