org.jboss.soa.esb.listeners.config.mappers
Class XMLBeansModel

java.lang.Object
  extended by org.jboss.soa.esb.listeners.config.mappers.XMLBeansModel

public class XMLBeansModel
extends java.lang.Object

XMLBeans based model implementation.

Author:
tom.fennelly@jboss.com

Constructor Summary
XMLBeansModel(org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Jbossesb jbossesb)
          Constructor.
 
Method Summary
static boolean exposesInVMListener(org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service service)
           
 org.w3c.dom.Document generateESBAwareConfig()
          Generate the ESB Aware configuration document.
 org.w3c.dom.Document generateGatewayConfig()
          Generate the gateway configuration document.
 java.util.Set<java.lang.String> getActions()
          Get the list of actions in this deployment.
 org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus getBus(java.lang.String busid)
          Get the <bus> configuration matching the supplied busid reference value.
 java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener> getESBAwareListeners()
          Get the list of ESB Aware Listeners from the configuration.
 java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener> getGatewayListeners()
          Get the list of ESB Gateway Listeners from the configuration.
 java.lang.String getParameterReloadSecs()
          Gets the setting for the number of seconds between reloads.
static java.lang.String getProperty(java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property> properties, java.lang.String name, java.lang.String defaultVal)
           
 org.jboss.soa.esb.listeners.config.xbeanmodel101.Provider getProvider(org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus bus)
          Get the <provider> configuration containing the supplied Bus configuration instance.
 org.jboss.soa.esb.listeners.config.xbeanmodel101.Schedule getSchedule(java.lang.String id)
           
 int getScheduledListenerCount()
           
 org.jboss.soa.esb.listeners.config.xbeanmodel101.ScheduleProviderDocument.ScheduleProvider getScheduleProvider()
           
 org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service getService(org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener listener)
          Get the Service to which the supplied Listener configuration instance is bound.
 java.util.List<ServiceContract> getServiceContracts()
           
 java.util.Map<Service,java.util.List<ServicePublisher>> getServicePublishers()
          Get a map of service publishers provided by each service.
 java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service> getServices()
          Get the Service list.
 java.util.List<WebserviceInfo> getWebserviceServices()
          Get the list of services which require a webservice endpoint.
static java.util.Properties toProperties(java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property> configProperties)
          Get the properties from the document.
 void verifyScheduleProviderConfig()
          Verify the schedule provider configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLBeansModel

public XMLBeansModel(org.jboss.soa.esb.listeners.config.xbeanmodel101.JbossesbDocument.Jbossesb jbossesb)
Constructor.

Parameters:
xmlBeansDoc - XMLBeans config model.
Method Detail

getGatewayListeners

public java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener> getGatewayListeners()
                                                                                              throws ConfigurationException
Get the list of ESB Gateway Listeners from the configuration.

Returns:
The list of ESB Gateway Listeners from the configuration.
Throws:
ConfigurationException - Bad configuration.

getESBAwareListeners

public java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener> getESBAwareListeners()
                                                                                               throws ConfigurationException
Get the list of ESB Aware Listeners from the configuration.

Returns:
The list of ESB Aware Listeners from the configuration.
Throws:
ConfigurationException - Bad configuration.

getService

public org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service getService(org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener listener)
Get the Service to which the supplied Listener configuration instance is bound.

Parameters:
listener - The listener instance (Gateway or ESB Aware).
Returns:
The Service to which the

getServices

public java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service> getServices()
Get the Service list.

Returns:
Service list.

getBus

public org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus getBus(java.lang.String busid)
                                                            throws ConfigurationException
Get the <bus> configuration matching the supplied busid reference value.

Parameters:
busid - The required <bus> configuration reference value.
Returns:
The Bus configuration instance.
Throws:
ConfigurationException - Unknown busid reference value.

getProvider

public org.jboss.soa.esb.listeners.config.xbeanmodel101.Provider getProvider(org.jboss.soa.esb.listeners.config.xbeanmodel101.Bus bus)
Get the <provider> configuration containing the supplied Bus configuration instance.

Parameters:
bus - The Bus config instance whose Provider is being sought.
Returns:
The Provider configuration instance.

getSchedule

public org.jboss.soa.esb.listeners.config.xbeanmodel101.Schedule getSchedule(java.lang.String id)

getScheduleProvider

public org.jboss.soa.esb.listeners.config.xbeanmodel101.ScheduleProviderDocument.ScheduleProvider getScheduleProvider()

getScheduledListenerCount

public int getScheduledListenerCount()

getParameterReloadSecs

public java.lang.String getParameterReloadSecs()
Gets the setting for the number of seconds between reloads.

Returns:
The param reload seconds config value.

getProperty

public static java.lang.String getProperty(java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property> properties,
                                           java.lang.String name,
                                           java.lang.String defaultVal)

exposesInVMListener

public static boolean exposesInVMListener(org.jboss.soa.esb.listeners.config.xbeanmodel101.ServiceDocument.Service service)

verifyScheduleProviderConfig

public void verifyScheduleProviderConfig()
                                  throws ConfigurationException
Verify the schedule provider configuration.

Throws:
ConfigurationException

getServicePublishers

public java.util.Map<Service,java.util.List<ServicePublisher>> getServicePublishers()
Get a map of service publishers provided by each service.

Returns:
The map of service publishers, keyed by service.

generateESBAwareConfig

public org.w3c.dom.Document generateESBAwareConfig()
                                            throws ConfigurationException
Generate the ESB Aware configuration document.

Returns:
The ESB aware configuration.
Throws:
ConfigurationException - Error creating configuration.

generateGatewayConfig

public org.w3c.dom.Document generateGatewayConfig()
                                           throws ConfigurationException
Generate the gateway configuration document.

Returns:
The gateway configuration.
Throws:
ConfigurationException - Error creating configuration.

toProperties

public static java.util.Properties toProperties(java.util.List<org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property> configProperties)
Get the properties from the document.

Parameters:
configProperties - The document properties.
Returns:
The properties.

getActions

public java.util.Set<java.lang.String> getActions()
Get the list of actions in this deployment.

Returns:
a list of actions or null if none present.

getWebserviceServices

public java.util.List<WebserviceInfo> getWebserviceServices()
                                                     throws ConfigurationException
Get the list of services which require a webservice endpoint.

Returns:
The list of services.
Throws:
ConfigurationException

getServiceContracts

public java.util.List<ServiceContract> getServiceContracts()