org.ow2.util.ee.deploy.impl.deployable
Class AbsDeployable<T>

java.lang.Object
  extended by org.ow2.util.ee.deploy.impl.deployable.AbsDeployable<T>
Type Parameters:
T - the type of the deployable.
All Implemented Interfaces:
org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Direct Known Subclasses:
CARDeployableImpl, EARDeployableImpl, EJB21DeployableImpl, EJB3DeployableImpl, LibDeployableImpl, RARDeployableImpl, UnknownDeployableImpl, WARDeployableImpl

public abstract class AbsDeployable<T>
extends java.lang.Object
implements org.ow2.util.ee.deploy.api.deployable.IDeployable<T>

Defines the common stuff for the deployable objects.

Author:
Florent Benoit

Constructor Summary
AbsDeployable(org.ow2.util.ee.deploy.api.archive.IArchive archive)
          Defines and create a deployable for the given archive.
 
Method Summary
 void addExtension(org.ow2.util.ee.deploy.api.deployable.IDeployableInfo extension)
          Adds a deployable info that can be used by a deployer.
 org.ow2.util.ee.deploy.api.archive.IArchive getArchive()
          Gets the Archive of this deployable object.
 org.ow2.util.ee.deploy.api.deployable.IDeployableInfo getExtension(java.lang.Class<? extends org.ow2.util.ee.deploy.api.deployable.IDeployableInfo> extensionClass)
          Gets the extension for the given class.
 T getOriginalDeployable()
          If the Deployable has been unpacked, return the initial deployable.
 T getUnpackedDeployable()
          If the Deployable has been unpacked, return the unpacked deployable.
 void setOriginalDeployable(T originalDeployable)
          If the EAR has been unpacked, return the initial archive.
 void setUnpackedDeployable(T unpackedDeployable)
          If the Deployable has been unpacked, sets the unpacked deployable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsDeployable

public AbsDeployable(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

getArchive

public org.ow2.util.ee.deploy.api.archive.IArchive getArchive()
Gets the Archive of this deployable object.

Specified by:
getArchive in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Returns:
the archive for this deployable.

toString

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

getOriginalDeployable

public T getOriginalDeployable()
If the Deployable has been unpacked, return the initial deployable.

Specified by:
getOriginalDeployable in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Returns:
the deployable before it is unpacked.

setOriginalDeployable

public void setOriginalDeployable(T originalDeployable)
If the EAR has been unpacked, return the initial archive.

Specified by:
setOriginalDeployable in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Parameters:
originalDeployable - the deployable before it is unpacked.

getUnpackedDeployable

public T getUnpackedDeployable()
If the Deployable has been unpacked, return the unpacked deployable.

Specified by:
getUnpackedDeployable in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Returns:
the unpacked deployable associated to this deployable.

setUnpackedDeployable

public void setUnpackedDeployable(T unpackedDeployable)
If the Deployable has been unpacked, sets the unpacked deployable.

Specified by:
setUnpackedDeployable in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Parameters:
unpackedDeployable - the unpacked deployable associated to this deployable.

addExtension

public void addExtension(org.ow2.util.ee.deploy.api.deployable.IDeployableInfo extension)
Adds a deployable info that can be used by a deployer.

Specified by:
addExtension in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Parameters:
extension - the implementation of the extension to register.

getExtension

public org.ow2.util.ee.deploy.api.deployable.IDeployableInfo getExtension(java.lang.Class<? extends org.ow2.util.ee.deploy.api.deployable.IDeployableInfo> extensionClass)
Gets the extension for the given class.

Specified by:
getExtension in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T>
Parameters:
extensionClass - the class to used as a key
Returns:
the extension else null if not found.


Copyright © 2007 OW2 Consortium. All Rights Reserved.