Class JabberPublisherDescriptor
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
-
- hudson.plugins.jabber.im.transport.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 Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_COMMAND_PREFIX
static java.lang.String
PARAMETERNAME_ACCEPT_ALL_CERTS
static java.lang.String
PARAMETERNAME_COMMAND_PREFIX
static java.lang.String
PARAMETERNAME_DEFAULT_ID_SUFFIX
static java.lang.String
PARAMETERNAME_EMAIL_ADDRESS_AS_JABBERID
static java.lang.String
PARAMETERNAME_ENABLED
static java.lang.String
PARAMETERNAME_HOSTNAME
static java.lang.String
PARAMETERNAME_INITIAL_GROUPCHATS
static java.lang.String
PARAMETERNAME_JABBERID
static java.lang.String
PARAMETERNAME_NICKNAME
static java.lang.String
PARAMETERNAME_PASSWORD
static java.lang.String
PARAMETERNAME_PORT
static java.lang.String
PARAMETERNAME_PRESENCE
static java.lang.String
PARAMETERNAME_PROXYHOST
static java.lang.String
PARAMETERNAME_PROXYPASS
static java.lang.String
PARAMETERNAME_PROXYPORT
static java.lang.String
PARAMETERNAME_PROXYTYPE
static java.lang.String
PARAMETERNAME_PROXYUSER
static java.lang.String
PARAMETERNAME_SSL
static java.lang.String
PARAMETERNAME_SUBSCRIPTION_MODE
static java.lang.String
PARAMETERNAME_TARGETS
static java.lang.String
PARAMETERNAME_USEPROXY
static java.lang.String[]
PARAMETERVALUE_PROXYTYPES
static java.lang.String
PARAMETERVALUE_STRATEGY_DEFAULT
static java.lang.String[]
PARAMETERVALUE_STRATEGY_VALUES
static java.lang.String[]
PARAMETERVALUE_SUBSCRIPTION_MODE
-
Constructor Summary
Constructors Constructor Description JabberPublisherDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, java.lang.String proxyType)
hudson.util.FormValidation
doProxyCheck(java.lang.String proxyType, java.lang.String proxyHost, java.lang.String proxyPort)
hudson.util.FormValidation
doServerCheck(java.lang.String hostname, java.lang.String port, java.lang.String proxyType)
Validates the connection information.java.lang.String
getCommandPrefix()
java.lang.String
getDefaultIdSuffix()
java.util.List<hudson.plugins.im.IMMessageTarget>
getDefaultTargets()
java.lang.String
getDisplayName()
This human readable name is used in the configuration screen.java.lang.String
getHost()
Returns the real host to use.java.lang.String
getHostname()
Returns the overridden hostname in case e.g.java.lang.String
getHudsonUserName()
hudson.plugins.im.IMMessageTargetConverter
getIMMessageTargetConverter()
java.lang.String
getJabberId()
Returns the jabber ID.java.lang.String
getNickname()
hudson.plugins.im.config.ParameterNames
getParamNames()
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
getProxyHost()
hudson.util.Secret
getProxyPass()
int
getProxyPort()
java.lang.String
getProxyPortString()
Returns the text to be put into the form field.org.jivesoftware.smack.proxy.ProxyInfo.ProxyType
getProxyType()
java.lang.String
getProxyTypeString()
Returns the text to be put into the form field.java.lang.String
getProxyUser()
hudson.util.Secret
getSecretPassword()
java.lang.String
getSubscriptionMode()
java.lang.String
getUserName()
Returns the 'user' part of the Jabber ID.boolean
isAcceptAllCerts()
boolean
isApplicable(java.lang.Class<? extends hudson.model.AbstractProject> jobType)
boolean
isEmailAddressAsJabberId()
boolean
isEnabled()
boolean
isExposePresence()
void
load()
JabberPublisher
newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
Creates a new instance ofJabberPublisher
from a submitted form.-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
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
-
-
Method Detail
-
load
public void load()
- Overrides:
load
in classhudson.model.Descriptor<hudson.tasks.Publisher>
-
getDisplayName
public java.lang.String getDisplayName()
This human readable name is used in the configuration screen.- Overrides:
getDisplayName
in classhudson.model.Descriptor<hudson.tasks.Publisher>
-
getPluginDescription
public java.lang.String getPluginDescription()
- Specified by:
getPluginDescription
in interfacehudson.plugins.im.IMPublisherDescriptor
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfacehudson.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 interfacehudson.plugins.im.IMPublisherDescriptor
-
getHost
public java.lang.String getHost()
Returns the real host to use. I.e. when hostname is set returns hostname. Otherwise returnsgetServiceName()
- Specified by:
getHost
in interfacehudson.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 interfacehudson.plugins.im.IMPublisherDescriptor
-
getSecretPassword
public hudson.util.Secret getSecretPassword()
- Specified by:
getSecretPassword
in interfacehudson.plugins.im.IMPublisherDescriptor
-
getNickname
public java.lang.String getNickname()
-
getPort
public int getPort()
- Specified by:
getPort
in interfacehudson.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 interfacehudson.plugins.im.IMPublisherDescriptor
-
getSubscriptionMode
public java.lang.String getSubscriptionMode()
-
isEmailAddressAsJabberId
public boolean isEmailAddressAsJabberId()
-
getDefaultIdSuffix
public java.lang.String getDefaultIdSuffix()
- Specified by:
getDefaultIdSuffix
in interfacehudson.plugins.im.IMPublisherDescriptor
-
getCommandPrefix
public java.lang.String getCommandPrefix()
- Specified by:
getCommandPrefix
in interfacehudson.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 ofJabberPublisher
from a submitted form.- Overrides:
newInstance
in classhudson.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 classhudson.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 classhudson.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 interfacehudson.plugins.im.IMPublisherDescriptor
-
getHudsonUserName
public java.lang.String getHudsonUserName()
- Specified by:
getHudsonUserName
in interfacehudson.plugins.im.IMPublisherDescriptor
-
getIMMessageTargetConverter
public hudson.plugins.im.IMMessageTargetConverter getIMMessageTargetConverter()
- Specified by:
getIMMessageTargetConverter
in interfacehudson.plugins.im.IMPublisherDescriptor
-
getDefaultTargets
public java.util.List<hudson.plugins.im.IMMessageTarget> getDefaultTargets()
- Specified by:
getDefaultTargets
in interfacehudson.plugins.im.IMPublisherDescriptor
-
getParamNames
public hudson.plugins.im.config.ParameterNames getParamNames()
- Specified by:
getParamNames
in interfacehudson.plugins.im.IMPublisherDescriptor
-
-