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
public class Config extends Object implements IGerritHudsonTriggerConfig
Configuration bean for the global configuration.- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_BUILD_CURRENT_PATCHES_ONLY
Default value forisGerritBuildCurrentPatchesOnly()
.static int
DEFAULT_DYNAMIC_CONFIG_REFRESH_INTERVAL
Default value for the dynamic config refresh interval.static boolean
DEFAULT_ENABLE_MANUAL_TRIGGER
Default manual trigger enabled.static boolean
DEFAULT_ENABLE_PLUGIN_MESSAGES
Default plug-in messages enabled.static boolean
DEFAULT_ENABLE_PROJECT_AUTO_COMPLETION
Default value indicating if the Gerrit server should be used to fetch project names.static boolean
DEFAULT_ENABLE_TOPIC_ASSOCIATION
Default topic association enabled.static int
DEFAULT_GERRIT_BUILD_ABORTED_CODE_REVIEW_VALUE
Default code review vote to Gerrit when a build is aborted.static int
DEFAULT_GERRIT_BUILD_ABORTED_VERIFIED_VALUE
Default verified vote to Gerrit when a build is aborted.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.static com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify
DEFAULT_NOTIFICATION_LEVEL
Global default for notification level.static int
DEFAULT_PROJECT_LIST_FETCH_DELAY
Default value showing how many seconds between startup and initial project list fetch.static int
DEFAULT_PROJECT_LIST_REFRESH_INTERVAL
Default value showing how many seconds between project list fetches.static boolean
DEFAULT_TRIGGER_ON_ALL_COMMENTS
Default value for the option to allow triggering on messages for any user.
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BuildCancellationPolicy
getBuildCurrentPatchesOnly()
The object containing information regarding if old builds should be cancelled when new builds are triggered.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()
Secret
getGerritAuthKeyFileSecretPassword()
The instance ofSecret
which has a password for the private key, or null if there is none.Integer
getGerritBuildAbortedCodeReviewValue()
The default code review value for build aborted.Integer
getGerritBuildAbortedVerifiedValue()
The default verified value for build aborted.Integer
getGerritBuildFailedCodeReviewValue()
The default code review value for build failed.Integer
getGerritBuildFailedVerifiedValue()
The default verified value for build failed.Integer
getGerritBuildNotBuiltCodeReviewValue()
The default code review value for build not built.Integer
getGerritBuildNotBuiltVerifiedValue()
The default verified value for build not built.Integer
getGerritBuildStartedCodeReviewValue()
The default code review value for build started.Integer
getGerritBuildStartedVerifiedValue()
The default verified value for build started.Integer
getGerritBuildSuccessfulCodeReviewValue()
The default code review value for build successful.Integer
getGerritBuildSuccessfulVerifiedValue()
The default verified value for build successful.Integer
getGerritBuildUnstableCodeReviewValue()
The default code review value for build unstable.Integer
getGerritBuildUnstableVerifiedValue()
The default verified value for build unstable.String
getGerritCmdBuildAborted()
The command template to use when sending build-aborted messages to Gerrit.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.Secret
getGerritHttpSecretPassword()
The instance ofSecret
which has a password for the HTTP REST API, or null if there is none.String
getGerritHttpUserName()
The user name for the HTTP REST API.String
getGerritProxy()
int
getGerritSshPort()
String
getGerritUserName()
org.apache.http.auth.Credentials
getHttpCredentials()
com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify
getNotificationLevel()
Returns whom to notify.int
getNumberOfReceivingWorkerThreads()
Deprecated.int
getNumberOfSendingWorkerThreads()
Deprecated.int
getProjectListFetchDelay()
Returns the projectListFetchDelay.int
getProjectListRefreshInterval()
Returns the projectListFetchDelay.ReplicationConfig
getReplicationConfig()
The configurations related to event replication.String
getVoteSameTopicDescription()
Returns the description message for the jelly entry.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
isEnableProjectAutoCompletion()
If this Gerrit server should be used to fetch project names for auto completion.boolean
isGerritBuildCurrentPatchesOnly()
If enabled, then old patch revision builds will be canceled.boolean
isRestCodeReview()
If Code-Review label should be provided to REST API for ReviewInput.boolean
isRestVerified()
If Verified label should be provided to REST API for ReviewInput.boolean
isTriggerOnAllComments()
If comments added by the default user should trigger events.boolean
isUseRestApi()
If the HTTP REST API should be used for change approval instead of the sh API.boolean
isVoteSameTopic()
If enabled, build notifications and votes will be sent to patchsets with the same topic.void
setBuildCurrentPatchesOnly(BuildCancellationPolicy buildCurrentPatchesOnly)
Set build cancellation policy for current patches.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
setEnableProjectAutoCompletion(boolean enableProjectAutoCompletion)
If the project list should be fetched from the gerrit server or not.void
setExceptionData(com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData exceptionData)
Set exception data.void
setGerritAuthKeyFile(File gerritAuthKeyFile)
GerritAuthKeyFile.void
setGerritAuthKeyFilePassword(String gerritAuthKeyFilePassword)
GerritAuthKeyFilePassword.void
setGerritBuildAbortedCodeReviewValue(Integer gerritBuildAbortedCodeReviewValue)
Set Gerrit Build Aborted Code Review Value.void
setGerritBuildAbortedVerifiedValue(Integer gerritBuildAbortedVerifiedValue)
Set Gerrit Build Aborted Verified Value.void
setGerritBuildFailedCodeReviewValue(Integer gerritBuildFailedCodeReviewValue)
Set Gerrit Build Failed Code Review Value.void
setGerritBuildFailedVerifiedValue(Integer gerritBuildFailedVerifiedValue)
Set Gerrit Build Failed Verified Value.void
setGerritBuildNotBuiltCodeReviewValue(Integer gerritBuildNotBuiltCodeReviewValue)
Set Gerrit Build Not Build Code Review Value.void
setGerritBuildNotBuiltVerifiedValue(Integer gerritBuildNotBuiltVerifiedValue)
Set Gerrit Build Not Build Verified Value.void
setGerritBuildStartedCodeReviewValue(Integer gerritBuildStartedCodeReviewValue)
Set Gerrit Build Started Code Review Value.void
setGerritBuildStartedVerifiedValue(Integer gerritBuildStartedVerifiedValue)
Set Gerrit Build Started Verified Value.void
setGerritBuildSuccessfulCodeReviewValue(Integer gerritBuildSuccessfulCodeReviewValue)
Set Gerrit Build Successful Code Review Value.void
setGerritBuildSuccessfulVerifiedValue(Integer gerritBuildSuccessfulVerifiedValue)
Set Gerrit Build Sucessful Verified Value.void
setGerritBuildUnstableCodeReviewValue(Integer gerritBuildUnstableCodeReviewValue)
Set Gerrit Build Unstable Code Review Value.void
setGerritBuildUnstableVerifiedValue(Integer gerritBuildUnstableVerifiedValue)
Set Gerrit Build Unstable Verified Value.void
setGerritCmdBuildAborted(String cmd)
Set Gerrit Verified Cmd Build Aborted.void
setGerritCmdBuildFailed(String cmd)
Set Gerrit Verified Cmd Build Failed.void
setGerritCmdBuildNotBuilt(String cmd)
Set Gerrit Verified Cmd Build NotBuilt.void
setGerritCmdBuildStarted(String cmd)
Set Gerrit Verified Cmd Build Started.void
setGerritCmdBuildSuccessful(String cmd)
Set Gerrit Verified Cmd Build Successful.void
setGerritCmdBuildUnstable(String cmd)
Set Gerrit Verified Cmd Build Unstable.void
setGerritEMail(String gerritEMail)
The e-mail address for the user in gerrit.void
setGerritFrontEndUrl(String gerritFrontEndURL)
This method is needed for configuration as code to discover this property.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
setGerritVerifiedCmdBuildAborted(String cmd)
Deprecated.void
setGerritVerifiedCmdBuildFailed(String cmd)
Deprecated.void
setGerritVerifiedCmdBuildNotBuilt(String cmd)
Deprecated.void
setGerritVerifiedCmdBuildStarted(String cmd)
Deprecated.void
setGerritVerifiedCmdBuildSuccessful(String cmd)
Deprecated.void
setGerritVerifiedCmdBuildUnstable(String cmd)
Deprecated.void
setNotificationLevel(com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify notificationLevel)
Sets the value for whom to notify.void
setNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads)
Deprecated.void
setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
Deprecated.void
setProjectListFetchDelay(int projectListFetchDelay)
Sets the delay from Jenkins startup before the project list should be fetched.void
setProjectListRefreshInterval(int projectListRefreshInterval)
The interval between recurrent fetches of the project list.void
setReplicationConfig(ReplicationConfig replicationConfig)
Set replication config.void
setRestCodeReview(boolean restCodeReview)
Sets restCodeReview.void
setRestVerified(boolean restVerified)
Sets restVerified.void
setTriggerOnAllComments(boolean triggerOnAllComments)
Sets triggerOnAllComments.void
setUseRestApi(boolean useRestApi)
Sets useRestApi.void
setValues(net.sf.json.JSONObject formData)
Sets all config values from the provided JSONObject.void
setVoteSameTopic(boolean voteSameTopic)
Standard setter for the voteSameTopic value.void
setWatchdogTimeoutMinutes(int watchdogTimeoutMinutes)
Set watchdog timeout.
-
-
-
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_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_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_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_ABORTED_VERIFIED_VALUE
public static final int DEFAULT_GERRIT_BUILD_ABORTED_VERIFIED_VALUE
Default verified vote to Gerrit when a build is aborted.- 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_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_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_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_BUILD_ABORTED_CODE_REVIEW_VALUE
public static final int DEFAULT_GERRIT_BUILD_ABORTED_CODE_REVIEW_VALUE
Default code review vote to Gerrit when a build is aborted.- See Also:
- Constant Field Values
-
DEFAULT_ENABLE_PROJECT_AUTO_COMPLETION
public static final boolean DEFAULT_ENABLE_PROJECT_AUTO_COMPLETION
Default value indicating if the Gerrit server should be used to fetch project names.- See Also:
- Constant Field Values
-
DEFAULT_DYNAMIC_CONFIG_REFRESH_INTERVAL
public static final int DEFAULT_DYNAMIC_CONFIG_REFRESH_INTERVAL
Default value for the dynamic config refresh interval.- See Also:
- Constant Field Values
-
DEFAULT_PROJECT_LIST_FETCH_DELAY
public static final int DEFAULT_PROJECT_LIST_FETCH_DELAY
Default value showing how many seconds between startup and initial project list fetch.- See Also:
- Constant Field Values
-
DEFAULT_PROJECT_LIST_REFRESH_INTERVAL
public static final int DEFAULT_PROJECT_LIST_REFRESH_INTERVAL
Default value showing how many seconds between project list fetches.Only used for Gerrit servers with version < 2.12
- 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_ENABLE_TOPIC_ASSOCIATION
public static final boolean DEFAULT_ENABLE_TOPIC_ASSOCIATION
Default topic association enabled.- See Also:
- Constant Field Values
-
DEFAULT_TRIGGER_ON_ALL_COMMENTS
public static final boolean DEFAULT_TRIGGER_ON_ALL_COMMENTS
Default value for the option to allow triggering on messages for any user.- See Also:
- Constant Field Values
-
DEFAULT_BUILD_CURRENT_PATCHES_ONLY
public static final boolean DEFAULT_BUILD_CURRENT_PATCHES_ONLY
Default value forisGerritBuildCurrentPatchesOnly()
.- See Also:
- Constant Field Values
-
DEFAULT_NOTIFICATION_LEVEL
public static final com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify DEFAULT_NOTIFICATION_LEVEL
Global default for notification level.
-
-
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
@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 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 interfaceIGerritHudsonTriggerConfig
- Parameters:
formData
- the JSON object with form data.
-
getGerritAuthKeyFile
public File getGerritAuthKeyFile()
- Specified by:
getGerritAuthKeyFile
in interfacecom.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 interfacecom.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
-
setGerritAuthKeyFilePassword
public void setGerritAuthKeyFilePassword(String gerritAuthKeyFilePassword)
GerritAuthKeyFilePassword.- Parameters:
gerritAuthKeyFilePassword
- the password- See Also:
getGerritAuthKeyFilePassword()
-
getGerritAuthKeyFileSecretPassword
public Secret getGerritAuthKeyFileSecretPassword()
Description copied from interface:IGerritHudsonTriggerConfig
The instance ofSecret
which has a password for the private key, or null if there is none.- Specified by:
getGerritAuthKeyFileSecretPassword
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the instance of
Secret
.
-
getGerritFrontEndUrl
public String getGerritFrontEndUrl()
Description copied from interface:IGerritHudsonTriggerConfig
Base URL for the Gerrit UI.- Specified by:
getGerritFrontEndUrl
in interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig
- Specified by:
getGerritFrontEndUrl
in interfaceIGerritHudsonTriggerConfig
- Specified by:
getGerritFrontEndUrl
in interfacecom.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()
-
setGerritFrontEndUrl
public void setGerritFrontEndUrl(String gerritFrontEndURL)
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
public String getGerritHostName()
- Specified by:
getGerritHostName
in interfacecom.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 interfacecom.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 interfacecom.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig
- Specified by:
getGerritProxy
in interfacecom.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 interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getProjectListFetchDelay
public int getProjectListFetchDelay()
Description copied from interface:IGerritHudsonTriggerConfig
Returns the projectListFetchDelay.- Specified by:
getProjectListFetchDelay
in 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:
getProjectListFetchDelay()
,isEnableProjectAutoCompletion()
-
getProjectListRefreshInterval
public int getProjectListRefreshInterval()
Description copied from interface:IGerritHudsonTriggerConfig
Returns the projectListFetchDelay.- Specified by:
getProjectListRefreshInterval
in 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:
getProjectListRefreshInterval()
,isEnableProjectAutoCompletion()
-
isEnableProjectAutoCompletion
public boolean isEnableProjectAutoCompletion()
Description copied from interface:IGerritHudsonTriggerConfig
If this Gerrit server should be used to fetch project names for auto completion.- Specified by:
isEnableProjectAutoCompletion
in 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:
isEnableProjectAutoCompletion()
,getProjectListRefreshInterval()
,getProjectListFetchDelay()
-
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 interfacecom.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 interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig
-
getNotificationLevel
public com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify getNotificationLevel()
Description copied from interface:IGerritHudsonTriggerConfig
Returns whom to notify.- Specified by:
getNotificationLevel
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the notification level value
-
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()
-
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 public int getNumberOfReceivingWorkerThreads()
Deprecated.Description copied from interface:IGerritHudsonTriggerConfig
The number of threads to handle incoming events with.- Specified by:
getNumberOfReceivingWorkerThreads
in interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- Returns:
- true if so.
-
getBuildCurrentPatchesOnly
public BuildCancellationPolicy getBuildCurrentPatchesOnly()
Description copied from interface:IGerritHudsonTriggerConfig
The object containing information regarding if old builds should be cancelled when new builds are triggered.- Specified by:
getBuildCurrentPatchesOnly
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the BuildCancellationPolicy
-
setBuildCurrentPatchesOnly
public void setBuildCurrentPatchesOnly(BuildCancellationPolicy buildCurrentPatchesOnly)
Set build cancellation policy for current patches. Exposed for configuration as code.- Parameters:
buildCurrentPatchesOnly
- new policy.
-
isVoteSameTopic
public boolean isVoteSameTopic()
Description copied from interface:IGerritHudsonTriggerConfig
If enabled, build notifications and votes will be sent to patchsets with the same topic.- Specified by:
isVoteSameTopic
in 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
public String getVoteSameTopicDescription()
Returns the description message for the jelly entry.- Returns:
- descriptionMsg for jelly.
-
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 interfaceIGerritHudsonTriggerConfig
- Returns:
- the command template.
-
setGerritVerifiedCmdBuildSuccessful
@Deprecated public void setGerritVerifiedCmdBuildSuccessful(String cmd)
Deprecated.Set Gerrit Verified Cmd Build Successful.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildSuccessful()
-
setGerritCmdBuildSuccessful
public void setGerritCmdBuildSuccessful(String cmd)
Set Gerrit Verified Cmd Build Successful.- Parameters:
cmd
- the Gerrit command for successful verification- 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 interfaceIGerritHudsonTriggerConfig
- Returns:
- the command template.
-
setGerritVerifiedCmdBuildUnstable
@Deprecated public void setGerritVerifiedCmdBuildUnstable(String cmd)
Deprecated.Set Gerrit Verified Cmd Build Unstable.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildUnstable()
-
setGerritCmdBuildUnstable
public void setGerritCmdBuildUnstable(String cmd)
Set Gerrit Verified Cmd Build Unstable.- 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 interfaceIGerritHudsonTriggerConfig
- Returns:
- the command template.
-
setGerritVerifiedCmdBuildFailed
@Deprecated public void setGerritVerifiedCmdBuildFailed(String cmd)
Deprecated.Set Gerrit Verified Cmd Build Failed.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildFailed()
-
setGerritCmdBuildFailed
public void setGerritCmdBuildFailed(String cmd)
Set Gerrit Verified Cmd Build Failed.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildFailed()
-
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 interfaceIGerritHudsonTriggerConfig
- Returns:
- the command template.
-
setGerritVerifiedCmdBuildStarted
@Deprecated public void setGerritVerifiedCmdBuildStarted(String cmd)
Deprecated.Set Gerrit Verified Cmd Build Started.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildStarted()
-
setGerritCmdBuildStarted
public void setGerritCmdBuildStarted(String cmd)
Set Gerrit Verified Cmd Build Started.- 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 interfaceIGerritHudsonTriggerConfig
- Returns:
- the command template.
-
setGerritVerifiedCmdBuildNotBuilt
@Deprecated public void setGerritVerifiedCmdBuildNotBuilt(String cmd)
Deprecated.Set Gerrit Verified Cmd Build NotBuilt.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildNotBuilt()
-
setGerritCmdBuildNotBuilt
public void setGerritCmdBuildNotBuilt(String cmd)
Set Gerrit Verified Cmd Build NotBuilt.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildNotBuilt()
-
getGerritCmdBuildAborted
public String getGerritCmdBuildAborted()
Description copied from interface:IGerritHudsonTriggerConfig
The command template to use when sending build-aborted messages to Gerrit.- Specified by:
getGerritCmdBuildAborted
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the command template.
-
setGerritVerifiedCmdBuildAborted
@Deprecated public void setGerritVerifiedCmdBuildAborted(String cmd)
Deprecated.Set Gerrit Verified Cmd Build Aborted.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildAborted()
-
setGerritCmdBuildAborted
public void setGerritCmdBuildAborted(String cmd)
Set Gerrit Verified Cmd Build Aborted.- Parameters:
cmd
- the command- See Also:
getGerritCmdBuildAborted()
-
getGerritBuildStartedVerifiedValue
public Integer getGerritBuildStartedVerifiedValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default verified value for build started.- Specified by:
getGerritBuildStartedVerifiedValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildStartedCodeReviewValue
public Integer getGerritBuildStartedCodeReviewValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default code review value for build started.- Specified by:
getGerritBuildStartedCodeReviewValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildSuccessfulVerifiedValue
public Integer getGerritBuildSuccessfulVerifiedValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default verified value for build successful.- Specified by:
getGerritBuildSuccessfulVerifiedValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the falue.
-
getGerritBuildSuccessfulCodeReviewValue
public Integer getGerritBuildSuccessfulCodeReviewValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default code review value for build successful.- Specified by:
getGerritBuildSuccessfulCodeReviewValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildFailedVerifiedValue
public Integer getGerritBuildFailedVerifiedValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default verified value for build failed.- Specified by:
getGerritBuildFailedVerifiedValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildFailedCodeReviewValue
public Integer getGerritBuildFailedCodeReviewValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default code review value for build failed.- Specified by:
getGerritBuildFailedCodeReviewValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildUnstableVerifiedValue
public Integer getGerritBuildUnstableVerifiedValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default verified value for build unstable.- Specified by:
getGerritBuildUnstableVerifiedValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildUnstableCodeReviewValue
public Integer getGerritBuildUnstableCodeReviewValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default code review value for build unstable.- Specified by:
getGerritBuildUnstableCodeReviewValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildNotBuiltVerifiedValue
public Integer getGerritBuildNotBuiltVerifiedValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default verified value for build not built.- Specified by:
getGerritBuildNotBuiltVerifiedValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildNotBuiltCodeReviewValue
public Integer getGerritBuildNotBuiltCodeReviewValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default code review value for build not built.- Specified by:
getGerritBuildNotBuiltCodeReviewValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildAbortedVerifiedValue
public Integer getGerritBuildAbortedVerifiedValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default verified value for build aborted.- Specified by:
getGerritBuildAbortedVerifiedValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
getGerritBuildAbortedCodeReviewValue
public Integer getGerritBuildAbortedCodeReviewValue()
Description copied from interface:IGerritHudsonTriggerConfig
The default code review value for build aborted.- Specified by:
getGerritBuildAbortedCodeReviewValue
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the value.
-
setGerritBuildStartedVerifiedValue
public void setGerritBuildStartedVerifiedValue(Integer gerritBuildStartedVerifiedValue)
Set Gerrit Build Started Verified Value.- Parameters:
gerritBuildStartedVerifiedValue
- value
-
setGerritBuildSuccessfulVerifiedValue
public void setGerritBuildSuccessfulVerifiedValue(Integer gerritBuildSuccessfulVerifiedValue)
Set Gerrit Build Sucessful Verified Value.- Parameters:
gerritBuildSuccessfulVerifiedValue
- value
-
setGerritBuildFailedVerifiedValue
public void setGerritBuildFailedVerifiedValue(Integer gerritBuildFailedVerifiedValue)
Set Gerrit Build Failed Verified Value.- Parameters:
gerritBuildFailedVerifiedValue
- value
-
setGerritBuildUnstableVerifiedValue
public void setGerritBuildUnstableVerifiedValue(Integer gerritBuildUnstableVerifiedValue)
Set Gerrit Build Unstable Verified Value.- Parameters:
gerritBuildUnstableVerifiedValue
- value
-
setGerritBuildNotBuiltVerifiedValue
public void setGerritBuildNotBuiltVerifiedValue(Integer gerritBuildNotBuiltVerifiedValue)
Set Gerrit Build Not Build Verified Value.- Parameters:
gerritBuildNotBuiltVerifiedValue
- value
-
setGerritBuildAbortedVerifiedValue
public void setGerritBuildAbortedVerifiedValue(Integer gerritBuildAbortedVerifiedValue)
Set Gerrit Build Aborted Verified Value.- Parameters:
gerritBuildAbortedVerifiedValue
- value
-
setGerritBuildStartedCodeReviewValue
public void setGerritBuildStartedCodeReviewValue(Integer gerritBuildStartedCodeReviewValue)
Set Gerrit Build Started Code Review Value.- Parameters:
gerritBuildStartedCodeReviewValue
- value
-
setGerritBuildSuccessfulCodeReviewValue
public void setGerritBuildSuccessfulCodeReviewValue(Integer gerritBuildSuccessfulCodeReviewValue)
Set Gerrit Build Successful Code Review Value.- Parameters:
gerritBuildSuccessfulCodeReviewValue
- value
-
setGerritBuildFailedCodeReviewValue
public void setGerritBuildFailedCodeReviewValue(Integer gerritBuildFailedCodeReviewValue)
Set Gerrit Build Failed Code Review Value.- Parameters:
gerritBuildFailedCodeReviewValue
- value
-
setGerritBuildUnstableCodeReviewValue
public void setGerritBuildUnstableCodeReviewValue(Integer gerritBuildUnstableCodeReviewValue)
Set Gerrit Build Unstable Code Review Value.- Parameters:
gerritBuildUnstableCodeReviewValue
- value
-
setGerritBuildNotBuiltCodeReviewValue
public void setGerritBuildNotBuiltCodeReviewValue(Integer gerritBuildNotBuiltCodeReviewValue)
Set Gerrit Build Not Build Code Review Value.- Parameters:
gerritBuildNotBuiltCodeReviewValue
- value
-
setGerritBuildAbortedCodeReviewValue
public void setGerritBuildAbortedCodeReviewValue(Integer gerritBuildAbortedCodeReviewValue)
Set Gerrit Build Aborted Code Review Value.- Parameters:
gerritBuildAbortedCodeReviewValue
- 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 interfaceIGerritHudsonTriggerConfig
- Parameters:
changeSetNumber
- the changeset numberrevision
- 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 interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- Parameters:
categories
- the list.
-
isEnableManualTrigger
public boolean isEnableManualTrigger()
Getter for the enableManualTrigger value.- Specified by:
isEnableManualTrigger
in 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:
isEnableManualTrigger()
-
getGerritAuthentication
public com.sonymobile.tools.gerrit.gerritevents.ssh.Authentication getGerritAuthentication()
- Specified by:
getGerritAuthentication
in interfacecom.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 interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- Returns:
- true if so
-
isTriggerOnAllComments
public boolean isTriggerOnAllComments()
Description copied from interface:IGerritHudsonTriggerConfig
If comments added by the default user should trigger events. Enabling this could be risky as infinite loops might be created.- Specified by:
isTriggerOnAllComments
in interfaceIGerritHudsonTriggerConfig
- Returns:
- true if so
-
setTriggerOnAllComments
public void setTriggerOnAllComments(boolean triggerOnAllComments)
Sets triggerOnAllComments.- Parameters:
triggerOnAllComments
- true if so- See Also:
isTriggerOnAllComments()
-
getReplicationConfig
public ReplicationConfig getReplicationConfig()
Description copied from interface:IGerritHudsonTriggerConfig
The configurations related to event replication.- Specified by:
getReplicationConfig
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the replication config.
-
setReplicationConfig
public void setReplicationConfig(ReplicationConfig replicationConfig)
Set replication config.- Parameters:
replicationConfig
- The config
-
getWatchdogTimeoutSeconds
public int getWatchdogTimeoutSeconds()
- Specified by:
getWatchdogTimeoutSeconds
in interfacecom.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2
-
getWatchdogTimeoutMinutes
public int getWatchdogTimeoutMinutes()
Convenience getter for the jelly view.- Specified by:
getWatchdogTimeoutMinutes
in 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:
getExceptionData
in 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:IGerritHudsonTriggerConfig
If the HTTP REST API should be used for change approval instead of the sh API.- Specified by:
isUseRestApi
in interfaceIGerritHudsonTriggerConfig
- Returns:
- true if so.
-
setUseRestApi
public void setUseRestApi(boolean useRestApi)
Sets useRestApi.- Parameters:
useRestApi
- true if so- See Also:
isUseRestApi()
-
getGerritHttpSecretPassword
public Secret getGerritHttpSecretPassword()
Description copied from interface:IGerritHudsonTriggerConfig
The instance ofSecret
which has a password for the HTTP REST API, or null if there is none.- Specified by:
getGerritHttpSecretPassword
in interfaceIGerritHudsonTriggerConfig
- Returns:
- the instance of
Secret
.
-
getGerritHttpPassword
public String getGerritHttpPassword()
Description copied from interface:IGerritHudsonTriggerConfig
The password for the HTTP REST API.- Specified by:
getGerritHttpPassword
in interfaceIGerritHudsonTriggerConfig
- 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 interfaceIGerritHudsonTriggerConfig
- 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 interfacecom.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig
-
isRestCodeReview
public boolean isRestCodeReview()
Description copied from interface:IGerritHudsonTriggerConfig
If Code-Review label should be provided to REST API for ReviewInput.- Specified by:
isRestCodeReview
in 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:IGerritHudsonTriggerConfig
If Verified label should be provided to REST API for ReviewInput.- Specified by:
isRestVerified
in 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.
-
-