hudson.plugins.jabber.im.transport
Class JabberPublisherDescriptor

java.lang.Object
  extended by hudson.model.Descriptor<T>
      extended by hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
          extended by hudson.plugins.jabber.im.transport.JabberPublisherDescriptor
All Implemented Interfaces:
hudson.model.Saveable, hudson.plugins.im.IMPublisherDescriptor

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


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType
 
Field Summary
static String DEFAULT_COMMAND_PREFIX
           
static String PARAMETERNAME_COMMAND_PREFIX
           
static String PARAMETERNAME_DEFAULT_ID_SUFFIX
           
static String PARAMETERNAME_EMAIL_ADDRESS_AS_JABBERID
           
static String PARAMETERNAME_ENABLED
           
static String PARAMETERNAME_GROUP_NICKNAME
           
static String PARAMETERNAME_HOSTNAME
           
static String PARAMETERNAME_INITIAL_GROUPCHATS
           
static String PARAMETERNAME_JABBERID
           
static String PARAMETERNAME_PASSWORD
           
static String PARAMETERNAME_PORT
           
static String PARAMETERNAME_PRESENCE
           
static String PARAMETERNAME_PROXYHOST
           
static String PARAMETERNAME_PROXYPASS
           
static String PARAMETERNAME_PROXYPORT
           
static String PARAMETERNAME_PROXYTYPE
           
static String PARAMETERNAME_PROXYUSER
           
static String PARAMETERNAME_SASL
           
static String PARAMETERNAME_SSL
           
static String PARAMETERNAME_SUBSCRIPTION_MODE
           
static String PARAMETERNAME_TARGETS
           
static String PARAMETERNAME_USEPROXY
           
static String[] PARAMETERVALUE_PROXYTYPES
           
static String PARAMETERVALUE_STRATEGY_DEFAULT
           
static String[] PARAMETERVALUE_STRATEGY_VALUES
           
static String[] PARAMETERVALUE_SUBSCRIPTION_MODE
           
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
JabberPublisherDescriptor()
           
 
Method Summary
 boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
          
 hudson.util.FormValidation doJabberIdCheck(String jabberId, String hostname, String port, String proxyType)
           
 hudson.util.FormValidation doProxyCheck(String proxyType, String proxyHost, String proxyPort)
           
 hudson.util.FormValidation doServerCheck(String hostname, String port, String proxyType)
          Validates the connection information.
 String getCommandPrefix()
           
 String getDefaultIdSuffix()
           
 List<hudson.plugins.im.IMMessageTarget> getDefaultTargets()
           
 String getDisplayName()
          This human readable name is used in the configuration screen.
 String getGroupChatNickname()
           
 String getHost()
          Returns the real host to use.
 String getHostname()
          Returns the overridden hostname in case e.g.
 String getHudsonUserName()
           
 hudson.plugins.im.IMMessageTargetConverter getIMMessageTargetConverter()
           
 String getJabberId()
          Returns the jabber ID.
 hudson.plugins.im.config.ParameterNames getParamNames()
           
 String getPassword()
           
 String getPluginDescription()
           
 int getPort()
           
 String getPortString()
          Returns the text to be put into the form field.
 String getProxyHost()
           
 String getProxyPass()
           
 int getProxyPort()
           
 String getProxyPortString()
          Returns the text to be put into the form field.
 org.jivesoftware.smack.proxy.ProxyInfo.ProxyType getProxyType()
           
 String getProxyTypeString()
          Returns the text to be put into the form field.
 String getProxyUser()
           
 String getSubscriptionMode()
           
 String getUserName()
          Returns the 'user' part of the Jabber ID.
 boolean isApplicable(Class<? extends hudson.model.AbstractProject> jobType)
          
 boolean isEmailAddressAsJabberId()
           
 boolean isEnabled()
          
 boolean isEnableSASL()
           
 boolean isExposePresence()
           
 void load()
           
 JabberPublisher newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
          Creates a new instance of JabberPublisher from a submitted form.
 
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
 
Methods inherited from class hudson.model.Descriptor
calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETERNAME_ENABLED

public static final String PARAMETERNAME_ENABLED
See Also:
Constant Field Values

PARAMETERNAME_PORT

public static final String PARAMETERNAME_PORT
See Also:
Constant Field Values

PARAMETERNAME_HOSTNAME

public static final String PARAMETERNAME_HOSTNAME
See Also:
Constant Field Values

PARAMETERNAME_USEPROXY

public static final String PARAMETERNAME_USEPROXY
See Also:
Constant Field Values

PARAMETERNAME_PROXYTYPE

public static final String PARAMETERNAME_PROXYTYPE
See Also:
Constant Field Values

PARAMETERNAME_PROXYHOST

public static final String PARAMETERNAME_PROXYHOST
See Also:
Constant Field Values

PARAMETERNAME_PROXYPORT

