Class EiffelBroadcasterConfig

java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
com.axis.jenkins.plugins.eiffel.eiffelbroadcaster.EiffelBroadcasterConfig
All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, OnMaster

@Extension @Symbol("eiffel-broadcaster") public final class EiffelBroadcasterConfig extends GlobalConfiguration
Adds the EiffelBroadcaster plugin configuration to the system config page.
Author:
Isac Holm <isac.holm@axis.com>
  • Constructor Details

    • EiffelBroadcasterConfig

      public EiffelBroadcasterConfig()
  • Method Details

    • configure

      public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
      Overrides:
      configure in class GlobalConfiguration
      Throws:
      Descriptor.FormException
    • readResolve

      protected Object readResolve()
      Migrates legacy model fields to the current model. Called by the XStream unmarshaler.
    • getConfigFile

      protected XmlFile getConfigFile()
      For backwards-compatibility with the previous Plugin-derived version.
      Overrides:
      getConfigFile in class Descriptor<GlobalConfiguration>
      Returns:
      XmlFile representing the configuration file.
    • getEnableBroadcaster

      public boolean getEnableBroadcaster()
      Gets whether this plugin is enabled or not.
      Returns:
      true if this plugin is enabled.
    • setEnableBroadcaster

      @DataBoundSetter public void setEnableBroadcaster(boolean enableBroadcaster)
      Sets flag whether this plugin is enabled or not.
      Parameters:
      enableBroadcaster - true if this plugin is enabled.
    • getServerUri

      public String getServerUri()
      Gets URI for MQ server.
      Returns:
      the URI.
    • setServerUri

      @DataBoundSetter public void setServerUri(String serverUri)
      Sets URI for MQ server.
      Parameters:
      serverUri - the URI.
    • getUserName

      public String getUserName()
      Gets user name.
      Returns:
      the user name.
    • setUserName

      @DataBoundSetter public void setUserName(String userName)
      Sets user name.
      Parameters:
      userName - the user name.
    • getUserPassword

      public Secret getUserPassword()
      Gets user password.
      Returns:
      the user password.
    • setUserPassword

      @DataBoundSetter public void setUserPassword(Secret userPassword)
      Sets user password.
      Parameters:
      userPassword - the user password.
    • getInstance

      public static EiffelBroadcasterConfig getInstance()
      Gets this extension's instance.
    • getExchangeName

      public String getExchangeName()
      Gets the exchange name.
      Returns:
      the exchange name.
    • setExchangeName

      @DataBoundSetter public void setExchangeName(String exchangeName)
      Sets the exchange name.
      Parameters:
      exchangeName - the exchange name.
    • getVirtualHost

      public String getVirtualHost()
      Gets the virtual host name.
      Returns:
      the virtual host name.
    • setVirtualHost

      @DataBoundSetter public void setVirtualHost(String virtualHost)
      Sets the virtual host name.
      Parameters:
      virtualHost - the exchange name.
    • getRoutingKey

      public String getRoutingKey()
      Gets the routing key.
      Returns:
      the routing key.
    • setRoutingKey

      @DataBoundSetter public void setRoutingKey(String routingKey)
      Sets the routing key. This method exists for backwards compatibility reasons. Any non-null value will be passed to setRoutingKeyProvider(RoutingKeyProvider) and this setter's underlying attribute will be set to null.
      Parameters:
      routingKey - the routing key.
    • getRoutingKeyProvider

      @NonNull public RoutingKeyProvider getRoutingKeyProvider()
      Returns the currently configured RoutingKeyProvider implementation.
    • setRoutingKeyProvider

      @DataBoundSetter public void setRoutingKeyProvider(@NonNull RoutingKeyProvider routingKeyProvider)
      Sets which RoutingKeyProvider implementation to use to generate routing keys for the events.
    • getPersistentDelivery

      public boolean getPersistentDelivery()
      Returns true if persistentDelivery is to be used.
      Returns:
      if persistentDelivery is to be used.
    • setPersistentDelivery

      @DataBoundSetter public void setPersistentDelivery(boolean pd)
      Sets persistent delivery mode.
      Parameters:
      pd - if persistentDelivery is to be used.
    • getAppId

      public String getAppId()
      Returns application id.
      Returns:
      application id.
    • setAppId

      @DataBoundSetter public void setAppId(String appId)
      Sets application id.
      Parameters:
      appId - Application id to use
    • getActivityCategories

      public String getActivityCategories()
      Returns the list of categories to attach to the activities, expressed as a multi-line string.
    • getActivityCategoriesList

      public List<String> getActivityCategoriesList()
      Returns the list of categories to attach to the activities.
    • setActivityCategories

      @DataBoundSetter public void setActivityCategories(String activityCategories)
      Sets the list of categories to attach to the activities.
    • getHostnameSource

      public HostnameSource getHostnameSource()
      Returns the hostname source.
    • setHostnameSource

      @DataBoundSetter public void setHostnameSource(HostnameSource hostnameSource)
      Sets the hostname source.
    • isSystemSigningEnabled

      public boolean isSystemSigningEnabled()
    • setSystemSigningEnabled

      @DataBoundSetter public void setSystemSigningEnabled(boolean systemSigningEnabled)
    • getSystemSigningCredentialsId

      public String getSystemSigningCredentialsId()
    • setSystemSigningCredentialsId

      @DataBoundSetter public void setSystemSigningCredentialsId(String systemSigningCredentialsId)
    • getSystemSigningHashAlg

      public HashAlgorithm getSystemSigningHashAlg()
    • setSystemSigningHashAlg

      @DataBoundSetter public void setSystemSigningHashAlg(HashAlgorithm systemSigningHashAlg)
    • getEventValidator

      @NonNull public EventValidator getEventValidator()
    • getRoutingKeyProviderDescriptors

      public ExtensionList<RoutingKeyProvider.RoutingKeyProviderDescriptor> getRoutingKeyProviderDescriptors()
    • getDisplayName

      public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<GlobalConfiguration>
    • doFillSystemSigningCredentialsIdItems

      public ListBoxModel doFillSystemSigningCredentialsIdItems(@AncestorInPath Item item, @QueryParameter String credentialsId)
    • doTestConnection

      public FormValidation doTestConnection(@QueryParameter("serverUri") String uri, @QueryParameter("userName") String name, @QueryParameter("userPassword") Secret pw) throws javax.servlet.ServletException
      Tests connection to the server URI.
      Parameters:
      uri - the URI.
      name - the user name.
      pw - the user password.
      Returns:
      FormValidation object that indicates ok or error.
      Throws:
      javax.servlet.ServletException - Exception for servlet.
    • getHelpFile

      public String getHelpFile(String fieldName)
      Returns a custom help file location for fields where the Stapler doesn't locate it automatically.
      Overrides:
      getHelpFile in class Descriptor<GlobalConfiguration>