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

public abstract class AbsDeployable<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
extends 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.archive.api.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.
 boolean equals(Object object)
           
 org.ow2.util.archive.api.IArchive getArchive()
          Gets the Archive of this deployable object.
 org.ow2.util.ee.deploy.api.deployable.IDeployableInfo getExtension(Class<? extends org.ow2.util.ee.deploy.api.deployable.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(org.ow2.util.archive.api.IArchive archive)
Defines and create a deployable for the given archive.

Parameters:
archive - the given archive.
Method Detail

getArchive

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

Specified by:
getArchive in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T extends org.ow2.util.ee.deploy.api.deployable.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 org.ow2.util.ee.deploy.api.deployable.IDeployable<T extends 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 extends 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 extends 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 extends 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 extends 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(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 extends 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.

getShortName

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

Specified by:
getShortName in interface org.ow2.util.ee.deploy.api.deployable.IDeployable<T extends org.ow2.util.ee.deploy.api.deployable.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 org.ow2.util.ee.deploy.api.deployable.IDeployable<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
Returns:
the module name of this deployable

equals

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


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