public static final String PARAMETERNAME_PROXYPORT
See Also:
Constant Field Values

PARAMETERNAME_PROXYUSER

public static final String PARAMETERNAME_PROXYUSER
See Also:
Constant Field Values

PARAMETERNAME_PROXYPASS

public static final String PARAMETERNAME_PROXYPASS
See Also:
Constant Field Values

PARAMETERNAME_SSL

public static final String PARAMETERNAME_SSL
See Also:
Constant Field Values

PARAMETERNAME_SASL

public static final String PARAMETERNAME_SASL
See Also:
Constant Field Values

PARAMETERNAME_PRESENCE

public static final String PARAMETERNAME_PRESENCE
See Also:
Constant Field Values

PARAMETERNAME_PASSWORD

public static final String PARAMETERNAME_PASSWORD
See Also:
Constant Field Values

PARAMETERNAME_JABBERID

public static final String PARAMETERNAME_JABBERID
See Also:
Constant Field Values

PARAMETERNAME_GROUP_NICKNAME

public static final String PARAMETERNAME_GROUP_NICKNAME
See Also:
Constant Field Values

PARAMETERNAME_TARGETS

public static final String PARAMETERNAME_TARGETS
See Also:
Constant Field Values

PARAMETERNAME_INITIAL_GROUPCHATS

public static final String PARAMETERNAME_INITIAL_GROUPCHATS
See Also:
Constant Field Values

PARAMETERNAME_COMMAND_PREFIX

public static final String PARAMETERNAME_COMMAND_PREFIX
See Also:
Constant Field Values

PARAMETERNAME_DEFAULT_ID_SUFFIX

public static final String PARAMETERNAME_DEFAULT_ID_SUFFIX
See Also:
Constant Field Values

PARAMETERNAME_SUBSCRIPTION_MODE

public static final String PARAMETERNAME_SUBSCRIPTION_MODE
See Also:
Constant Field Values

PARAMETERNAME_EMAIL_ADDRESS_AS_JABBERID

public static final String PARAMETERNAME_EMAIL_ADDRESS_AS_JABBERID
See Also:
Constant Field Values

PARAMETERVALUE_SUBSCRIPTION_MODE

public static final String[] PARAMETERVALUE_SUBSCRIPTION_MODE

PARAMETERVALUE_PROXYTYPES

public static final String[] PARAMETERVALUE_PROXYTYPES

PARAMETERVALUE_STRATEGY_VALUES

public static final String[] PARAMETERVALUE_STRATEGY_VALUES

PARAMETERVALUE_STRATEGY_DEFAULT

public static final String PARAMETERVALUE_STRATEGY_DEFAULT

DEFAULT_COMMAND_PREFIX

public static final 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 String getDisplayName()
This human readable name is used in the configuration screen.

Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.tasks.Publisher>

getPluginDescription

public 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 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 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 String getJabberId()
Returns the jabber ID. The jabber ID may have the syntax [@[/

getPassword

public String getPassword()
Specified by:
getPassword in interface hudson.plugins.im.IMPublisherDescriptor

getGroupChatNickname

public String getGroupChatNickname()

getPort

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

getPortString

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


isEnableSASL

public boolean isEnableSASL()

isExposePresence

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

getSubscriptionMode

public String getSubscriptionMode()

isEmailAddressAsJabberId

public boolean isEmailAddressAsJabberId()

getDefaultIdSuffix

public String getDefaultIdSuffix()
Specified by:
getDefaultIdSuffix in interface hudson.plugins.im.IMPublisherDescriptor

getCommandPrefix

public String getCommandPrefix()
Specified by:
getCommandPrefix in interface hudson.plugins.im.IMPublisherDescriptor

getProxyHost

public String getProxyHost()

getProxyUser

public String getProxyUser()

getProxyPass

public String getProxyPass()

getProxyType

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

getProxyPort

public int getProxyPort()

getProxyPortString

public String getProxyPortString()
Returns the text to be put into the form field.


getProxyTypeString

public String getProxyTypeString()
Returns the text to be put into the form field.


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
                                                  String jabberId,
                                                  @QueryParameter
                                                  String hostname,
                                                  @QueryParameter
                                                  String port,
                                                  @QueryParameter
                                                  String proxyType)

doProxyCheck

public hudson.util.FormValidation doProxyCheck(@QueryParameter
                                               String proxyType,
                                               @QueryParameter
                                               String proxyHost,
                                               @QueryParameter
                                               String proxyPort)

doServerCheck

public hudson.util.FormValidation doServerCheck(@QueryParameter
                                                String hostname,
                                                @QueryParameter
                                                String port,
                                                @QueryParameter
                                                String proxyType)
Validates the connection information.


isApplicable

public boolean isApplicable(Class<? extends hudson.model.AbstractProject> jobType)

Specified by:
isApplicable in class hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>

getUserName

public 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 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 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


Copyright © 2004-2012. All Rights Reserved.