Class EiffelBroadcasterConfig
- java.lang.Object
-
- hudson.model.Descriptor<GlobalConfiguration>
-
- jenkins.model.GlobalConfiguration
-
- com.axis.jenkins.plugins.eiffel.eiffelbroadcaster.EiffelBroadcasterConfig
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,OnMaster
@Extension @Symbol("eiffel-broadcaster") public final class EiffelBroadcasterConfig extends GlobalConfiguration
Adds the EiffelBroadcaster plugin configuration to the system config page.- Author:
- Isac Holm <isac.holm@axis.com>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description EiffelBroadcasterConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
ListBoxModel
doFillSystemSigningCredentialsIdItems(Item item, String credentialsId)
FormValidation
doTestConnection(String uri, String name, Secret pw)
Tests connection to the server URI.String
getActivityCategories()
Returns the list of categories to attach to the activities, expressed as a multi-line string.List<String>
getActivityCategoriesList()
Returns the list of categories to attach to the activities.String
getAppId()
Returns application id.protected XmlFile
getConfigFile()
For backwards-compatibility with the previousPlugin
-derived version.String
getDisplayName()
boolean
getEnableBroadcaster()
Gets whether this plugin is enabled or not.EventValidator
getEventValidator()
String
getExchangeName()
Gets the exchange name.String
getHelpFile(String fieldName)
Returns a custom help file location for fields where the Stapler doesn't locate it automatically.HostnameSource
getHostnameSource()
Returns the hostname source.static EiffelBroadcasterConfig
getInstance()
Gets this extension's instance.boolean
getPersistentDelivery()
Returns true if persistentDelivery is to be used.String
getRoutingKey()
Gets the routing key.RoutingKeyProvider
getRoutingKeyProvider()
Returns the currently configuredRoutingKeyProvider
implementation.ExtensionList<RoutingKeyProvider.RoutingKeyProviderDescriptor>
getRoutingKeyProviderDescriptors()
String
getServerUri()
Gets URI for MQ server.String
getSystemSigningCredentialsId()
HashAlgorithm
getSystemSigningHashAlg()
String
getUserName()
Gets user name.Secret
getUserPassword()
Gets user password.String
getVirtualHost()
Gets the virtual host name.boolean
isSystemSigningEnabled()
protected Object
readResolve()
Migrates legacy model fields to the current model.void
setActivityCategories(String activityCategories)
Sets the list of categories to attach to the activities.void
setAppId(String appId)
Sets application id.void
setEnableBroadcaster(boolean enableBroadcaster)
Sets flag whether this plugin is enabled or not.void
setExchangeName(String exchangeName)
Sets the exchange name.void
setHostnameSource(HostnameSource hostnameSource)
Sets the hostname source.void
setPersistentDelivery(boolean pd)
Sets persistent delivery mode.void
setRoutingKey(String routingKey)
Sets the routing key.void
setRoutingKeyProvider(RoutingKeyProvider routingKeyProvider)
Sets whichRoutingKeyProvider
implementation to use to generate routing keys for the events.void
setServerUri(String serverUri)
Sets URI for MQ server.void
setSystemSigningCredentialsId(String systemSigningCredentialsId)
void
setSystemSigningEnabled(boolean systemSigningEnabled)
void
setSystemSigningHashAlg(HashAlgorithm systemSigningHashAlg)
void
setUserName(String userName)
Sets user name.void
setUserPassword(Secret userPassword)
Sets user password.void
setVirtualHost(String virtualHost)
Sets the virtual host name.-
Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
- Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
readResolve
protected Object readResolve()
Migrates legacy model fields to the current model. Called by the XStream unmarshaler.
-
getConfigFile
protected XmlFile getConfigFile()
For backwards-compatibility with the previousPlugin
-derived version.- Overrides:
getConfigFile
in classDescriptor<GlobalConfiguration>
- Returns:
- XmlFile representing the configuration file.
-
getEnableBroadcaster
public boolean getEnableBroadcaster()
Gets whether this plugin is enabled or not.- Returns:
- true if this plugin is enabled.
-
setEnableBroadcaster
@DataBoundSetter public void setEnableBroadcaster(boolean enableBroadcaster)
Sets flag whether this plugin is enabled or not.- Parameters:
enableBroadcaster
- true if this plugin is enabled.
-
getServerUri
public String getServerUri()
Gets URI for MQ server.- Returns:
- the URI.
-
setServerUri
@DataBoundSetter 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
@DataBoundSetter 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
@DataBoundSetter public void setUserPassword(Secret userPassword)
Sets user password.- Parameters:
userPassword
- the user password.
-
getInstance
public static EiffelBroadcasterConfig getInstance()
Gets this extension's instance.
-
getExchangeName
public String getExchangeName()
Gets the exchange name.- Returns:
- the exchange name.
-
setExchangeName
@DataBoundSetter 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
@DataBoundSetter public void setVirtualHost(String virtualHost)
Sets the virtual host name.- Parameters:
virtualHost
- the exchange name.
-
getRoutingKey
public String getRoutingKey()
Gets the routing key.- Returns:
- the routing key.
-
setRoutingKey
@DataBoundSetter public void setRoutingKey(String routingKey)
Sets the routing key. This method exists for backwards compatibility reasons. Any non-null value will be passed tosetRoutingKeyProvider(RoutingKeyProvider)
and this setter's underlying attribute will be set to null.- Parameters:
routingKey
- the routing key.
-
getRoutingKeyProvider
@NonNull public RoutingKeyProvider getRoutingKeyProvider()
Returns the currently configuredRoutingKeyProvider
implementation.
-
setRoutingKeyProvider
@DataBoundSetter public void setRoutingKeyProvider(@NonNull RoutingKeyProvider routingKeyProvider)
Sets whichRoutingKeyProvider
implementation to use to generate routing keys for the events.
-
getPersistentDelivery
public boolean getPersistentDelivery()
Returns true if persistentDelivery is to be used.- Returns:
- if persistentDelivery is to be used.
-
setPersistentDelivery
@DataBoundSetter 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
@DataBoundSetter public void setAppId(String appId)
Sets application id.- Parameters:
appId
- Application id to use
-
getActivityCategories
public String getActivityCategories()
Returns the list of categories to attach to the activities, expressed as a multi-line string.
-
getActivityCategoriesList
public List<String> getActivityCategoriesList()
Returns the list of categories to attach to the activities.
-
setActivityCategories
@DataBoundSetter public void setActivityCategories(String activityCategories)
Sets the list of categories to attach to the activities.
-
getHostnameSource
public HostnameSource getHostnameSource()
Returns the hostname source.
-
setHostnameSource
@DataBoundSetter public void setHostnameSource(HostnameSource hostnameSource)
Sets the hostname source.
-
isSystemSigningEnabled
public boolean isSystemSigningEnabled()
-
setSystemSigningEnabled
@DataBoundSetter public void setSystemSigningEnabled(boolean systemSigningEnabled)
-
getSystemSigningCredentialsId
public String getSystemSigningCredentialsId()
-
setSystemSigningCredentialsId
@DataBoundSetter public void setSystemSigningCredentialsId(String systemSigningCredentialsId)
-
getSystemSigningHashAlg
public HashAlgorithm getSystemSigningHashAlg()
-
setSystemSigningHashAlg
@DataBoundSetter public void setSystemSigningHashAlg(HashAlgorithm systemSigningHashAlg)
-
getEventValidator
@NonNull public EventValidator getEventValidator()
-
getRoutingKeyProviderDescriptors
public ExtensionList<RoutingKeyProvider.RoutingKeyProviderDescriptor> getRoutingKeyProviderDescriptors()
-
getDisplayName
public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<GlobalConfiguration>
-
doFillSystemSigningCredentialsIdItems
public ListBoxModel doFillSystemSigningCredentialsIdItems(@AncestorInPath Item item, @QueryParameter String credentialsId)
-
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.
-
getHelpFile
public String getHelpFile(String fieldName)
Returns a custom help file location for fields where the Stapler doesn't locate it automatically.- Overrides:
getHelpFile
in classDescriptor<GlobalConfiguration>
-
-