org.ow2.util.ee.deploy.impl.helper
Class UnpackDeployableHelper

java.lang.Object
  extended by org.ow2.util.ee.deploy.impl.helper.UnpackDeployableHelper

public final class UnpackDeployableHelper
extends Object

Allow to unpack a deployable and build a deployable for this type.

Author:
Florent BENOIT

Field Summary
static String DEFAULT_FOLDER
          Folder to create in tmp folder.
 
Method Summary
protected static void addFileInDeployable(File file, EARDeployableImpl earDeployableImpl, EarUnpackOpts earUnpackOpts)
          Analyze the given file by finding its deployable object and add it to the given EAR deployable.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable)
          Unpack the given archive in a temp folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable, File unpackedFolder)
          Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable, File unpackedFolder, boolean keepExistingFiles)
          Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable, File unpackedFolder, boolean keepExistingFiles, EarUnpackOpts earUnpackOpts)
          Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable, File folder, String archiveName)
          Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable, File folder, String archiveName, boolean keepExistingFiles)
          Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable, String pattern)
          Unpack the given archive in a temp folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
static
<T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>>
T
unpack(T deployable, String pattern, boolean keepExistingFiles, EarUnpackOpts earUnpackOpts)
          Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FOLDER

public static final String DEFAULT_FOLDER
Folder to create in tmp folder.

See Also:
Constant Field Values
Method Detail

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in a temp folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the Deployable can't be unpacked

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable,
                                                                                        String pattern)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in a temp folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
pattern - the path in the pattern to use in the temp folder
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the Deployable can't be unpacked

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable,
                                                                                        File folder,
                                                                                        String archiveName)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
folder - the path of the folder for unpacking the archive
archiveName - the name to use for the unpacked archived
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the Deployable can't be unpacked

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable,
                                                                                        File folder,
                                                                                        String archiveName,
                                                                                        boolean keepExistingFiles)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
folder - the path of the folder for unpacking the archive
archiveName - the name to use for the unpacked archived
keepExistingFiles - if 'true', do not override existing files
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the Deployable can't be unpacked

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable,
                                                                                        File unpackedFolder)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
unpackedFolder - the path of the folder for unpacking the archive
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the EAR can't be unpacked

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable,
                                                                                        File unpackedFolder,
                                                                                        boolean keepExistingFiles)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
unpackedFolder - the path of the folder for unpacking the archive
keepExistingFiles - if 'true', do not override existing files
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the EAR can't be unpacked

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable,
                                                                                        String pattern,
                                                                                        boolean keepExistingFiles,
                                                                                        EarUnpackOpts earUnpackOpts)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
pattern - the path in the pattern to use in the temp folder
keepExistingFiles - if 'true', do not override existing files
earUnpackOpts - options to unpack an ear
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the Deployable can't be unpacked

unpack

public static <T extends org.ow2.util.ee.deploy.api.deployable.IDeployable<T>> T unpack(T deployable,
                                                                                        File unpackedFolder,
                                                                                        boolean keepExistingFiles,
                                                                                        EarUnpackOpts earUnpackOpts)
                                                                             throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Unpack the given archive in the given folder, then build a local deployable (and fill it with submodules for EAR) and then return it.

Type Parameters:
T - an object implementing IDeployable
Parameters:
deployable - the archive to unpack.
unpackedFolder - the path of the folder for unpacking the archive
keepExistingFiles - if 'true', do not override existing files
earUnpackOpts - options to unpack an ear
Returns:
a new deployable (which is unpacked)
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the EAR can't be unpacked

addFileInDeployable

protected static void addFileInDeployable(File file,
                                          EARDeployableImpl earDeployableImpl,
                                          EarUnpackOpts earUnpackOpts)
                                   throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Analyze the given file by finding its deployable object and add it to the given EAR deployable.

Parameters:
file - the file to analyze
earDeployableImpl - the deployable on which the new deployable will be added
earUnpackOpts - options to unpack an ear
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if deployable can't be added


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