org.objectweb.easybeans.deployment.xml.helper
Class MetadataMerge

java.lang.Object
  extended by org.objectweb.easybeans.deployment.xml.helper.MetadataMerge

public final class MetadataMerge
extends java.lang.Object

This class merge the information of the struct representing EJB DD into the metadata.

Author:
Florent Benoit

Field Summary
private  EjbJarAnnotationMetadata ejbMetadata
          Metadata for an ejb-jar.
 
Constructor Summary
private MetadataMerge(EjbJarAnnotationMetadata ejbMetadata)
          Helper class, no public constructor.
 
Method Summary
private  void applyCommonBean(AbsBean bean, ClassAnnotationMetadata classAnnotationMetadata)
          Apply rules for a common bean.
private  void applyLifeCycle(AbsBean bean, java.util.List<LifeCycleCallback> lifecycleList, ClassAnnotationMetadata classAnnotationMetadata, java.lang.String type)
          Apply rules for a common bean (lifecycle callbacks).
private  void applySessionBean(Session sessionbean, ClassAnnotationMetadata classAnnotationMetadata)
          Apply rules for a session bean.
private static java.lang.String encode(java.lang.String className)
          Encode a classname (replace .
private  ClassAnnotationMetadata findClassForEjb(java.lang.String ejbName, java.lang.String ejbClass)
          Find/Gets a classAnnotationMetadata for a given ejb name and/or a given ejbclass name.
static void merge(EjbJarAnnotationMetadata ejbMetadata)
          Takes struct of metadata and adds/set information on class/methods metadata.
private  void resolve()
          Do all merging operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ejbMetadata

private EjbJarAnnotationMetadata ejbMetadata
Metadata for an ejb-jar.

Constructor Detail

MetadataMerge

private MetadataMerge(EjbJarAnnotationMetadata ejbMetadata)
Helper class, no public constructor.

Parameters:
ejbMetadata - the metadata corresponding to an EJB-JAR file.
Method Detail

merge

public static void merge(EjbJarAnnotationMetadata ejbMetadata)
Takes struct of metadata and adds/set information on class/methods metadata.

Parameters:
ejbMetadata - the metadata corresponding to an EJB-JAR file.

resolve

private void resolve()
Do all merging operations.


applySessionBean

private void applySessionBean(Session sessionbean,
                              ClassAnnotationMetadata classAnnotationMetadata)
Apply rules for a session bean.

Parameters:
sessionbean - the struct (XML DD)
classAnnotationMetadata - (Annotation metadata)

applyCommonBean

private void applyCommonBean(AbsBean bean,
                             ClassAnnotationMetadata classAnnotationMetadata)
Apply rules for a common bean.

Parameters:
bean - the struct (XML DD)
classAnnotationMetadata - (Annotation metadata)

applyLifeCycle

private void applyLifeCycle(AbsBean bean,
                            java.util.List<LifeCycleCallback> lifecycleList,
                            ClassAnnotationMetadata classAnnotationMetadata,
                            java.lang.String type)
Apply rules for a common bean (lifecycle callbacks).

Parameters:
bean - the struct (XML DD)
lifecycleList - the list of lifecycle callbacks.
classAnnotationMetadata - (Annotation metadata).
type - the type of lifecycle.

findClassForEjb

private ClassAnnotationMetadata findClassForEjb(java.lang.String ejbName,
                                                java.lang.String ejbClass)
Find/Gets a classAnnotationMetadata for a given ejb name and/or a given ejbclass name.

Parameters:
ejbName - the name of the EJB.
ejbClass - the class of the EJB.
Returns:
a classAnnotationMetadata if found, else exception

encode

private static java.lang.String encode(java.lang.String className)
Encode a classname (replace . by /) as it's the internal form of the metadata

Parameters:
className - the name of the class to encode
Returns:
encoded name