org.ow2.util.ee.deploy.impl.deployer
Class AbsDeployer<T extends IDeployable<T>>

java.lang.Object
  extended by org.ow2.util.ee.deploy.impl.deployer.AbsDeployerList<T>
      extended by org.ow2.util.ee.deploy.impl.deployer.AbsDeployer<T>
All Implemented Interfaces:
IDeployer<T>

public abstract class AbsDeployer<T extends IDeployable<T>>
extends AbsDeployerList<T>

Abstract class that defines common methods for deployer.

Author:
Francois Fornaciari

Field Summary
protected  Map<URL,IDeployable<T>> deployedDeployables
          Map between an URL and the associated Deployable that has been deployed.
 
Constructor Summary
AbsDeployer()
          Default constructor.
 
Method Summary
protected  void check(IDeployable<?> deployable)
          Check if the given deployable is supported.
 void deploy(IDeployable<T> deployable)
          
 List<IDeploymentReport> deploy(List<IDeployable<T>> deployables)
          
abstract  void doDeploy(IDeployable<T> deployable)
          
 List<IDeploymentReport> doDeploy(List<IDeployable<T>> deployables)
          Deploy a list of deployable.
abstract  void doUndeploy(IDeployable<T> deployable)
          
 List<IDeploymentReport> doUndeploy(List<IDeployable<T>> deployables)
          Undeploy a list of deployable.
 Map<URL,IDeployable<T>> getDeployedDeployables()
          Returns a map between an URL and the associated deployable that has been deployed.
protected  File getFile(IDeployable<T> deployable)
          Allows to get a File from the given Deployable.
protected  URL getURL(IDeployable<T> deployable)
          Allows to get the URL from the given deployable.
 boolean isDeployed(IDeployable<T> deployable)
          Checks if the given deployable is deployed or not.
 void stop()
          Undeploy all previously deployed deployables.
abstract  boolean supports(IDeployable<?> deployable)
          
 void undeploy(IDeployable<T> deployable)
          
 List<IDeploymentReport> undeploy(List<IDeployable<T>> deployables)
          
 
Methods inherited from class org.ow2.util.ee.deploy.impl.deployer.AbsDeployerList
supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deployedDeployables

protected Map<URL,IDeployable<T extends IDeployable<T>>> deployedDeployables
Map between an URL and the associated Deployable that has been deployed.

Constructor Detail

AbsDeployer

public AbsDeployer()
Default constructor.

Method Detail

doDeploy

public abstract void doDeploy(IDeployable<T> deployable)
                       throws DeployerException

Throws:
DeployerException

doUndeploy

public abstract void doUndeploy(IDeployable<T> deployable)
                         throws DeployerException

Throws:
DeployerException

supports

public abstract boolean supports(IDeployable<?> deployable)


deploy

public void deploy(IDeployable<T> deployable)
            throws DeployerException

Throws:
DeployerException

undeploy

public void undeploy(IDeployable<T> deployable)
              throws DeployerException

Throws:
DeployerException

stop

public void stop()
Undeploy all previously deployed deployables.


getURL

protected URL getURL(IDeployable<T> deployable)
              throws DeployerException
Allows to get the URL from the given deployable.

Parameters:
deployable - the given deployable.
Returns:
an URL object of this deployable
Throws:
DeployerException - if the URL can't be obtained.

getFile

protected File getFile(IDeployable<T> deployable)
                throws DeployerException
Allows to get a File from the given Deployable.

Parameters:
deployable - the given deployable.
Returns:
a File object of this deployable
Throws:
DeployerException - if the File can't be obtained.

isDeployed

public boolean isDeployed(IDeployable<T> deployable)
                   throws DeployerException
Checks if the given deployable is deployed or not.

Parameters:
deployable - test if a given deployable is already deployed.
Returns:
true if the deployable is deployed.
Throws:
DeployerException - if the undeploy operation fails.

getDeployedDeployables

public Map<URL,IDeployable<T>> getDeployedDeployables()
Returns a map between an URL and the associated deployable that has been deployed.

Returns:
A map between an URL and the associated deployable that has been deployed.

check

protected void check(IDeployable<?> deployable)
              throws DeployerException
Check if the given deployable is supported.

Parameters:
deployable - the deployable to check.
Throws:
DeployerException - if the deployable is not supported.

deploy

public List<IDeploymentReport> deploy(List<IDeployable<T>> deployables)

Specified by:
deploy in interface IDeployer<T extends IDeployable<T>>
Overrides:
deploy in class AbsDeployerList<T extends IDeployable<T>>

doDeploy

public List<IDeploymentReport> doDeploy(List<IDeployable<T>> deployables)
Deploy a list of deployable.

Parameters:
deployables - The list of deployable
Returns:
the list of IDeploymentReport

undeploy

public List<IDeploymentReport> undeploy(List<IDeployable<T>> deployables)

Specified by:
undeploy in interface IDeployer<T extends IDeployable<T>>
Overrides:
undeploy in class AbsDeployerList<T extends IDeployable<T>>

doUndeploy

public List<IDeploymentReport> doUndeploy(List<IDeployable<T>> deployables)
Undeploy a list of deployable.

Parameters:
deployables - The list of deployable to undeploy
Returns:
the list of IDeploymentReport


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