Class Config
java.lang.Object
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
Configuration bean for the global configuration.
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDefault value forisGerritBuildCurrentPatchesOnly().static final intDefault value for the dynamic config refresh interval.static final booleanDefault manual trigger enabled.static final booleanDefault plug-in messages enabled.static final booleanDefault value indicating if the Gerrit server should be used to fetch project names.static final booleanDefault topic association enabled.static final intDefault code review vote to Gerrit when a build is aborted.static final intDefault verified vote to Gerrit when a build is aborted.static final intDefault code review vote to Gerrit when a build is failed.static final intDefault verified vote to Gerrit when a build is failed.static final intDefault code review vote to Gerrit when a build is not built.static final intDefault verified vote to Gerrit when a build is not built.static final int- * Default code review vote to Gerrit when a build is started.static final intDefault verified vote to Gerrit when a build is started.static final intDefault code review vote to Gerrit when a build is successful.static final intDefault verified vote to Gerrit when a build is successful.static final intDefault code review vote to Gerrit when a build is unstable.static final intDefault verified vote to Gerrit when a build is unstable.static final intDefault timeout value in minutes for the connection watchdog.static final com.sonymobile.tools.gerrit.gerritevents.dto.rest.NotifyGlobal default for notification level.static final intDefault value showing how many seconds between startup and initial project list fetch.static final intDefault value showing how many seconds between project list fetches.static final booleanDefault value for the option to allow triggering on messages for any user. -
Constructor Summary
ConstructorsConstructorDescriptionConfig()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
Modifier and TypeMethodDescriptionThe object containing information regarding if old builds should be cancelled when new builds are triggered.intReturns the BuildScheduleDelay.Get the list of available VerdictCategories.intReturns the dynamicConfigRefreshInterval.com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionDatacom.sonymobile.tools.gerrit.gerritevents.ssh.AuthenticationThe instance ofSecretwhich has a password for the private key, or null if there is none.The default code review value for build aborted.The default verified value for build aborted.The default code review value for build failed.The default verified value for build failed.The default code review value for build not built.The default verified value for build not built.The default code review value for build started.The default verified value for build started.The default code review value for build successful.The default verified value for build successful.The default code review value for build unstable.The default verified value for build unstable.The command template to use when sending build-aborted messages to Gerrit.The command template to use when sending build-failed messages to Gerrit.The command template to use when sending build-not-built messages to Gerrit.The command template to use when sending build-started messages to Gerrit.The command template to use when sending build-successful messages to Gerrit.The command template to use when sending build-unstable messages to Gerrit.Base URL for the Gerrit UI.getGerritFrontEndUrlFor(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event) Creates a URL to the provided changeset number.getGerritFrontEndUrlFor(String changeSetNumber, String revision) Creates a URL to the provided changeset number.The password for the HTTP REST API.The instance ofSecretwhich has a password for the HTTP REST API, or null if there is none.The user name for the HTTP REST API.intorg.apache.http.auth.Credentialscom.sonymobile.tools.gerrit.gerritevents.dto.rest.NotifyReturns whom to notify.intDeprecated.intDeprecated.intReturns the projectListFetchDelay.intReturns the projectListFetchDelay.The configurations related to event replication.Returns the description message for the jelly entry.intConvenience getter for the jelly view.intbooleanIf the plugin still has default values for hostname and frontendurl.booleanGetter for the enableManualTrigger value.booleanIf other plugins are allowed to contribute messages to be forwarded to Gerrit.booleanIf this Gerrit server should be used to fetch project names for auto completion.booleanIf enabled, then old patch revision builds will be canceled.booleanIf Code-Review label should be provided to REST API for ReviewInput.booleanIf Verified label should be provided to REST API for ReviewInput.booleanIf comments added by the default user should trigger events.booleanIf the HTTP REST API should be used for change approval instead of the sh API.booleanIf enabled, build notifications and votes will be sent to patchsets with the same topic.voidsetBuildCurrentPatchesOnly(BuildCancellationPolicy buildCurrentPatchesOnly) Set build cancellation policy for current patches.voidsetBuildScheduleDelay(int buildScheduleDelay) Setting buildScheduleDelay.voidsetCategories(List<VerdictCategory> categories) Setter for the list of VerdictCategories, used to make testing easier.voidsetDynamicConfigRefreshInterval(int dynamicConfigRefreshInterval) Setting dynamicConfigRefreshInterval.voidsetEnableManualTrigger(boolean enableManualTrigger) Sets if the manual trigger should be enabled or not.voidsetEnableProjectAutoCompletion(boolean enableProjectAutoCompletion) If the project list should be fetched from the gerrit server or not.voidsetExceptionData(com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData exceptionData) Set exception data.voidsetGerritAuthKeyFile(File gerritAuthKeyFile) GerritAuthKeyFile.voidsetGerritAuthKeyFilePassword(String gerritAuthKeyFilePassword) GerritAuthKeyFilePassword.voidsetGerritBuildAbortedCodeReviewValue(Integer gerritBuildAbortedCodeReviewValue) Set Gerrit Build Aborted Code Review Value.voidsetGerritBuildAbortedVerifiedValue(Integer gerritBuildAbortedVerifiedValue) Set Gerrit Build Aborted Verified Value.voidsetGerritBuildFailedCodeReviewValue(Integer gerritBuildFailedCodeReviewValue) Set Gerrit Build Failed Code Review Value.voidsetGerritBuildFailedVerifiedValue(Integer gerritBuildFailedVerifiedValue) Set Gerrit Build Failed Verified Value.voidsetGerritBuildNotBuiltCodeReviewValue(Integer gerritBuildNotBuiltCodeReviewValue) Set Gerrit Build Not Build Code Review Value.voidsetGerritBuildNotBuiltVerifiedValue(Integer gerritBuildNotBuiltVerifiedValue) Set Gerrit Build Not Build Verified Value.voidsetGerritBuildStartedCodeReviewValue(Integer gerritBuildStartedCodeReviewValue) Set Gerrit Build Started Code Review Value.voidsetGerritBuildStartedVerifiedValue(Integer gerritBuildStartedVerifiedValue) Set Gerrit Build Started Verified Value.voidsetGerritBuildSuccessfulCodeReviewValue(Integer gerritBuildSuccessfulCodeReviewValue) Set Gerrit Build Successful Code Review Value.voidsetGerritBuildSuccessfulVerifiedValue(Integer gerritBuildSuccessfulVerifiedValue) Set Gerrit Build Sucessful Verified Value.voidsetGerritBuildUnstableCodeReviewValue(Integer gerritBuildUnstableCodeReviewValue) Set Gerrit Build Unstable Code Review Value.voidsetGerritBuildUnstableVerifiedValue(Integer gerritBuildUnstableVerifiedValue) Set Gerrit Build Unstable Verified Value.voidSet Gerrit Verified Cmd Build Aborted.voidSet Gerrit Verified Cmd Build Failed.voidSet Gerrit Verified Cmd Build NotBuilt.voidSet Gerrit Verified Cmd Build Started.voidSet Gerrit Verified Cmd Build Successful.voidSet Gerrit Verified Cmd Build Unstable.voidsetGerritEMail(String gerritEMail) The e-mail address for the user in gerrit.voidsetGerritFrontEndUrl(String gerritFrontEndURL) This method is needed for configuration as code to discover this property.voidsetGerritFrontEndURL(String gerritFrontEndURL) GerritFrontEndURL.voidsetGerritHostName(String gerritHostName) GerritHostName.voidsetGerritHttpPassword(String gerritHttpPassword) Sets gerritHttpPassword.voidsetGerritHttpUserName(String gerritHttpUserName) Sets gerritHttpUserName.voidsetGerritProxy(String gerritProxy) GerritProxy.voidsetGerritSshPort(int gerritSshPort) GerritSshPort.voidsetGerritUserName(String gerritUserName) GerritUserName.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidDeprecated.voidsetNotificationLevel(com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify notificationLevel) Sets the value for whom to notify.voidsetNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads) Deprecated.voidsetNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads) Deprecated.voidsetProjectListFetchDelay(int projectListFetchDelay) Sets the delay from Jenkins startup before the project list should be fetched.voidsetProjectListRefreshInterval(int projectListRefreshInterval) The interval between recurrent fetches of the project list.voidsetReplicationConfig(ReplicationConfig replicationConfig) Set replication config.voidsetRestCodeReview(boolean restCodeReview) Sets restCodeReview.voidsetRestVerified(boolean restVerified) Sets restVerified.voidsetTriggerOnAllComments(boolean triggerOnAllComments) Sets triggerOnAllComments.voidsetUseRestApi(boolean useRestApi) Sets useRestApi.voidsetValues(net.sf.json.JSONObject formData) Sets all config values from the provided JSONObject.voidsetVoteSameTopic(boolean voteSameTopic) Standard setter for the voteSameTopic value.voidsetWatchdogTimeoutMinutes(int watchdogTimeoutMinutes) Set watchdog timeout.
-
Field Details
-
DEFAULT_GERRIT_BUILD_STARTED_VERIFIED_VALUE
public static final int DEFAULT_GERRIT_BUILD_STARTED_VERIFIED_VALUEDefault verified vote to Gerrit when a build is started.- See Also:
-
DEFAULT_GERRIT_BUILD_UNSTABLE_VERIFIED_VALUE
public static final int DEFAULT_GERRIT_BUILD_UNSTABLE_VERIFIED_VALUEDefault verified vote to Gerrit when a build is unstable.- See Also:
-
DEFAULT_GERRIT_BUILD_FAILURE_VERIFIED_VALUE
public static final int DEFAULT_GERRIT_BUILD_FAILURE_VERIFIED_VALUEDefault verified vote to Gerrit when a build is failed.- See Also:
-
DEFAULT_GERRIT_BUILD_SUCCESSFUL_VERIFIED_VALUE
public static final int DEFAULT_GERRIT_BUILD_SUCCESSFUL_VERIFIED_VALUEDefault verified vote to Gerrit when a build is successful.- See Also:
-
DEFAULT_GERRIT_BUILD_NOT_BUILT_VERIFIED_VALUE
public static final int DEFAULT_GERRIT_BUILD_NOT_BUILT_VERIFIED_VALUEDefault verified vote to Gerrit when a build is not built.- See Also:
-
DEFAULT_GERRIT_BUILD_ABORTED_VERIFIED_VALUE
public static final int DEFAULT_GERRIT_BUILD_ABORTED_VERIFIED_VALUEDefault verified vote to Gerrit when a build is aborted.- See Also:
-
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:
-
DEFAULT_GERRIT_BUILD_UNSTABLE_CODE_REVIEW_VALUE
public static final int DEFAULT_GERRIT_BUILD_UNSTABLE_CODE_REVIEW_VALUEDefault code review vote to Gerrit when a build is unstable.- See Also:
-
DEFAULT_GERRIT_BUILD_FAILURE_CODE_REVIEW_VALUE
public static final int DEFAULT_GERRIT_BUILD_FAILURE_CODE_REVIEW_VALUEDefault code review vote to Gerrit when a build is failed.- See Also:
-
DEFAULT_GERRIT_BUILD_SUCCESSFUL_CODE_REVIEW_VALUE
public static final int DEFAULT_GERRIT_BUILD_SUCCESSFUL_CODE_REVIEW_VALUEDefault code review vote to Gerrit when a build is successful.- See Also:
-
DEFAULT_GERRIT_BUILD_NOT_BUILT_CODE_REVIEW_VALUE
public static final int DEFAULT_GERRIT_BUILD_NOT_BUILT_CODE_REVIEW_VALUEDefault code review vote to Gerrit when a build is not built.- See Also:
-
DEFAULT_GERRIT_BUILD_ABORTED_CODE_REVIEW_VALUE
public static final int DEFAULT_GERRIT_BUILD_ABORTED_CODE_REVIEW_VALUEDefault code review vote to Gerrit when a build is aborted.- See Also:
-
DEFAULT_ENABLE_PROJECT_AUTO_COMPLETION
public static final boolean DEFAULT_ENABLE_PROJECT_AUTO_COMPLETIONDefault value indicating if the Gerrit server should be used to fetch project names.- See Also:
-
DEFAULT_DYNAMIC_CONFIG_REFRESH_INTERVAL
public static final int DEFAULT_DYNAMIC_CONFIG_REFRESH_INTERVALDefault value for the dynamic config refresh interval.- See Also:
-
DEFAULT_PROJECT_LIST_FETCH_DELAY
public static final int DEFAULT_PROJECT_LIST_FETCH_DELAYDefault value showing how many seconds between startup and initial project list fetch.- See Also:
-
DEFAULT_PROJECT_LIST_REFRESH_INTERVAL
public static final int DEFAULT_PROJECT_LIST_REFRESH_INTERVALDefault value showing how many seconds between project list fetches.Only used for Gerrit servers with version < 2.12
- See Also:
-
DEFAULT_GERRIT_WATCHDOG_TIMEOUT_MINUTES
public static final int DEFAULT_GERRIT_WATCHDOG_TIMEOUT_MINUTESDefault timeout value in minutes for the connection watchdog.- See Also:
-
DEFAULT_ENABLE_MANUAL_TRIGGER
public static final boolean DEFAULT_ENABLE_MANUAL_TRIGGERDefault manual trigger enabled.- See Also:
-
DEFAULT_ENABLE_PLUGIN_MESSAGES
public static final boolean DEFAULT_ENABLE_PLUGIN_MESSAGESDefault plug-in messages enabled.- See Also:
-
DEFAULT_ENABLE_TOPIC_ASSOCIATION
public static final boolean DEFAULT_ENABLE_TOPIC_ASSOCIATIONDefault topic association enabled.- See Also:
-
DEFAULT_TRIGGER_ON_ALL_COMMENTS
public static final boolean DEFAULT_TRIGGER_ON_ALL_COMMENTSDefault value for the option to allow triggering on messages for any user.- See Also:
-
DEFAULT_BUILD_CURRENT_PATCHES_ONLY
public static final boolean DEFAULT_BUILD_CURRENT_PATCHES_ONLYDefault value forisGerritBuildCurrentPatchesOnly().- See Also:
-
DEFAULT_NOTIFICATION_LEVEL
public static final com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify DEFAULT_NOTIFICATION_LEVELGlobal default for notification level.
-
-
Constructor Details
-
Config
public Config(net.sf.json.JSONObject formData) Constructor.- Parameters:
formData- the data.
-
Config
Copy constructor.- Parameters:
config- the Config object to be copied.
-
Config
@DataBoundConstructor 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 datareq- a path.
-
-
Method Details
-
setValues
public void setValues(net.sf.json.JSONObject formData) Description copied from interface:IGerritHudsonTriggerConfigSets all config values from the provided JSONObject.- Specified by:
setValuesin interfaceIGerritHudsonTriggerConfig- Parameters:
formData- the JSON object with form data.
-
getGerritAuthKeyFile
- Specified by:
getGerritAuthKeyFilein interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
setGerritAuthKeyFile
GerritAuthKeyFile.- Parameters:
gerritAuthKeyFile- the file- See Also:
-
getGerritAuthKeyFilePassword
- Specified by:
getGerritAuthKeyFilePasswordin interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
setGerritAuthKeyFilePassword
GerritAuthKeyFilePassword.- Parameters:
gerritAuthKeyFilePassword- the password- See Also:
-
getGerritAuthKeyFileSecretPassword
Description copied from interface:IGerritHudsonTriggerConfigThe instance ofSecretwhich has a password for the private key, or null if there is none.- Specified by:
getGerritAuthKeyFileSecretPasswordin interfaceIGerritHudsonTriggerConfig- Returns:
- the instance of
Secret.
-
getGerritFrontEndUrl
Description copied from interface:IGerritHudsonTriggerConfigBase URL for the Gerrit UI.- Specified by:
getGerritFrontEndUrlin interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig- Specified by:
getGerritFrontEndUrlin interfaceIGerritHudsonTriggerConfig- Specified by:
getGerritFrontEndUrlin interfacecom.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig- Returns:
- the gerrit front end URL. Always ends with '/'
-
setGerritFrontEndURL
GerritFrontEndURL.- Parameters:
gerritFrontEndURL- the URL- See Also:
-
setGerritFrontEndUrl
This method is needed for configuration as code to discover this property. It would be ignored otherwise because of the "URL" vs. "Url" naming mismatch in old getter/setter.- Parameters:
gerritFrontEndURL- the Url
-
getGerritHostName
- Specified by:
getGerritHostNamein interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
setGerritHostName
GerritHostName.- Parameters:
gerritHostName- the hostname- See Also:
-
getGerritSshPort
public int getGerritSshPort()- Specified by:
getGerritSshPortin interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
setGerritSshPort
public void setGerritSshPort(int gerritSshPort) GerritSshPort.- Parameters:
gerritSshPort- the port- See Also:
-
getGerritProxy
- Specified by:
getGerritProxyin interfacecom.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig- Specified by:
getGerritProxyin interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
setGerritProxy
GerritProxy.- Parameters:
gerritProxy- the proxy url- See Also:
-
getBuildScheduleDelay
public int getBuildScheduleDelay()Description copied from interface:IGerritHudsonTriggerConfigReturns the BuildScheduleDelay.- Specified by:
getBuildScheduleDelayin interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
setBuildScheduleDelay
public void setBuildScheduleDelay(int buildScheduleDelay) Setting buildScheduleDelay.- Parameters:
buildScheduleDelay- the delay time- See Also:
-
getDynamicConfigRefreshInterval
public int getDynamicConfigRefreshInterval()Description copied from interface:IGerritHudsonTriggerConfigReturns the dynamicConfigRefreshInterval.- Specified by:
getDynamicConfigRefreshIntervalin interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getProjectListFetchDelay
public int getProjectListFetchDelay()Description copied from interface:IGerritHudsonTriggerConfigReturns the projectListFetchDelay.- Specified by:
getProjectListFetchDelayin interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
setProjectListFetchDelay
public void setProjectListFetchDelay(int projectListFetchDelay) Sets the delay from Jenkins startup before the project list should be fetched.- Parameters:
projectListFetchDelay- the delay- See Also:
-
getProjectListRefreshInterval
public int getProjectListRefreshInterval()Description copied from interface:IGerritHudsonTriggerConfigReturns the projectListFetchDelay.- Specified by:
getProjectListRefreshIntervalin interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
setProjectListRefreshInterval
public void setProjectListRefreshInterval(int projectListRefreshInterval) The interval between recurrent fetches of the project list.- Parameters:
projectListRefreshInterval- the interval- See Also:
-
isEnableProjectAutoCompletion
public boolean isEnableProjectAutoCompletion()Description copied from interface:IGerritHudsonTriggerConfigIf this Gerrit server should be used to fetch project names for auto completion.- Specified by:
isEnableProjectAutoCompletionin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so.
-
setEnableProjectAutoCompletion
public void setEnableProjectAutoCompletion(boolean enableProjectAutoCompletion) If the project list should be fetched from the gerrit server or not.- Parameters:
enableProjectAutoCompletion- true if so- See Also:
-
setDynamicConfigRefreshInterval
public void setDynamicConfigRefreshInterval(int dynamicConfigRefreshInterval) Setting dynamicConfigRefreshInterval.- Parameters:
dynamicConfigRefreshInterval- the interval between the fetches.- See Also:
-
getGerritUserName
- Specified by:
getGerritUserNamein interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
setGerritUserName
GerritUserName.- Parameters:
gerritUserName- the username- See Also:
-
getGerritEMail
- Specified by:
getGerritEMailin interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig
-
getNotificationLevel
public com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify getNotificationLevel()Description copied from interface:IGerritHudsonTriggerConfigReturns whom to notify.- Specified by:
getNotificationLevelin interfaceIGerritHudsonTriggerConfig- Returns:
- the notification level value
-
setGerritEMail
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:
-
setNotificationLevel
public void setNotificationLevel(com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify notificationLevel) Sets the value for whom to notify.- Parameters:
notificationLevel- the notification level.
-
getNumberOfReceivingWorkerThreads
Deprecated.Description copied from interface:IGerritHudsonTriggerConfigThe number of threads to handle incoming events with.- Specified by:
getNumberOfReceivingWorkerThreadsin interfaceIGerritHudsonTriggerConfig- Returns:
- the number of worker threads.
-
getNumberOfSendingWorkerThreads
Deprecated.Description copied from interface:IGerritHudsonTriggerConfigThe default nr of worker threads that sends approvals/review commands.- Specified by:
getNumberOfSendingWorkerThreadsin interfaceIGerritHudsonTriggerConfig- Returns:
- the number of worker threads.
-
setNumberOfReceivingWorkerThreads
Deprecated.NumberOfWorkerThreads.- Parameters:
numberOfReceivingWorkerThreads- nr of threads.- See Also:
-
setNumberOfSendingWorkerThreads
Deprecated.Description copied from interface:IGerritHudsonTriggerConfigNumberOfSendingWorkerThreads. TODO: Should be removed in future.- Specified by:
setNumberOfSendingWorkerThreadsin interfaceIGerritHudsonTriggerConfig- Parameters:
numberOfSendingWorkerThreads- nr of threads.
-
isGerritBuildCurrentPatchesOnly
public boolean isGerritBuildCurrentPatchesOnly()Description copied from interface:IGerritHudsonTriggerConfigIf enabled, then old patch revision builds will be canceled.- Specified by:
isGerritBuildCurrentPatchesOnlyin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so.
-
getBuildCurrentPatchesOnly
Description copied from interface:IGerritHudsonTriggerConfigThe object containing information regarding if old builds should be cancelled when new builds are triggered.- Specified by:
getBuildCurrentPatchesOnlyin interfaceIGerritHudsonTriggerConfig- Returns:
- the BuildCancellationPolicy
-
setBuildCurrentPatchesOnly
Set build cancellation policy for current patches. Exposed for configuration as code.- Parameters:
buildCurrentPatchesOnly- new policy.
-
isVoteSameTopic
public boolean isVoteSameTopic()Description copied from interface:IGerritHudsonTriggerConfigIf enabled, build notifications and votes will be sent to patchsets with the same topic.- Specified by:
isVoteSameTopicin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so.
-
setVoteSameTopic
public void setVoteSameTopic(boolean voteSameTopic) Standard setter for the voteSameTopic value.- Parameters:
voteSameTopic- true if patchsets with same topic should be voted together.
-
getVoteSameTopicDescription
Returns the description message for the jelly entry.- Returns:
- descriptionMsg for jelly.
-
getGerritCmdBuildSuccessful
Description copied from interface:IGerritHudsonTriggerConfigThe command template to use when sending build-successful messages to Gerrit.- Specified by:
getGerritCmdBuildSuccessfulin interfaceIGerritHudsonTriggerConfig- Returns:
- the command template.
-
setGerritVerifiedCmdBuildSuccessful
Deprecated.Set Gerrit Verified Cmd Build Successful.- Parameters:
cmd- the command- See Also:
-
setGerritCmdBuildSuccessful
Set Gerrit Verified Cmd Build Successful.- Parameters:
cmd- the Gerrit command for successful verification- See Also:
-
getGerritCmdBuildUnstable
Description copied from interface:IGerritHudsonTriggerConfigThe command template to use when sending build-unstable messages to Gerrit.- Specified by:
getGerritCmdBuildUnstablein interfaceIGerritHudsonTriggerConfig- Returns:
- the command template.
-
setGerritVerifiedCmdBuildUnstable
Deprecated.Set Gerrit Verified Cmd Build Unstable.- Parameters:
cmd- the command- See Also:
-
setGerritCmdBuildUnstable
Set Gerrit Verified Cmd Build Unstable.- Parameters:
cmd- the command- See Also:
-
getGerritCmdBuildFailed
Description copied from interface:IGerritHudsonTriggerConfigThe command template to use when sending build-failed messages to Gerrit.- Specified by:
getGerritCmdBuildFailedin interfaceIGerritHudsonTriggerConfig- Returns:
- the command template.
-
setGerritVerifiedCmdBuildFailed
Deprecated.Set Gerrit Verified Cmd Build Failed.- Parameters:
cmd- the command- See Also:
-
setGerritCmdBuildFailed
Set Gerrit Verified Cmd Build Failed.- Parameters:
cmd- the command- See Also:
-
getGerritCmdBuildStarted
Description copied from interface:IGerritHudsonTriggerConfigThe command template to use when sending build-started messages to Gerrit.- Specified by:
getGerritCmdBuildStartedin interfaceIGerritHudsonTriggerConfig- Returns:
- the command template.
-
setGerritVerifiedCmdBuildStarted
Deprecated.Set Gerrit Verified Cmd Build Started.- Parameters:
cmd- the command- See Also:
-
setGerritCmdBuildStarted
Set Gerrit Verified Cmd Build Started.- Parameters:
cmd- the command- See Also:
-
getGerritCmdBuildNotBuilt
Description copied from interface:IGerritHudsonTriggerConfigThe command template to use when sending build-not-built messages to Gerrit.- Specified by:
getGerritCmdBuildNotBuiltin interfaceIGerritHudsonTriggerConfig- Returns:
- the command template.
-
setGerritVerifiedCmdBuildNotBuilt
Deprecated.Set Gerrit Verified Cmd Build NotBuilt.- Parameters:
cmd- the command- See Also:
-
setGerritCmdBuildNotBuilt
Set Gerrit Verified Cmd Build NotBuilt.- Parameters:
cmd- the command- See Also:
-
getGerritCmdBuildAborted
Description copied from interface:IGerritHudsonTriggerConfigThe command template to use when sending build-aborted messages to Gerrit.- Specified by:
getGerritCmdBuildAbortedin interfaceIGerritHudsonTriggerConfig- Returns:
- the command template.
-
setGerritVerifiedCmdBuildAborted
Deprecated.Set Gerrit Verified Cmd Build Aborted.- Parameters:
cmd- the command- See Also:
-
setGerritCmdBuildAborted
Set Gerrit Verified Cmd Build Aborted.- Parameters:
cmd- the command- See Also:
-
getGerritBuildStartedVerifiedValue
Description copied from interface:IGerritHudsonTriggerConfigThe default verified value for build started.- Specified by:
getGerritBuildStartedVerifiedValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildStartedCodeReviewValue
Description copied from interface:IGerritHudsonTriggerConfigThe default code review value for build started.- Specified by:
getGerritBuildStartedCodeReviewValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildSuccessfulVerifiedValue
Description copied from interface:IGerritHudsonTriggerConfigThe default verified value for build successful.- Specified by:
getGerritBuildSuccessfulVerifiedValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the falue.
-
getGerritBuildSuccessfulCodeReviewValue
Description copied from interface:IGerritHudsonTriggerConfigThe default code review value for build successful.- Specified by:
getGerritBuildSuccessfulCodeReviewValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildFailedVerifiedValue
Description copied from interface:IGerritHudsonTriggerConfigThe default verified value for build failed.- Specified by:
getGerritBuildFailedVerifiedValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildFailedCodeReviewValue
Description copied from interface:IGerritHudsonTriggerConfigThe default code review value for build failed.- Specified by:
getGerritBuildFailedCodeReviewValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildUnstableVerifiedValue
Description copied from interface:IGerritHudsonTriggerConfigThe default verified value for build unstable.- Specified by:
getGerritBuildUnstableVerifiedValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildUnstableCodeReviewValue
Description copied from interface:IGerritHudsonTriggerConfigThe default code review value for build unstable.- Specified by:
getGerritBuildUnstableCodeReviewValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildNotBuiltVerifiedValue
Description copied from interface:IGerritHudsonTriggerConfigThe default verified value for build not built.- Specified by:
getGerritBuildNotBuiltVerifiedValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildNotBuiltCodeReviewValue
Description copied from interface:IGerritHudsonTriggerConfigThe default code review value for build not built.- Specified by:
getGerritBuildNotBuiltCodeReviewValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildAbortedVerifiedValue
Description copied from interface:IGerritHudsonTriggerConfigThe default verified value for build aborted.- Specified by:
getGerritBuildAbortedVerifiedValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
getGerritBuildAbortedCodeReviewValue
Description copied from interface:IGerritHudsonTriggerConfigThe default code review value for build aborted.- Specified by:
getGerritBuildAbortedCodeReviewValuein interfaceIGerritHudsonTriggerConfig- Returns:
- the value.
-
setGerritBuildStartedVerifiedValue
Set Gerrit Build Started Verified Value.- Parameters:
gerritBuildStartedVerifiedValue- value
-
setGerritBuildSuccessfulVerifiedValue
Set Gerrit Build Sucessful Verified Value.- Parameters:
gerritBuildSuccessfulVerifiedValue- value
-
setGerritBuildFailedVerifiedValue
Set Gerrit Build Failed Verified Value.- Parameters:
gerritBuildFailedVerifiedValue- value
-
setGerritBuildUnstableVerifiedValue
Set Gerrit Build Unstable Verified Value.- Parameters:
gerritBuildUnstableVerifiedValue- value
-
setGerritBuildNotBuiltVerifiedValue
Set Gerrit Build Not Build Verified Value.- Parameters:
gerritBuildNotBuiltVerifiedValue- value
-
setGerritBuildAbortedVerifiedValue
Set Gerrit Build Aborted Verified Value.- Parameters:
gerritBuildAbortedVerifiedValue- value
-
setGerritBuildStartedCodeReviewValue
Set Gerrit Build Started Code Review Value.- Parameters:
gerritBuildStartedCodeReviewValue- value
-
setGerritBuildSuccessfulCodeReviewValue
Set Gerrit Build Successful Code Review Value.- Parameters:
gerritBuildSuccessfulCodeReviewValue- value
-
setGerritBuildFailedCodeReviewValue
Set Gerrit Build Failed Code Review Value.- Parameters:
gerritBuildFailedCodeReviewValue- value
-
setGerritBuildUnstableCodeReviewValue
Set Gerrit Build Unstable Code Review Value.- Parameters:
gerritBuildUnstableCodeReviewValue- value
-
setGerritBuildNotBuiltCodeReviewValue
Set Gerrit Build Not Build Code Review Value.- Parameters:
gerritBuildNotBuiltCodeReviewValue- value
-
setGerritBuildAbortedCodeReviewValue
Set Gerrit Build Aborted Code Review Value.- Parameters:
gerritBuildAbortedCodeReviewValue- value
-
getGerritFrontEndUrlFor
Description copied from interface:IGerritHudsonTriggerConfigCreates a URL to the provided changeset number.- Specified by:
getGerritFrontEndUrlForin interfaceIGerritHudsonTriggerConfig- Parameters:
changeSetNumber- the changeset numberrevision- the patch set number (currently not used)- Returns:
- a URL based on
IGerritHudsonTriggerConfig.getGerritFrontEndUrl()+ / + number - See Also:
-
getGerritFrontEndUrlFor
public String getGerritFrontEndUrlFor(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event) Description copied from interface:IGerritHudsonTriggerConfigCreates a URL to the provided changeset number.- Specified by:
getGerritFrontEndUrlForin interfaceIGerritHudsonTriggerConfig- Parameters:
event- the gerrit triggered event- Returns:
- a URL based on frontUrl + / + number
- See Also:
-
getCategories
Description copied from interface:IGerritHudsonTriggerConfigGet the list of available VerdictCategories.- Specified by:
getCategoriesin interfaceIGerritHudsonTriggerConfig- Returns:
- the list.
-
setCategories
Setter for the list of VerdictCategories, used to make testing easier.- Specified by:
setCategoriesin interfaceIGerritHudsonTriggerConfig- Parameters:
categories- the list.
-
isEnableManualTrigger
public boolean isEnableManualTrigger()Getter for the enableManualTrigger value.- Specified by:
isEnableManualTriggerin interfaceIGerritHudsonTriggerConfig- 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:
-
getGerritAuthentication
public com.sonymobile.tools.gerrit.gerritevents.ssh.Authentication getGerritAuthentication()- Specified by:
getGerritAuthenticationin interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
hasDefaultValues
public boolean hasDefaultValues()Description copied from interface:IGerritHudsonTriggerConfigIf the plugin still has default values for hostname and frontendurl.- Specified by:
hasDefaultValuesin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so.
-
isEnablePluginMessages
public boolean isEnablePluginMessages()Description copied from interface:IGerritHudsonTriggerConfigIf other plugins are allowed to contribute messages to be forwarded to Gerrit.- Specified by:
isEnablePluginMessagesin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so
-
isTriggerOnAllComments
public boolean isTriggerOnAllComments()Description copied from interface:IGerritHudsonTriggerConfigIf comments added by the default user should trigger events. Enabling this could be risky as infinite loops might be created.- Specified by:
isTriggerOnAllCommentsin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so
-
setTriggerOnAllComments
public void setTriggerOnAllComments(boolean triggerOnAllComments) Sets triggerOnAllComments.- Parameters:
triggerOnAllComments- true if so- See Also:
-
getReplicationConfig
Description copied from interface:IGerritHudsonTriggerConfigThe configurations related to event replication.- Specified by:
getReplicationConfigin interfaceIGerritHudsonTriggerConfig- Returns:
- the replication config.
-
setReplicationConfig
Set replication config.- Parameters:
replicationConfig- The config
-
getWatchdogTimeoutSeconds
public int getWatchdogTimeoutSeconds()- Specified by:
getWatchdogTimeoutSecondsin interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2
-
getWatchdogTimeoutMinutes
public int getWatchdogTimeoutMinutes()Convenience getter for the jelly view.- Specified by:
getWatchdogTimeoutMinutesin interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2- Returns:
- the watchdogTimeoutMinutes.
-
setWatchdogTimeoutMinutes
public void setWatchdogTimeoutMinutes(int watchdogTimeoutMinutes) Set watchdog timeout.- Parameters:
watchdogTimeoutMinutes- Number of minutes.
-
getExceptionData
public com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData getExceptionData()- Specified by:
getExceptionDatain interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2
-
setExceptionData
public void setExceptionData(com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData exceptionData) Set exception data.- Parameters:
exceptionData- The data.
-
isUseRestApi
public boolean isUseRestApi()Description copied from interface:IGerritHudsonTriggerConfigIf the HTTP REST API should be used for change approval instead of the sh API.- Specified by:
isUseRestApiin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so.
-
setUseRestApi
public void setUseRestApi(boolean useRestApi) Sets useRestApi.- Parameters:
useRestApi- true if so- See Also:
-
getGerritHttpSecretPassword
Description copied from interface:IGerritHudsonTriggerConfigThe instance ofSecretwhich has a password for the HTTP REST API, or null if there is none.- Specified by:
getGerritHttpSecretPasswordin interfaceIGerritHudsonTriggerConfig- Returns:
- the instance of
Secret.
-
getGerritHttpPassword
Description copied from interface:IGerritHudsonTriggerConfigThe password for the HTTP REST API.- Specified by:
getGerritHttpPasswordin interfaceIGerritHudsonTriggerConfig- Returns:
- the password
-
setGerritHttpPassword
Sets gerritHttpPassword.- Parameters:
gerritHttpPassword- the password- See Also:
-
getGerritHttpUserName
Description copied from interface:IGerritHudsonTriggerConfigThe user name for the HTTP REST API.- Specified by:
getGerritHttpUserNamein interfaceIGerritHudsonTriggerConfig- Returns:
- username
-
setGerritHttpUserName
Sets gerritHttpUserName.- Parameters:
gerritHttpUserName- the username- See Also:
-
getHttpCredentials
public org.apache.http.auth.Credentials getHttpCredentials()- Specified by:
getHttpCredentialsin interfacecom.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig
-
isRestCodeReview
public boolean isRestCodeReview()Description copied from interface:IGerritHudsonTriggerConfigIf Code-Review label should be provided to REST API for ReviewInput.- Specified by:
isRestCodeReviewin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so.
-
setRestCodeReview
public void setRestCodeReview(boolean restCodeReview) Sets restCodeReview.- Parameters:
restCodeReview- true if include Code-Review label to REST API for ReviewInput.
-
isRestVerified
public boolean isRestVerified()Description copied from interface:IGerritHudsonTriggerConfigIf Verified label should be provided to REST API for ReviewInput.- Specified by:
isRestVerifiedin interfaceIGerritHudsonTriggerConfig- Returns:
- true if so.
-
setRestVerified
public void setRestVerified(boolean restVerified) Sets restVerified.- Parameters:
restVerified- true if include Verified label to REST API for ReviewInput.
-