Interface IGerritHudsonTriggerConfig

All Superinterfaces:
com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig, com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2, com.sonymobile.tools.gerrit.gerritevents.rest.RestConnectionConfig, com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionConfig
All Known Implementing Classes:
Config

public interface IGerritHudsonTriggerConfig extends com.sonymobile.tools.gerrit.gerritevents.GerritConnectionConfig2
Interface for the Global configuration.
Author:
Robert Sandell <robert.sandell@sonyericsson.com>
  • Method Details

    • isGerritBuildCurrentPatchesOnly

      boolean isGerritBuildCurrentPatchesOnly()
      If enabled, then old patch revision builds will be canceled.
      Returns:
      true if so.
    • isVoteSameTopic

      boolean isVoteSameTopic()
      If enabled, build notifications and votes will be sent to patchsets with the same topic.
      Returns:
      true if so.
    • getBuildCurrentPatchesOnly

      BuildCancellationPolicy getBuildCurrentPatchesOnly()
      The object containing information regarding if old builds should be cancelled when new builds are triggered.
      Returns:
      the BuildCancellationPolicy
    • getGerritFrontEndUrl

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

      String getGerritCmdBuildStarted()
      The command template to use when sending build-started messages to Gerrit.
      Returns:
      the command template.
    • getGerritCmdBuildSuccessful

      String getGerritCmdBuildSuccessful()
      The command template to use when sending build-successful messages to Gerrit.
      Returns:
      the command template.
    • getGerritCmdBuildFailed

      String getGerritCmdBuildFailed()
      The command template to use when sending build-failed messages to Gerrit.
      Returns:
      the command template.
    • getGerritCmdBuildUnstable

      String getGerritCmdBuildUnstable()
      The command template to use when sending build-unstable messages to Gerrit.
      Returns:
      the command template.
    • getGerritCmdBuildNotBuilt

      String getGerritCmdBuildNotBuilt()
      The command template to use when sending build-not-built messages to Gerrit.
      Returns:
      the command template.
    • getGerritCmdBuildAborted

      String getGerritCmdBuildAborted()
      The command template to use when sending build-aborted messages to Gerrit.
      Returns:
      the command template.
    • getGerritBuildStartedVerifiedValue

      Integer getGerritBuildStartedVerifiedValue()
      The default verified value for build started.
      Returns:
      the value.
    • getGerritBuildStartedCodeReviewValue

      Integer getGerritBuildStartedCodeReviewValue()
      The default code review value for build started.
      Returns:
      the value.
    • getGerritBuildSuccessfulVerifiedValue

      Integer getGerritBuildSuccessfulVerifiedValue()
      The default verified value for build successful.
      Returns:
      the falue.
    • getGerritBuildSuccessfulCodeReviewValue

      Integer getGerritBuildSuccessfulCodeReviewValue()
      The default code review value for build successful.
      Returns:
      the value.
    • getGerritBuildFailedVerifiedValue

      Integer getGerritBuildFailedVerifiedValue()
      The default verified value for build failed.
      Returns:
      the value.
    • getGerritBuildFailedCodeReviewValue

      Integer getGerritBuildFailedCodeReviewValue()
      The default code review value for build failed.
      Returns:
      the value.
    • getGerritBuildUnstableVerifiedValue

      Integer getGerritBuildUnstableVerifiedValue()
      The default verified value for build unstable.
      Returns:
      the value.
    • getGerritBuildUnstableCodeReviewValue

      Integer getGerritBuildUnstableCodeReviewValue()
      The default code review value for build unstable.
      Returns:
      the value.
    • getGerritBuildNotBuiltVerifiedValue

      Integer getGerritBuildNotBuiltVerifiedValue()
      The default verified value for build not built.
      Returns:
      the value.
    • getGerritBuildNotBuiltCodeReviewValue

      Integer getGerritBuildNotBuiltCodeReviewValue()
      The default code review value for build not built.
      Returns:
      the value.
    • getGerritBuildAbortedVerifiedValue

      Integer getGerritBuildAbortedVerifiedValue()
      The default verified value for build aborted.
      Returns:
      the value.
    • getGerritBuildAbortedCodeReviewValue

      Integer getGerritBuildAbortedCodeReviewValue()
      The default code review value for build aborted.
      Returns:
      the value.
    • setValues

      void setValues(net.sf.json.JSONObject form)
      Sets all config values from the provided JSONObject.
      Parameters:
      form - the JSON object with form data.
    • getGerritFrontEndUrlFor

      String getGerritFrontEndUrlFor(String number, String revision)
      Creates a URL to the provided changeset number.
      Parameters:
      number - the changeset number
      revision - the patch set number (currently not used)
      Returns:
      a URL based on getGerritFrontEndUrl() + / + number
      See Also:
    • getGerritFrontEndUrlFor

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

      List<VerdictCategory> getCategories()
      Get the list of available VerdictCategories.
      Returns:
      the list.
    • setCategories

      void setCategories(List<VerdictCategory> categories)
      Set the list of available VerdictCategories.
      Parameters:
      categories - the list.
    • isEnableManualTrigger

      boolean isEnableManualTrigger()
      If the manual trigger is enabled (shown to users) or not.
      Returns:
      true if so.
    • getBuildScheduleDelay

      int getBuildScheduleDelay()
      Returns the BuildScheduleDelay.
      Returns:
      the value.
    • getDynamicConfigRefreshInterval

      int getDynamicConfigRefreshInterval()
      Returns the dynamicConfigRefreshInterval.
      Returns:
      the value.
    • getProjectListFetchDelay

      int getProjectListFetchDelay()
      Returns the projectListFetchDelay.
      Returns:
      the value.
    • getProjectListRefreshInterval

      int getProjectListRefreshInterval()
      Returns the projectListFetchDelay.
      Returns:
      the value.
    • isEnableProjectAutoCompletion

      boolean isEnableProjectAutoCompletion()
      If this Gerrit server should be used to fetch project names for auto completion.
      Returns:
      true if so.
    • hasDefaultValues

      boolean hasDefaultValues()
      If the plugin still has default values for hostname and frontendurl.
      Returns:
      true if so.
    • isEnablePluginMessages

      boolean isEnablePluginMessages()
      If other plugins are allowed to contribute messages to be forwarded to Gerrit.
      Returns:
      true if so
    • isTriggerOnAllComments

      boolean isTriggerOnAllComments()
      If comments added by the default user should trigger events. Enabling this could be risky as infinite loops might be created.
      Returns:
      true if so
    • isUseRestApi

      boolean isUseRestApi()
      If the HTTP REST API should be used for change approval instead of the sh API.
      Returns:
      true if so.
    • getGerritHttpSecretPassword

      Secret getGerritHttpSecretPassword()
      The instance of Secret which has a password for the HTTP REST API, or null if there is none.
      Returns:
      the instance of Secret.
    • getGerritHttpPassword

      String getGerritHttpPassword()
      The password for the HTTP REST API.
      Returns:
      the password
    • isRestCodeReview

      boolean isRestCodeReview()
      If Code-Review label should be provided to REST API for ReviewInput.
      Returns:
      true if so.
    • isRestVerified

      boolean isRestVerified()
      If Verified label should be provided to REST API for ReviewInput.
      Returns:
      true if so.
    • getGerritHttpUserName

      String getGerritHttpUserName()
      The user name for the HTTP REST API.
      Returns:
      username
    • getReplicationConfig

      ReplicationConfig getReplicationConfig()
      The configurations related to event replication.
      Returns:
      the replication config.
    • setNumberOfSendingWorkerThreads

      void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
      NumberOfSendingWorkerThreads. TODO: Should be removed in future.
      Parameters:
      numberOfSendingWorkerThreads - nr of threads.
    • getNumberOfReceivingWorkerThreads

      @Deprecated int getNumberOfReceivingWorkerThreads()
      Deprecated.
      The number of threads to handle incoming events with.
      Returns:
      the number of worker threads.
    • getNumberOfSendingWorkerThreads

      @Deprecated int getNumberOfSendingWorkerThreads()
      Deprecated.
      The default nr of worker threads that sends approvals/review commands.
      Returns:
      the number of worker threads.
    • getNotificationLevel

      com.sonymobile.tools.gerrit.gerritevents.dto.rest.Notify getNotificationLevel()
      Returns whom to notify.
      Returns:
      the notification level value
    • getGerritAuthKeyFileSecretPassword

      Secret getGerritAuthKeyFileSecretPassword()
      The instance of Secret which has a password for the private key, or null if there is none.
      Returns:
      the instance of Secret.