org.objectweb.easybeans.deployable.impl
Class EARDeployableImpl

java.lang.Object
  extended by org.objectweb.easybeans.deployable.impl.AbsDeployable<EARDeployable>
      extended by org.objectweb.easybeans.deployable.impl.EARDeployableImpl
All Implemented Interfaces:
EARDeployable, EZBDeployable<EARDeployable>

public class EARDeployableImpl
extends AbsDeployable<EARDeployable>
implements EARDeployable

Implementation for an EAR.

Author:
Florent Benoit

Field Summary
private static java.lang.String APPLICATION_XML_ENTRY
          Application.xml file entry in the EAR file.
private  java.util.List<CARDeployable> carDeployables
          List of War Deployables.
private static java.lang.String DEFAULT_LIBRARY_FOLDER
          Default library folder of an EAR.
private  EARInfoImpl earInfo
          Info of the application.xml file of this EAR.
private  java.util.List<EJB21Deployable> ejb21Deployables
          List of EJB 2.1 Deployables.
private  java.util.List<EJB3Deployable> ejb3Deployables
          List of EJB 3 Deployables.
private  java.util.List<LibDeployable> libDeployables
          List of Libraries Deployables.
private  JLog logger
          Logger.
private  java.util.List<RARDeployable> rarDeployables
          List of War Deployables.
private  java.util.List<WARDeployable> warDeployables
          List of War Deployables.
 
Constructor Summary
EARDeployableImpl(EZBArchive archive)
          Defines and create a deployable for the given archive.
 
Method Summary
 void addDeployable(EZBDeployable deployable)
          Add the given Deployable to this EAR deployable.
private  void analyzeDD()
          Analyze the META-INF/application.xml entry if it is present.
protected  EZBDeployable checkLibDeployable(EZBDeployable deployable)
          If it is a library, change the type of the deployable.
 java.util.List<CARDeployable> getCARDeployables()
           
 EARInfo getEARInfo()
           
 java.util.List<EJB21Deployable> getEJB21Deployables()
           
 java.util.List<EJB3Deployable> getEJB3Deployables()
           
 java.util.List<EJBDeployable> getEJBDeployables()
           
 java.util.List<LibDeployable> getLibDeployables()
           
 java.util.List<RARDeployable> getRARDeployables()
           
protected  java.lang.String getRelativeNameFromDeployable(EZBDeployable deployable)
          Return the relative name of the deployable from the EAR deployable.
 java.util.List<WARDeployable> getWARDeployables()
           
protected  void setContextRoot(WARDeployable warDeployable)
          Set the name of the context-root for the given WAR by checking the EAR information (if any).
 
Methods inherited from class org.objectweb.easybeans.deployable.impl.AbsDeployable
getArchive, getOriginalDeployable, getUnpackedDeployable, setOriginalDeployable, setUnpackedDeployable, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.easybeans.deployer.api.EZBDeployable
getArchive, getOriginalDeployable, getUnpackedDeployable, setUnpackedDeployable
 

Field Detail

APPLICATION_XML_ENTRY

private static final java.lang.String APPLICATION_XML_ENTRY
Application.xml file entry in the EAR file.

See Also:
Constant Field Values

DEFAULT_LIBRARY_FOLDER

private static final java.lang.String DEFAULT_LIBRARY_FOLDER
Default library folder of an EAR.

See Also:
Constant Field Values

logger

private JLog logger
Logger.


earInfo

private EARInfoImpl earInfo
Info of the application.xml file of this EAR.


ejb21Deployables

private java.util.List<EJB21Deployable> ejb21Deployables
List of EJB 2.1 Deployables.


ejb3Deployables

private java.util.List<EJB3Deployable> ejb3Deployables
List of EJB 3 Deployables.


warDeployables

private java.util.List<WARDeployable> warDeployables
List of War Deployables.


rarDeployables

private java.util.List<RARDeployable> rarDeployables
List of War Deployables.


carDeployables

private java.util.List<CARDeployable> carDeployables
List of War Deployables.


libDeployables

private java.util.List<LibDeployable> libDeployables
List of Libraries Deployables.

Constructor Detail

EARDeployableImpl

public EARDeployableImpl(EZBArchive archive)
Defines and create a deployable for the given archive.

Parameters:
archive - the given archive.
Method Detail

analyzeDD

private void analyzeDD()
Analyze the META-INF/application.xml entry if it is present.


getEJBDeployables

public java.util.List<EJBDeployable> getEJBDeployables()
Specified by:
getEJBDeployables in interface EARDeployable
Returns:
the list of the EJB deployables for this EAR.

getEJB21Deployables

public java.util.List<EJB21Deployable> getEJB21Deployables()
Specified by:
getEJB21Deployables in interface EARDeployable
Returns:
the list of the EJB 2.1 deployables for this EAR.

getEJB3Deployables

public java.util.List<EJB3Deployable> getEJB3Deployables()
Specified by:
getEJB3Deployables in interface EARDeployable
Returns:
the list of the EJB 3 deployables for this EAR.

getWARDeployables

public java.util.List<WARDeployable> getWARDeployables()
Specified by:
getWARDeployables in interface EARDeployable
Returns:
the list of the War deployables for this EAR.

getRARDeployables

public java.util.List<RARDeployable> getRARDeployables()
Specified by:
getRARDeployables in interface EARDeployable
Returns:
the list of the Rar deployables for this EAR.

getCARDeployables

public java.util.List<CARDeployable> getCARDeployables()
Specified by:
getCARDeployables in interface EARDeployable
Returns:
the list of the Car deployables for this EAR.

getLibDeployables

public java.util.List<LibDeployable> getLibDeployables()
Specified by:
getLibDeployables in interface EARDeployable
Returns:
the list of the Library deployables for this EAR.

addDeployable

public void addDeployable(EZBDeployable deployable)
Add the given Deployable to this EAR deployable.

Parameters:
deployable - the given deployable object to add

checkLibDeployable

protected EZBDeployable checkLibDeployable(EZBDeployable deployable)
If it is a library, change the type of the deployable.

Parameters:
deployable - the module of this EAR
Returns:
the new deployable if it is a library module.

getRelativeNameFromDeployable

protected java.lang.String getRelativeNameFromDeployable(EZBDeployable deployable)
Return the relative name of the deployable from the EAR deployable.

Parameters:
deployable - the module of the EAR
Returns:
the relative name

setContextRoot

protected void setContextRoot(WARDeployable warDeployable)
Set the name of the context-root for the given WAR by checking the EAR information (if any).

Parameters:
warDeployable - the given war to analyze

getEARInfo

public EARInfo getEARInfo()
Specified by:
getEARInfo in interface EARDeployable
Returns:
EAR information (of the application.xml file).