Class JabberPublisherDescriptor

  • All Implemented Interfaces:
    hudson.model.Saveable, hudson.plugins.im.IMPublisherDescriptor, jenkins.util.io.OnMaster

    public class JabberPublisherDescriptor
    extends hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
    implements hudson.plugins.im.IMPublisherDescriptor
    • Field Detail

      • PARAMETERNAME_ENABLED

        public static final java.lang.String PARAMETERNAME_ENABLED
        See Also:
        Constant Field Values
      • PARAMETERNAME_PORT

        public static final java.lang.String PARAMETERNAME_PORT
        See Also:
        Constant Field Values
      • PARAMETERNAME_HOSTNAME

        public static final java.lang.String PARAMETERNAME_HOSTNAME
        See Also:
        Constant Field Values
      • PARAMETERNAME_USEPROXY

        public static final java.lang.String PARAMETERNAME_USEPROXY
        See Also:
        Constant Field Values
      • PARAMETERNAME_PROXYTYPE

        public static final java.lang.String PARAMETERNAME_PROXYTYPE
        See Also:
        Constant Field Values
      • PARAMETERNAME_PROXYHOST

        public static final java.lang.String PARAMETERNAME_PROXYHOST
        See Also:
        Constant Field Values
      • PARAMETERNAME_PROXYPORT

        public static final java.lang.String PARAMETERNAME_PROXYPORT
        See Also:
        Constant Field Values
      • PARAMETERNAME_PROXYUSER

        public static final java.lang.String PARAMETERNAME_PROXYUSER
        See Also:
        Constant Field Values
      • PARAMETERNAME_PROXYPASS

        public static final java.lang.String PARAMETERNAME_PROXYPASS
        See Also:
        Constant Field Values
      • PARAMETERNAME_SSL

        public static final java.lang.String PARAMETERNAME_SSL
        See Also:
        Constant Field Values
      • PARAMETERNAME_PRESENCE

        public static final java.lang.String PARAMETERNAME_PRESENCE
        See Also:
        Constant Field Values
      • PARAMETERNAME_PASSWORD

        public static final java.lang.String PARAMETERNAME_PASSWORD
        See Also:
        Constant Field Values
      • PARAMETERNAME_JABBERID

        public static final java.lang.String PARAMETERNAME_JABBERID
        See Also:
        Constant Field Values
      • PARAMETERNAME_NICKNAME

        public static final java.lang.String PARAMETERNAME_NICKNAME
        See Also:
        Constant Field Values
      • PARAMETERNAME_TARGETS

        public static final java.lang.String PARAMETERNAME_TARGETS
        See Also:
        Constant Field Values
      • PARAMETERNAME_INITIAL_GROUPCHATS

        public static final java.lang.String PARAMETERNAME_INITIAL_GROUPCHATS
        See Also:
        Constant Field Values
      • PARAMETERNAME_COMMAND_PREFIX

        public static final java.lang.String PARAMETERNAME_COMMAND_PREFIX
        See Also:
        Constant Field Values
      • PARAMETERNAME_DEFAULT_ID_SUFFIX

        public static final java.lang.String PARAMETERNAME_DEFAULT_ID_SUFFIX
        See Also:
        Constant Field Values
      • PARAMETERNAME_SUBSCRIPTION_MODE

        public static final java.lang.String PARAMETERNAME_SUBSCRIPTION_MODE
        See Also:
        Constant Field Values
      • PARAMETERNAME_EMAIL_ADDRESS_AS_JABBERID

        public static final java.lang.String PARAMETERNAME_EMAIL_ADDRESS_AS_JABBERID
        See Also:
        Constant Field Values
      • PARAMETERNAME_ACCEPT_ALL_CERTS

        public static final java.lang.String PARAMETERNAME_ACCEPT_ALL_CERTS
        See Also:
        Constant Field Values
      • PARAMETERVALUE_SUBSCRIPTION_MODE

        public static final java.lang.String[] PARAMETERVALUE_SUBSCRIPTION_MODE
      • PARAMETERVALUE_PROXYTYPES

        public static final java.lang.String[] PARAMETERVALUE_PROXYTYPES
      • PARAMETERVALUE_STRATEGY_VALUES

        public static final java.lang.String[] PARAMETERVALUE_STRATEGY_VALUES
      • PARAMETERVALUE_STRATEGY_DEFAULT

        public static final java.lang.String PARAMETERVALUE_STRATEGY_DEFAULT
      • DEFAULT_COMMAND_PREFIX

        public static final java.lang.String DEFAULT_COMMAND_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • JabberPublisherDescriptor

        public JabberPublisherDescriptor()
    • Method Detail

      • load

        public void load()
        Overrides:
        load in class hudson.model.Descriptor<hudson.tasks.Publisher>
      • getDisplayName

        public java.lang.String getDisplayName()
        This human readable name is used in the configuration screen.
        Overrides:
        getDisplayName in class hudson.model.Descriptor<hudson.tasks.Publisher>
      • getPluginDescription

        public java.lang.String getPluginDescription()
        Specified by:
        getPluginDescription in interface hudson.plugins.im.IMPublisherDescriptor
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface hudson.plugins.im.IMPublisherDescriptor
      • getHostname

        public java.lang.String getHostname()
        Returns the overridden hostname in case e.g. DNS lookup by service name doesn't work.
        Specified by:
        getHostname in interface hudson.plugins.im.IMPublisherDescriptor
      • getHost

        public java.lang.String getHost()
        Returns the real host to use. I.e. when hostname is set returns hostname. Otherwise returns getServiceName()
        Specified by:
        getHost in interface hudson.plugins.im.IMPublisherDescriptor
      • getJabberId

        public java.lang.String getJabberId()
        Returns the jabber ID. The jabber ID may have the syntax user@domain[/resource]
      • getPassword

        public java.lang.String getPassword()
        Specified by:
        getPassword in interface hudson.plugins.im.IMPublisherDescriptor
      • getSecretPassword

        public hudson.util.Secret getSecretPassword()
        Specified by:
        getSecretPassword in interface hudson.plugins.im.IMPublisherDescriptor
      • getNickname

        public java.lang.String getNickname()
      • getPort

        public int getPort()
        Specified by:
        getPort in interface hudson.plugins.im.IMPublisherDescriptor
      • getPortString

        public java.lang.String getPortString()
        Returns the text to be put into the form field. If the port is default, leave it empty.
      • isExposePresence

        public boolean isExposePresence()
        Specified by:
        isExposePresence in interface hudson.plugins.im.IMPublisherDescriptor
      • getSubscriptionMode

        public java.lang.String getSubscriptionMode()
      • isEmailAddressAsJabberId

        public boolean isEmailAddressAsJabberId()
      • getDefaultIdSuffix

        public java.lang.String getDefaultIdSuffix()
        Specified by:
        getDefaultIdSuffix in interface hudson.plugins.im.IMPublisherDescriptor
      • getCommandPrefix

        public java.lang.String getCommandPrefix()
        Specified by:
        getCommandPrefix in interface hudson.plugins.im.IMPublisherDescriptor
      • getProxyHost

        public java.lang.String getProxyHost()
      • getProxyUser

        public java.lang.String getProxyUser()
      • getProxyPass

        public hudson.util.Secret getProxyPass()
      • getProxyType

        public org.jivesoftware.smack.proxy.ProxyInfo.ProxyType getProxyType()
      • getProxyPort

        public int getProxyPort()
      • getProxyPortString

        public java.lang.String getProxyPortString()
        Returns the text to be put into the form field.
      • getProxyTypeString

        public java.lang.String getProxyTypeString()
        Returns the text to be put into the form field.
      • isAcceptAllCerts

        public boolean isAcceptAllCerts()
      • newInstance

        public JabberPublisher newInstance​(org.kohsuke.stapler.StaplerRequest req,
                                           net.sf.json.JSONObject formData)
                                    throws hudson.model.Descriptor.FormException
        Creates a new instance of JabberPublisher from a submitted form.
        Overrides:
        newInstance in class hudson.model.Descriptor<hudson.tasks.Publisher>
        Throws:
        hudson.model.Descriptor.FormException
      • configure

        public boolean configure​(org.kohsuke.stapler.StaplerRequest req,
                                 net.sf.json.JSONObject json)
                          throws hudson.model.Descriptor.FormException
        Overrides:
        configure in class hudson.model.Descriptor<hudson.tasks.Publisher>
        Throws:
        hudson.model.Descriptor.FormException
      • doJabberIdCheck

        public hudson.util.FormValidation doJabberIdCheck​(@QueryParameter
                                                          java.lang.String jabberId,
                                                          @QueryParameter
                                                          java.lang.String hostname,
                                                          @QueryParameter
                                                          java.lang.String port,
                                                          @QueryParameter
                                                          java.lang.String proxyType)
      • doProxyCheck

        public hudson.util.FormValidation doProxyCheck​(@QueryParameter
                                                       java.lang.String proxyType,
                                                       @QueryParameter
                                                       java.lang.String proxyHost,
                                                       @QueryParameter
                                                       java.lang.String proxyPort)
      • doServerCheck

        public hudson.util.FormValidation doServerCheck​(@QueryParameter
                                                        java.lang.String hostname,
                                                        @QueryParameter
                                                        java.lang.String port,
                                                        @QueryParameter
                                                        java.lang.String proxyType)
        Validates the connection information.
      • isApplicable

        public boolean isApplicable​(java.lang.Class<? extends hudson.model.AbstractProject> jobType)
        Specified by:
        isApplicable in class hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
      • getUserName

        public java.lang.String getUserName()
        Returns the 'user' part of the Jabber ID. E.g. returns 'john.doe' for 'john.doe@gmail.com' or 'alfred.e.neumann' for 'alfred.e.neumann'.
        Specified by:
        getUserName in interface hudson.plugins.im.IMPublisherDescriptor
      • getHudsonUserName

        public java.lang.String getHudsonUserName()
        Specified by:
        getHudsonUserName in interface hudson.plugins.im.IMPublisherDescriptor
      • getIMMessageTargetConverter

        public hudson.plugins.im.IMMessageTargetConverter getIMMessageTargetConverter()
        Specified by:
        getIMMessageTargetConverter in interface hudson.plugins.im.IMPublisherDescriptor
      • getDefaultTargets

        public java.util.List<hudson.plugins.im.IMMessageTarget> getDefaultTargets()
        Specified by:
        getDefaultTargets in interface hudson.plugins.im.IMPublisherDescriptor
      • getParamNames

        public hudson.plugins.im.config.ParameterNames getParamNames()
        Specified by:
        getParamNames in interface hudson.plugins.im.IMPublisherDescriptor