com.ail.core.configure
Class EJBLoaderBean

java.lang.Object
  extended by com.ail.core.configure.EJBLoaderBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class EJBLoaderBean
extends java.lang.Object
implements javax.ejb.SessionBean

This class acts as a facade to the configuration loader being used on the server side. It is use by the EJBConfigurationLoader (client) to provide access to server side configuration for remote clients (e.g. web start apps) which need to access the server's configuration information.

Version:
$Revision: 1.4 $
See Also:
Serialized Form

Constructor Summary
EJBLoaderBean()
           
 
Method Summary
 int deleteConfigurationRepository()
          Pass deleteConfigurationRepository requests onto the loader.
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 java.util.Collection<java.lang.String> getNamespaces()
          Delegate to the local configuration loader's getNamespaces method.
 java.util.Collection<ConfigurationSummary> getNamespacesDetail()
          Delegate to the local configuration loader's getNamespacesDetail method.
 java.util.Collection<ConfigurationSummary> getNamespacesHistoryDetail(java.lang.String namespace)
          Delegate to the local configuration loader's getNamespacesHistoryDetail method.
 Configuration loadConfiguration(java.lang.String namespace, VersionEffectiveDate date)
          Deligate to the local configuration loader's loadConfiguration method.
 byte[] loadConfigurationAsByteArray(java.lang.String namespace, VersionEffectiveDate date)
          Performs the same function as loadConfiguration, but returns a byte array.
 int purgeAllConfigurations()
          Pass purgeAllConfigurations requests onto the loader.
 int reset()
          Pass reset requests onto the loader.
 int saveConfiguration(java.lang.String namespace, byte[] config)
          Delegate to the local configuration loader's saveConfiguration method.
 void saveConfiguration(java.lang.String namespace, Configuration config)
          Delegate to the local configuration loader's saveConfiguration method.
 void setSessionContext(javax.ejb.SessionContext sessionContext)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBLoaderBean

public EJBLoaderBean()
Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

loadConfiguration

public Configuration loadConfiguration(java.lang.String namespace,
                                       VersionEffectiveDate date)
                                throws EJBConfigurationException
Deligate to the local configuration loader's loadConfiguration method.

Parameters:
namespace - Namespace to load.
date - Date to load the namespace for (version effective date).
Returns:
The loaded configuration.
Throws:
EJBException
EJBConfigurationException

loadConfigurationAsByteArray

public byte[] loadConfigurationAsByteArray(java.lang.String namespace,
                                           VersionEffectiveDate date)
                                    throws EJBConfigurationException
Performs the same function as loadConfiguration, but returns a byte array. This method is used by the web service based config loader.

Parameters:
namespace - Namespace to load
date - Date to load configuration for.
Returns:
The loaded configuration
Throws:
EJBConfigurationException

saveConfiguration

public void saveConfiguration(java.lang.String namespace,
                              Configuration config)
                       throws EJBConfigurationException
Delegate to the local configuration loader's saveConfiguration method.

Parameters:
namespace - Namespace to load.
config - The configuration to save.
Throws:
EJBException
EJBConfigurationException

saveConfiguration

public int saveConfiguration(java.lang.String namespace,
                             byte[] config)
                      throws EJBConfigurationException
Delegate to the local configuration loader's saveConfiguration method.

Parameters:
namespace - Namespace to load.
config - The configuration to save.
Throws:
EJBException
EJBConfigurationException

getNamespaces

public java.util.Collection<java.lang.String> getNamespaces()
                                                     throws EJBConfigurationException
Delegate to the local configuration loader's getNamespaces method.

Returns:
A collection of namespaces (instances of String).
Throws:
EJBException
EJBConfigurationException

getNamespacesDetail

public java.util.Collection<ConfigurationSummary> getNamespacesDetail()
                                                               throws EJBConfigurationException
Delegate to the local configuration loader's getNamespacesDetail method.

Returns:
A collection of namespaces (instances of ConfigurationSummary ).
Throws:
EJBException
EJBConfigurationException

getNamespacesHistoryDetail

public java.util.Collection<ConfigurationSummary> getNamespacesHistoryDetail(java.lang.String namespace)
                                                                      throws EJBConfigurationException
Delegate to the local configuration loader's getNamespacesHistoryDetail method.

Returns:
A collection of namespaces (instances of ConfigurationSummary ).
Throws:
EJBException
EJBConfigurationException

reset

public int reset()
Pass reset requests onto the loader.


purgeAllConfigurations

public int purgeAllConfigurations()
Pass purgeAllConfigurations requests onto the loader.


deleteConfigurationRepository

public int deleteConfigurationRepository()
Pass deleteConfigurationRepository requests onto the loader.