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 Details

    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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_VALUE
      Default 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_VALUE
      Default 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_VALUE
      Default 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_VALUE
      Default 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_VALUE
      Default 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_COMPLETION
      Default 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_INTERVAL
      Default value for the dynamic config refresh interval.
      See Also:
    • 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:
    • 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:
    • 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:
    • DEFAULT_ENABLE_MANUAL_TRIGGER

      public static final boolean DEFAULT_ENABLE_MANUAL_TRIGGER
      Default manual trigger enabled.
      See Also:
    • DEFAULT_ENABLE_PLUGIN_MESSAGES

      public static final boolean DEFAULT_ENABLE_PLUGIN_MESSAGES
      Default plug-in messages enabled.
      See Also:
    • DEFAULT_ENABLE_TOPIC_ASSOCIATION

      public static final boolean DEFAULT_ENABLE_TOPIC_ASSOCIATION
      Default topic association enabled.
      See Also:
    • 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:
    • DEFAULT_BUILD_CURRENT_PATCHES_ONLY

      public static final boolean DEFAULT_BUILD_CURRENT_PATCHES_ONLY
      See Also:
    • DEFAULT_NOTIFICATION_LEVEL

      public static final com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify DEFAULT_NOTIFICATION_LEVEL
      Global default for notification level.
  • Constructor Details

    • 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 data
      req - a path.
  • Method Details

    • setValues

      public void setValues(net.sf.json.JSONObject formData)
      Description copied from interface: IGerritHudsonTriggerConfig
      Sets all config values from the provided JSONObject.
      Specified by:
      setValues in interface IGerritHudsonTriggerConfig
      Parameters:
      formData - the JSON object with form data.
    • getGerritAuthKeyFile

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

      public void setGerritAuthKeyFile(File gerritAuthKeyFile)
      GerritAuthKeyFile.
      Parameters:
      gerritAuthKeyFile - the file
      See Also:
    • getGerritAuthKeyFilePassword

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

      public void setGerritAuthKeyFilePassword(String gerritAuthKeyFilePassword)
      GerritAuthKeyFilePassword.
      Parameters:
      gerritAuthKeyFilePassword - the password
      See Also:
    • getGerritAuthKeyFileSecretPassword

      public Secret getGerritAuthKeyFileSecretPassword()
      Description copied from interface: IGerritHudsonTriggerConfig
      The instance of Secret which has a password for the private key, or null if there is none.
      Specified by:
      getGerritAuthKeyFileSecretPassword in interface IGerritHudsonTriggerConfig
      Returns:
      the instance of Secret.
    • getGerritFrontEndUrl

      public String getGerritFrontEndUrl()
      Description copied from interface: IGerritHudsonTriggerConfig
      Base URL for the Gerrit UI.
      Specified by:
      getGerritFrontEndUrl in interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig
      Specified by:
      getGerritFrontEndUrl in interface IGerritHudsonTriggerConfig
      Specified by:
      getGerritFrontEndUrl in interface com.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig
      Returns:
      the gerrit front end URL. Always ends with '/'
    • setGerritFrontEndURL

      public void setGerritFrontEndURL(String gerritFrontEndURL)
      GerritFrontEndURL.
      Parameters:
      gerritFrontEndURL - the URL
      See Also:
    • 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 interface com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
    • setGerritHostName

      public void setGerritHostName(String gerritHostName)
      GerritHostName.
      Parameters:
      gerritHostName - the hostname
      See Also:
    • getGerritSshPort

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

      public void setGerritSshPort(int gerritSshPort)
      GerritSshPort.
      Parameters:
      gerritSshPort - the port
      See Also:
    • getGerritProxy

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

      public void setGerritProxy(String gerritProxy)
      GerritProxy.
      Parameters:
      gerritProxy - the proxy url
      See Also:
    • getBuildScheduleDelay

      public int getBuildScheduleDelay()
      Description copied from interface: IGerritHudsonTriggerConfig
      Returns the BuildScheduleDelay.
      Specified by:
      getBuildScheduleDelay in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • setBuildScheduleDelay

      public void setBuildScheduleDelay(int buildScheduleDelay)
      Setting buildScheduleDelay.
      Parameters:
      buildScheduleDelay - the delay time
      See Also:
    • getDynamicConfigRefreshInterval

      public int getDynamicConfigRefreshInterval()
      Description copied from interface: IGerritHudsonTriggerConfig
      Returns the dynamicConfigRefreshInterval.
      Specified by:
      getDynamicConfigRefreshInterval in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getProjectListFetchDelay

      public int getProjectListFetchDelay()
      Description copied from interface: IGerritHudsonTriggerConfig
      Returns the projectListFetchDelay.
      Specified by:
      getProjectListFetchDelay in interface IGerritHudsonTriggerConfig
      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: IGerritHudsonTriggerConfig
      Returns the projectListFetchDelay.
      Specified by:
      getProjectListRefreshInterval in interface IGerritHudsonTriggerConfig
      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: IGerritHudsonTriggerConfig
      If this Gerrit server should be used to fetch project names for auto completion.
      Specified by:
      isEnableProjectAutoCompletion in interface IGerritHudsonTriggerConfig
      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

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

      public void setGerritUserName(String gerritUserName)
      GerritUserName.
      Parameters:
      gerritUserName - the username
      See Also:
    • getGerritEMail

      public String getGerritEMail()
      Specified by:
      getGerritEMail in interface com.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 interface IGerritHudsonTriggerConfig
      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:
    • 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 interface IGerritHudsonTriggerConfig
      Returns:
      the number of worker threads.
    • getNumberOfSendingWorkerThreads

      @Deprecated public int getNumberOfSendingWorkerThreads()
      Deprecated.
      Description copied from interface: IGerritHudsonTriggerConfig
      The default nr of worker threads that sends approvals/review commands.
      Specified by:
      getNumberOfSendingWorkerThreads in interface IGerritHudsonTriggerConfig
      Returns:
      the number of worker threads.
    • setNumberOfReceivingWorkerThreads

      @Deprecated public void setNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads)
      Deprecated.
      NumberOfWorkerThreads.
      Parameters:
      numberOfReceivingWorkerThreads - nr of threads.
      See Also:
    • setNumberOfSendingWorkerThreads

      @Deprecated public void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
      Deprecated.
      Description copied from interface: IGerritHudsonTriggerConfig
      NumberOfSendingWorkerThreads. TODO: Should be removed in future.
      Specified by:
      setNumberOfSendingWorkerThreads in interface IGerritHudsonTriggerConfig
      Parameters:
      numberOfSendingWorkerThreads - nr of threads.
    • isGerritBuildCurrentPatchesOnly

      public boolean isGerritBuildCurrentPatchesOnly()
      Description copied from interface: IGerritHudsonTriggerConfig
      If enabled, then old patch revision builds will be canceled.
      Specified by:
      isGerritBuildCurrentPatchesOnly in interface IGerritHudsonTriggerConfig
      Returns:
      true if so.
    • 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 interface IGerritHudsonTriggerConfig
      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 interface IGerritHudsonTriggerConfig
      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 interface IGerritHudsonTriggerConfig
      Returns:
      the command template.
    • setGerritVerifiedCmdBuildSuccessful

      @Deprecated public void setGerritVerifiedCmdBuildSuccessful(String cmd)
      Deprecated.
      Set Gerrit Verified Cmd Build Successful.
      Parameters:
      cmd - the command
      See Also:
    • setGerritCmdBuildSuccessful

      public void setGerritCmdBuildSuccessful(String cmd)
      Set Gerrit Verified Cmd Build Successful.
      Parameters:
      cmd - the Gerrit command for successful verification
      See Also:
    • getGerritCmdBuildUnstable

      public String getGerritCmdBuildUnstable()
      Description copied from interface: IGerritHudsonTriggerConfig
      The command template to use when sending build-unstable messages to Gerrit.
      Specified by:
      getGerritCmdBuildUnstable in interface IGerritHudsonTriggerConfig
      Returns:
      the command template.
    • setGerritVerifiedCmdBuildUnstable

      @Deprecated public void setGerritVerifiedCmdBuildUnstable(String cmd)
      Deprecated.
      Set Gerrit Verified Cmd Build Unstable.
      Parameters:
      cmd - the command
      See Also:
    • setGerritCmdBuildUnstable

      public void setGerritCmdBuildUnstable(String cmd)
      Set Gerrit Verified Cmd Build Unstable.
      Parameters:
      cmd - the command
      See Also:
    • getGerritCmdBuildFailed

      public String getGerritCmdBuildFailed()
      Description copied from interface: IGerritHudsonTriggerConfig
      The command template to use when sending build-failed messages to Gerrit.
      Specified by:
      getGerritCmdBuildFailed in interface IGerritHudsonTriggerConfig
      Returns:
      the command template.
    • setGerritVerifiedCmdBuildFailed

      @Deprecated public void setGerritVerifiedCmdBuildFailed(String cmd)
      Deprecated.
      Set Gerrit Verified Cmd Build Failed.
      Parameters:
      cmd - the command
      See Also:
    • setGerritCmdBuildFailed

      public void setGerritCmdBuildFailed(String cmd)
      Set Gerrit Verified Cmd Build Failed.
      Parameters:
      cmd - the command
      See Also:
    • getGerritCmdBuildStarted

      public String getGerritCmdBuildStarted()
      Description copied from interface: IGerritHudsonTriggerConfig
      The command template to use when sending build-started messages to Gerrit.
      Specified by:
      getGerritCmdBuildStarted in interface IGerritHudsonTriggerConfig
      Returns:
      the command template.
    • setGerritVerifiedCmdBuildStarted

      @Deprecated public void setGerritVerifiedCmdBuildStarted(String cmd)
      Deprecated.
      Set Gerrit Verified Cmd Build Started.
      Parameters:
      cmd - the command
      See Also:
    • setGerritCmdBuildStarted

      public void setGerritCmdBuildStarted(String cmd)
      Set Gerrit Verified Cmd Build Started.
      Parameters:
      cmd - the command
      See Also:
    • getGerritCmdBuildNotBuilt

      public String getGerritCmdBuildNotBuilt()
      Description copied from interface: IGerritHudsonTriggerConfig
      The command template to use when sending build-not-built messages to Gerrit.
      Specified by:
      getGerritCmdBuildNotBuilt in interface IGerritHudsonTriggerConfig
      Returns:
      the command template.
    • setGerritVerifiedCmdBuildNotBuilt

      @Deprecated public void setGerritVerifiedCmdBuildNotBuilt(String cmd)
      Deprecated.
      Set Gerrit Verified Cmd Build NotBuilt.
      Parameters:
      cmd - the command
      See Also:
    • setGerritCmdBuildNotBuilt

      public void setGerritCmdBuildNotBuilt(String cmd)
      Set Gerrit Verified Cmd Build NotBuilt.
      Parameters:
      cmd - the command
      See Also:
    • 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 interface IGerritHudsonTriggerConfig
      Returns:
      the command template.
    • setGerritVerifiedCmdBuildAborted

      @Deprecated public void setGerritVerifiedCmdBuildAborted(String cmd)
      Deprecated.
      Set Gerrit Verified Cmd Build Aborted.
      Parameters:
      cmd - the command
      See Also:
    • setGerritCmdBuildAborted

      public void setGerritCmdBuildAborted(String cmd)
      Set Gerrit Verified Cmd Build Aborted.
      Parameters:
      cmd - the command
      See Also:
    • getGerritBuildStartedVerifiedValue

      public Integer getGerritBuildStartedVerifiedValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default verified value for build started.
      Specified by:
      getGerritBuildStartedVerifiedValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildStartedCodeReviewValue

      public Integer getGerritBuildStartedCodeReviewValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default code review value for build started.
      Specified by:
      getGerritBuildStartedCodeReviewValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildSuccessfulVerifiedValue

      public Integer getGerritBuildSuccessfulVerifiedValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default verified value for build successful.
      Specified by:
      getGerritBuildSuccessfulVerifiedValue in interface IGerritHudsonTriggerConfig
      Returns:
      the falue.
    • getGerritBuildSuccessfulCodeReviewValue

      public Integer getGerritBuildSuccessfulCodeReviewValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default code review value for build successful.
      Specified by:
      getGerritBuildSuccessfulCodeReviewValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildFailedVerifiedValue

      public Integer getGerritBuildFailedVerifiedValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default verified value for build failed.
      Specified by:
      getGerritBuildFailedVerifiedValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildFailedCodeReviewValue

      public Integer getGerritBuildFailedCodeReviewValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default code review value for build failed.
      Specified by:
      getGerritBuildFailedCodeReviewValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildUnstableVerifiedValue

      public Integer getGerritBuildUnstableVerifiedValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default verified value for build unstable.
      Specified by:
      getGerritBuildUnstableVerifiedValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildUnstableCodeReviewValue

      public Integer getGerritBuildUnstableCodeReviewValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default code review value for build unstable.
      Specified by:
      getGerritBuildUnstableCodeReviewValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildNotBuiltVerifiedValue

      public Integer getGerritBuildNotBuiltVerifiedValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default verified value for build not built.
      Specified by:
      getGerritBuildNotBuiltVerifiedValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildNotBuiltCodeReviewValue

      public Integer getGerritBuildNotBuiltCodeReviewValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default code review value for build not built.
      Specified by:
      getGerritBuildNotBuiltCodeReviewValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildAbortedVerifiedValue

      public Integer getGerritBuildAbortedVerifiedValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default verified value for build aborted.
      Specified by:
      getGerritBuildAbortedVerifiedValue in interface IGerritHudsonTriggerConfig
      Returns:
      the value.
    • getGerritBuildAbortedCodeReviewValue

      public Integer getGerritBuildAbortedCodeReviewValue()
      Description copied from interface: IGerritHudsonTriggerConfig
      The default code review value for build aborted.
      Specified by:
      getGerritBuildAbortedCodeReviewValue in interface IGerritHudsonTriggerConfig
      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 interface IGerritHudsonTriggerConfig
      Parameters:
      changeSetNumber - the changeset number
      revision - the patch set number (currently not used)
      Returns:
      a URL based on IGerritHudsonTriggerConfig.getGerritFrontEndUrl() + / + number
      See Also:
    • getGerritFrontEndUrlFor

      public String getGerritFrontEndUrlFor(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
      Description copied from interface: IGerritHudsonTriggerConfig
      Creates a URL to the provided changeset number.
      Specified by:
      getGerritFrontEndUrlFor in interface IGerritHudsonTriggerConfig
      Parameters:
      event - the gerrit triggered event
      Returns:
      a URL based on frontUrl + / + number
      See Also:
    • getCategories

      public List<VerdictCategory> getCategories()
      Description copied from interface: IGerritHudsonTriggerConfig
      Get the list of available VerdictCategories.
      Specified by:
      getCategories in interface IGerritHudsonTriggerConfig
      Returns:
      the list.
    • setCategories

      public void setCategories(List<VerdictCategory> categories)
      Setter for the list of VerdictCategories, used to make testing easier.
      Specified by:
      setCategories in interface IGerritHudsonTriggerConfig
      Parameters:
      categories - the list.
    • isEnableManualTrigger

      public boolean isEnableManualTrigger()
      Getter for the enableManualTrigger value.
      Specified by:
      isEnableManualTrigger in interface IGerritHudsonTriggerConfig
      Returns:
      true if manual triggering is enabled.
    • setEnableManualTrigger

      public void setEnableManualTrigger(boolean enableManualTrigger)
      Sets if the manual trigger should be enabled or not.
      Parameters:
      enableManualTrigger - true if it should be enabled/shown.
      See Also:
    • getGerritAuthentication

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

      public boolean hasDefaultValues()
      Description copied from interface: IGerritHudsonTriggerConfig
      If the plugin still has default values for hostname and frontendurl.
      Specified by:
      hasDefaultValues in interface IGerritHudsonTriggerConfig
      Returns:
      true if so.
    • isEnablePluginMessages

      public boolean isEnablePluginMessages()
      Description copied from interface: IGerritHudsonTriggerConfig
      If other plugins are allowed to contribute messages to be forwarded to Gerrit.
      Specified by:
      isEnablePluginMessages in interface IGerritHudsonTriggerConfig
      Returns:
      true if so
    • 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 interface IGerritHudsonTriggerConfig
      Returns:
      true if so
    • setTriggerOnAllComments

      public void setTriggerOnAllComments(boolean triggerOnAllComments)
      Sets triggerOnAllComments.
      Parameters:
      triggerOnAllComments - true if so
      See Also:
    • getReplicationConfig

      public ReplicationConfig getReplicationConfig()
      Description copied from interface: IGerritHudsonTriggerConfig
      The configurations related to event replication.
      Specified by:
      getReplicationConfig in interface IGerritHudsonTriggerConfig
      Returns:
      the replication config.
    • setReplicationConfig

      public void setReplicationConfig(ReplicationConfig replicationConfig)
      Set replication config.
      Parameters:
      replicationConfig - The config
    • getWatchdogTimeoutSeconds

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

      public int getWatchdogTimeoutMinutes()
      Convenience getter for the jelly view.
      Specified by:
      getWatchdogTimeoutMinutes in interface com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2
      Returns:
      the watchdogTimeoutMinutes.
    • 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 interface com.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 interface IGerritHudsonTriggerConfig
      Returns:
      true if so.
    • setUseRestApi

      public void setUseRestApi(boolean useRestApi)
      Sets useRestApi.
      Parameters:
      useRestApi - true if so
      See Also:
    • getGerritHttpSecretPassword

      public Secret getGerritHttpSecretPassword()
      Description copied from interface: IGerritHudsonTriggerConfig
      The instance of Secret which has a password for the HTTP REST API, or null if there is none.
      Specified by:
      getGerritHttpSecretPassword in interface IGerritHudsonTriggerConfig
      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 interface IGerritHudsonTriggerConfig
      Returns:
      the password
    • setGerritHttpPassword

      public void setGerritHttpPassword(String gerritHttpPassword)
      Sets gerritHttpPassword.
      Parameters:
      gerritHttpPassword - the password
      See Also:
    • getGerritHttpUserName

      public String getGerritHttpUserName()
      Description copied from interface: IGerritHudsonTriggerConfig
      The user name for the HTTP REST API.
      Specified by:
      getGerritHttpUserName in interface IGerritHudsonTriggerConfig
      Returns:
      username
    • setGerritHttpUserName

      public void setGerritHttpUserName(String gerritHttpUserName)
      Sets gerritHttpUserName.
      Parameters:
      gerritHttpUserName - the username
      See Also:
    • getHttpCredentials

      public org.apache.http.auth.Credentials getHttpCredentials()
      Specified by:
      getHttpCredentials in interface com.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 interface IGerritHudsonTriggerConfig
      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 interface IGerritHudsonTriggerConfig
      Returns:
      true if so.
    • setRestVerified

      public void setRestVerified(boolean restVerified)
      Sets restVerified.
      Parameters:
      restVerified - true if include Verified label to REST API for ReviewInput.