com.caucho.ejb.cfg
Class EjbConfig

java.lang.Object
  extended by com.caucho.ejb.cfg.EjbConfig
Direct Known Subclasses:
EjbConfigManager

public class EjbConfig
extends java.lang.Object

Manages the EJB configuration files.


Constructor Summary
EjbConfig(EjbContainer ejbContainer)
           
 
Method Summary
 void addApplicationException(ApplicationExceptionConfig applicationException)
          Adds an application exception.
 void addEjbPath(Path path)
          Adds a path for an EJB config file to the config list.
 void addFileSet(FileSetType fileSet)
          Adds a path for an EJB config file to the config list.
 void addFunction(FunctionSignature sig, java.lang.String sql)
          Adds a function.
 void addInterceptor(Interceptor interceptor)
          Adds an interceptor.
 void addInterceptorBinding(InterceptorBinding interceptorBinding)
          Binds an interceptor to an ejb.
 void addIntrospectableClass(java.lang.String className)
           
 void addMessageDestination(MessageDestination messageDestination)
          Adds the message destination mapping
 void addProxy(EjbBeanConfigProxy proxy)
           
 void configure()
          Configures the pending beans.
protected  void configureRelations()
          Match up the relations.
 void deploy()
          Configures the pending beans.
 void deployBeans(java.util.ArrayList<EjbBean> beanConfig, JavaClassGenerator javaGen)
          Configures the pending beans.
 EjbBean findBeanByType(java.lang.Class type)
          Finds an entity bean by its abstract schema.
 java.util.ArrayList<ApplicationExceptionConfig> getApplicationExceptions()
          Returns the application exceptions.
 EjbBean getBeanConfig(java.lang.String name)
          Returns the cfg bean with the given name.
 java.lang.String getBooleanFalse()
          Gets the boolean false literal.
 java.lang.String getBooleanTrue()
          Gets the boolean true literal.
 EjbContainer getEjbContainer()
          Returns the EJB manager.
 java.util.ArrayList<FunctionSignature> getFunctions()
          Gets the function list.
 Interceptor getInterceptor(java.lang.String className)
          Returns the interceptor with the given class name.
 InterceptorBinding getInterceptorBinding(java.lang.String ejbName, boolean isExcludeDefault)
          Returns the interceptor bindings for a given ejb name.
 MessageDestination getMessageDestination(java.lang.String name)
           
 java.lang.String getSchema()
          Returns the schema name.
 boolean isAllowPOJO()
          Return true if POJO are allowed.
 void setAllowPOJO(boolean allowPOJO)
          Sets true if POJO are allowed.
 void setBeanConfig(java.lang.String name, EjbBean bean)
          Sets the cfg bean with the given name.
 void setBooleanFalse(java.lang.String falseLiteral)
          Sets the boolean false literal.
 void setBooleanTrue(java.lang.String trueLiteral)
          Sets the boolean true literal.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EjbConfig

public EjbConfig(EjbContainer ejbContainer)
Method Detail

addFileSet

public void addFileSet(FileSetType fileSet)
Adds a path for an EJB config file to the config list.


addEjbPath

public void addEjbPath(Path path)
                throws ConfigException
Adds a path for an EJB config file to the config list.

Throws:
ConfigException

addProxy

public void addProxy(EjbBeanConfigProxy proxy)

getSchema

public java.lang.String getSchema()
Returns the schema name.


getEjbContainer

public EjbContainer getEjbContainer()
Returns the EJB manager.


setBooleanTrue

public void setBooleanTrue(java.lang.String trueLiteral)
Sets the boolean true literal.


getBooleanTrue

public java.lang.String getBooleanTrue()
Gets the boolean true literal.


setBooleanFalse

public void setBooleanFalse(java.lang.String falseLiteral)
Sets the boolean false literal.


getBooleanFalse

public java.lang.String getBooleanFalse()
Gets the boolean false literal.


getBeanConfig

public EjbBean getBeanConfig(java.lang.String name)
Returns the cfg bean with the given name.


setBeanConfig

public void setBeanConfig(java.lang.String name,
                          EjbBean bean)
Sets the cfg bean with the given name.


getInterceptor

public Interceptor getInterceptor(java.lang.String className)
Returns the interceptor with the given class name.


addInterceptor

public void addInterceptor(Interceptor interceptor)
Adds an interceptor.


getInterceptorBinding

public InterceptorBinding getInterceptorBinding(java.lang.String ejbName,
                                                boolean isExcludeDefault)
Returns the interceptor bindings for a given ejb name.


addApplicationException

public void addApplicationException(ApplicationExceptionConfig applicationException)
Adds an application exception.


getApplicationExceptions

public java.util.ArrayList<ApplicationExceptionConfig> getApplicationExceptions()
Returns the application exceptions.


addInterceptorBinding

public void addInterceptorBinding(InterceptorBinding interceptorBinding)
Binds an interceptor to an ejb.


addMessageDestination

public void addMessageDestination(MessageDestination messageDestination)
Adds the message destination mapping


getMessageDestination

public MessageDestination getMessageDestination(java.lang.String name)

setAllowPOJO

public void setAllowPOJO(boolean allowPOJO)
Sets true if POJO are allowed.


isAllowPOJO

public boolean isAllowPOJO()
Return true if POJO are allowed.


addIntrospectableClass

public void addIntrospectableClass(java.lang.String className)

findBeanByType

public EjbBean findBeanByType(java.lang.Class type)
Finds an entity bean by its abstract schema.


addFunction

public void addFunction(FunctionSignature sig,
                        java.lang.String sql)
Adds a function.


getFunctions

public java.util.ArrayList<FunctionSignature> getFunctions()
Gets the function list.


configure

public void configure()
               throws ConfigException
Configures the pending beans.

Throws:
ConfigException

deploy

public void deploy()
            throws ConfigException
Configures the pending beans.

Throws:
ConfigException

deployBeans

public void deployBeans(java.util.ArrayList<EjbBean> beanConfig,
                        JavaClassGenerator javaGen)
                 throws java.lang.Exception
Configures the pending beans.

Throws:
java.lang.Exception

configureRelations

protected void configureRelations()
                           throws ConfigException
Match up the relations.

Throws:
ConfigException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object