org.ow2.util.ee.deploy.impl.deployable
Class EARDeployableImpl

java.lang.Object
  extended by org.ow2.util.ee.deploy.impl.deployable.AbsDeployable<org.ow2.util.ee.deploy.api.deployable.EARDeployable>
      extended by org.ow2.util.ee.deploy.impl.deployable.EARDeployableImpl
All Implemented Interfaces:
org.ow2.util.ee.deploy.api.deployable.EARDeployable, org.ow2.util.ee.deploy.api.deployable.IDeployable<org.ow2.util.ee.deploy.api.deployable.EARDeployable>

public class EARDeployableImpl
extends AbsDeployable<org.ow2.util.ee.deploy.api.deployable.EARDeployable>
implements org.ow2.util.ee.deploy.api.deployable.EARDeployable

Implementation for an EAR.

Author:
Florent Benoit

Constructor Summary
EARDeployableImpl(org.ow2.util.ee.deploy.api.archive.IArchive archive)
          Defines and create a deployable for the given archive.
 
Method Summary
 void addDeployable(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          Add the given Deployable to this EAR deployable.
protected  org.ow2.util.ee.deploy.api.deployable.IDeployable<?> checkLibDeployable(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          If it is a library, change the type of the deployable.
 java.util.List<org.ow2.util.ee.deploy.api.deployable.IDeployable> getAllDeployables()
           
 java.util.List<org.ow2.util.ee.deploy.api.deployable.CARDeployable> getCARDeployables()
           
 org.ow2.util.ee.deploy.api.deployable.IDeployable getDeployable(java.net.URL url)
           
 org.ow2.util.ee.deploy.api.deployment.ear.IEARInfo getEARInfo()
           
 java.util.List<org.ow2.util.ee.deploy.api.deployable.EJB21Deployable> getEJB21Deployables()
           
 java.util.List<org.ow2.util.ee.deploy.api.deployable.EJB3Deployable> getEJB3Deployables()
           
 java.util.List<org.ow2.util.ee.deploy.api.deployable.EJBDeployable<?>> getEJBDeployables()
           
 java.util.List<org.ow2.util.ee.deploy.api.deployable.LibDeployable> getLibDeployables()
           
 java.util.List<org.ow2.util.ee.deploy.api.deployable.RARDeployable> getRARDeployables()
           
protected  java.lang.String getRelativeNameFromDeployable(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          Return the relative name of the deployable from the EAR deployable.
 java.util.List<org.ow2.util.ee.deploy.api.deployable.WARDeployable> getWARDeployables()
           
protected  void setContextRoot(org.ow2.util.ee.deploy.api.deployable.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.ow2.util.ee.deploy.impl.deployable.AbsDeployable
addExtension, getArchive, getExtension, 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.ow2.util.ee.deploy.api.deployable.IDeployable
addExtension, getArchive, getExtension, getOriginalDeployable, getUnpackedDeployable, setOriginalDeployable, setUnpackedDeployable
 

Constructor Detail

EARDeployableImpl

public EARDeployableImpl(org.ow2.util.ee.deploy.api.archive.IArchive archive)
Defines and create a deployable for the given archive.

Parameters:
archive - the given archive.
Method Detail

getEJBDeployables

public java.util.List<org.ow2.util.ee.deploy.api.deployable.EJBDeployable<?>> getEJBDeployables()
Specified by:
getEJBDeployables in interface org.ow2.util.ee.deploy.api.deployable.EARDeployable
Returns:
the list of the EJB deployables for this EAR.

getEJB21Deployables

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

getEJB3Deployables

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

getWARDeployables

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

getRARDeployables

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

getCARDeployables

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

getLibDeployables

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

addDeployable

public void addDeployable(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
Add the given Deployable to this EAR deployable.

Parameters:
deployable - the given deployable object to add

checkLibDeployable

protected org.ow2.util.ee.deploy.api.deployable.IDeployable<?> checkLibDeployable(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> 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(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> 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(org.ow2.util.ee.deploy.api.deployable.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 org.ow2.util.ee.deploy.api.deployment.ear.IEARInfo getEARInfo()
Specified by:
getEARInfo in interface org.ow2.util.ee.deploy.api.deployable.EARDeployable
Returns:
EAR information (of the application.xml file).

getAllDeployables

public java.util.List<org.ow2.util.ee.deploy.api.deployable.IDeployable> getAllDeployables()
Specified by:
getAllDeployables in interface org.ow2.util.ee.deploy.api.deployable.EARDeployable
Returns:
the list of all deployables for this EAR.

getDeployable

public org.ow2.util.ee.deploy.api.deployable.IDeployable getDeployable(java.net.URL url)
Specified by:
getDeployable in interface org.ow2.util.ee.deploy.api.deployable.EARDeployable
Parameters:
url - of the wanted deployable
Returns:
deployable corresponding to the url


Copyright © 2007 OW2 Consortium. All Rights Reserved.