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 java.lang.String DEFAULT_COMMAND_PREFIX
           
static java.lang.String PARAMETERNAME_COMMAND_PREFIX
           
static java.lang.String PARAMETERNAME_DEFAULT_ID_SUFFIX
           
static java.lang.String PARAMETERNAME_ENABLED
           
static java.lang.String PARAMETERNAME_GROUP_NICKNAME
           
static java.lang.String PARAMETERNAME_HOSTNAME
           
static java.lang.String PARAMETERNAME_HUDSON_LOGIN
           
static java.lang.String PARAMETERNAME_HUDSON_PASSWORD
           
static java.lang.String PARAMETERNAME_INITIAL_GROUPCHATS
           
static java.lang.String PARAMETERNAME_JABBERID
           
static java.lang.String PARAMETERNAME_NOTIFY_CULPRITS
           
static java.lang.String PARAMETERNAME_NOTIFY_FIXERS
           
static java.lang.String PARAMETERNAME_NOTIFY_START
           
static java.lang.String PARAMETERNAME_NOTIFY_SUSPECTS
           
static java.lang.String PARAMETERNAME_PASSWORD
           
static java.lang.String PARAMETERNAME_PORT
           
static java.lang.String PARAMETERNAME_PRESENCE
           
static java.lang.String PARAMETERNAME_SSL
           
static java.lang.String PARAMETERNAME_STRATEGY
           
static java.lang.String PARAMETERNAME_TARGETS
           
static java.lang.String PARAMETERVALUE_STRATEGY_DEFAULT
           
static java.lang.String[] PARAMETERVALUE_STRATEGY_VALUES
           
 
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(java.lang.String jabberId, java.lang.String hostname, java.lang.String port)
           
 hudson.util.FormValidation doServerCheck(java.lang.String hostname, java.lang.String port, boolean legacySSL)
          Validates the connection information.
 java.lang.String getCommandPrefix()
           
 java.lang.String getDefaultIdSuffix()
           
 java.lang.String getDisplayName()
          This human readable name is used in the configuration screen.
 java.lang.String getGroupChatNickname()
           
 java.lang.String getHost()
          Returns the real host to use.
 java.lang.String getHostname()
           
 java.lang.String getHudsonPassword()
           
 java.lang.String getHudsonUserName()
           
 java.lang.String getInitialGroupChats()
          Gets the whitespace separated list of group chats to join, or null if nothing is configured.
 java.lang.String getJabberId()
          Returns the jabber ID.
 java.lang.String getPassword()
           
 java.lang.String getPluginDescription()
           
 int getPort()
           
 java.lang.String getPortString()
          Returns the text to be put into the form field.
 java.lang.String getUserName()
          Returns the 'user' part of the Jabber ID.
 boolean isApplicable(java.lang.Class<? extends hudson.model.AbstractProject> jobType)
          
 boolean isEnabled()
          
 boolean isExposePresence()
           
 boolean isLegacySSL()
           
 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
configure, configure, convert, doHelp, find, find, getCheckUrl, getConfigPage, getGlobalConfigPage, getHelpFile, getHelpFile, getJsonSafeClassName, getPropertyType, getViewPage, isInstance, newInstance, 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 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_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_GROUP_NICKNAME

public static final java.lang.String PARAMETERNAME_GROUP_NICKNAME
See Also:
Constant Field Values

PARAMETERNAME_TARGETS

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

PARAMETERNAME_STRATEGY

public static final java.lang.String PARAMETERNAME_STRATEGY
See Also:
Constant Field Values

PARAMETERNAME_NOTIFY_START

public static final java.lang.String PARAMETERNAME_NOTIFY_START
See Also:
Constant Field Values

PARAMETERNAME_NOTIFY_SUSPECTS

public static final java.lang.String PARAMETERNAME_NOTIFY_SUSPECTS
See Also:
Constant Field Values

PARAMETERNAME_NOTIFY_CULPRITS

public static final java.lang.String PARAMETERNAME_NOTIFY_CULPRITS
See Also:
Constant Field Values

PARAMETERNAME_NOTIFY_FIXERS

public static final java.lang.String PARAMETERNAME_NOTIFY_FIXERS
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_HUDSON_LOGIN

public static final java.lang.String PARAMETERNAME_HUDSON_LOGIN
See Also:
Constant Field Values

PARAMETERNAME_HUDSON_PASSWORD

public static final java.lang.String PARAMETERNAME_HUDSON_PASSWORD
See Also:
Constant Field Values

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.

Specified by:
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()
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 [@[/

getPassword

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

getGroupChatNickname

public java.lang.String getGroupChatNickname()

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.


isLegacySSL

public boolean isLegacySSL()

isExposePresence

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

getInitialGroupChats

public java.lang.String getInitialGroupChats()
Gets the whitespace separated list of group chats to join, or null if nothing is configured.


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

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)

doServerCheck

public hudson.util.FormValidation doServerCheck(@QueryParameter
                                                java.lang.String hostname,
                                                @QueryParameter
                                                java.lang.String port,
                                                @QueryParameter
                                                boolean legacySSL)
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

getHudsonPassword

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

getHudsonUserName

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


Copyright © 2009. All Rights Reserved.