Class MQNotifierConfig

    • Field Detail

      • MANUAL_ROUTING_PROVIDER

        public static final String MANUAL_ROUTING_PROVIDER
        String representing the manual routing provider.
        See Also:
        Constant Field Values
      • AUTO_ROUTING_PROVIDER

        public static final String AUTO_ROUTING_PROVIDER
        String representing the automatic routing provider.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MQNotifierConfig

        @DataBoundConstructor
        public MQNotifierConfig​(boolean enableNotifier,
                                String serverUri,
                                String userName,
                                Secret userPassword,
                                String exchangeName,
                                String virtualHost,
                                String routingKeyProvider,
                                String routingKey,
                                boolean persistentDelivery,
                                String appId,
                                Boolean enableVerboseLoggingBoolean)
        Creates an instance with specified parameters.
        Parameters:
        enableNotifier - if this plugin is enabled
        serverUri - the server uri
        userName - the user name
        userPassword - the user password
        exchangeName - the name of the exchange
        virtualHost - the name of the virtual host
        routingKey - the routing key
        persistentDelivery - if using persistent delivery mode
        appId - the application id
        enableVerboseLoggingBoolean - if verbose logging is enabled
      • MQNotifierConfig

        public MQNotifierConfig()
        Load configuration on invoke.
    • Method Detail

      • readResolve

        protected Object readResolve()
        Translates old configs to new. If the routing key has been set, turn on manual routing keys. If it hasn't, default to automatically setting routing keys.
      • getEnableNotifier

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

        public void setEnableNotifier​(boolean enableNotifier)
        Sets flag whether this plugin is enabled or not.
        Parameters:
        enableNotifier - true if this plugin is enabled.
      • getEnableVerboseLoggingBoolean

        public Boolean getEnableVerboseLoggingBoolean()
        Gets whether verbose logging is enabled or not.
        Returns:
        true if verbose logging is enabled.
      • setEnableVerboseLoggingBoolean

        public void setEnableVerboseLoggingBoolean​(Boolean enableVerboseLoggingBoolean)
        Sets flag whether verbose logging is enabled or not.
        Parameters:
        enableVerboseLoggingBoolean - true if verbose logging is enabled.
      • getServerUri

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

        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

        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

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

        public static MQNotifierConfig getInstance()
        Gets this extension's instance.

        If Jenkins.getInstance() isn't available or the plugin class isn't registered null will be returned.

        Returns:
        the instance of this extension.
      • getExchangeName

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

        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

        public void setVirtualHost​(String virtualHost)
        Sets the virtual host name.
        Parameters:
        virtualHost - the exchange name.
      • setRoutingKeyProvider

        public void setRoutingKeyProvider​(String routingKeyProvider)
        Sets the routing key provider ("AUTO" or "MANUAL").
        Parameters:
        routingKeyProvider - the routing key provider.
      • getRoutingKeyProvider

        public String getRoutingKeyProvider()
        Gets the routing key provider, either "AUTO" or "MANUAL".
        Returns:
        the routing key provider.
      • getRoutingKey

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

        public void setRoutingKey​(String routingKey)
        Sets the routing key.
        Parameters:
        routingKey - the routing key.
      • getPersistentDelivery

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

        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

        public void setAppId​(String appId)
        Sets application id.
        Parameters:
        appId - Application id to use
      • 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.