org.ow2.util.ee.deploy.impl.deployable
Class AbsDeployable<T extends IDeployable<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:
IDeployable<T>
Direct Known Subclasses:
CARDeployableImpl, EARDeployableImpl, EJB21DeployableImpl, EJB3DeployableImpl, LibDeployableImpl, OSGiDeployableImpl, RARDeployableImpl, UnknownDeployableImpl, WARDeployableImpl

public abstract class AbsDeployable<T extends IDeployable<T>>
extends Object
implements IDeployable<T>

Defines the common stuff for the deployable objects.

Author:
Florent Benoit

Constructor Summary
AbsDeployable(IArchive archive)
          Defines and create a deployable for the given archive.
 
Method Summary
 void addExtension(IDeployableInfo extension)
          Adds a deployable info that can be used by a deployer.
 boolean equals(Object object)
           
 IArchive getArchive()
          Gets the Archive of this deployable object.
 IDeployableInfo getExtension(Class<? extends IDeployableInfo> extensionClass)
          Gets the extension for the given class.
 String getModuleName()
          Gets the module name for this deployable.
 T getOriginalDeployable()
          If the Deployable has been unpacked, return the initial deployable.
 String getShortName()
          Gets a shorter name for this 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsDeployable

public AbsDeployable(IArchive archive)
Defines and create a deployable for the given archive.

Parameters:
archive - the given archive.
Method Detail

getArchive

public IArchive getArchive()
Gets the Archive of this deployable object.

Specified by:
getArchive in interface IDeployable<T extends IDeployable<T>>
Returns:
the archive for this deployable.

toString

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

getOriginalDeployable

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

Specified by:
getOriginalDeployable in interface IDeployable<T extends 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 IDeployable<T extends 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 IDeployable<T extends 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 IDeployable<T extends IDeployable<T>>
Parameters:
unpackedDeployable - the unpacked deployable associated to this deployable.

addExtension

public void addExtension(IDeployableInfo extension)
Adds a deployable info that can be used by a deployer.

Specified by:
addExtension in interface IDeployable<T extends IDeployable<T>>
Parameters:
extension - the implementation of the extension to register.

getExtension

public IDeployableInfo getExtension(Class<? extends IDeployableInfo> extensionClass)
Gets the extension for the given class.

Specified by:
getExtension in interface IDeployable<T extends IDeployable<T>>
Parameters:
extensionClass - the class to used as a key
Returns:
the extension else null if not found.

getShortName

public String getShortName()
Gets a shorter name for this deployable.

Specified by:
getShortName in interface IDeployable<T extends IDeployable<T>>
Returns:
a shorter name based on the URL.

getModuleName

public String getModuleName()
Gets the module name for this deployable.

Specified by:
getModuleName in interface IDeployable<T extends IDeployable<T>>
Returns:
the module name of this deployable

equals

public boolean equals(Object object)
Overrides:
equals in class Object


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.