ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

org.jboss.shrinkwrap.impl.base.container
Class EnterpriseContainerBase<T extends Archive<T>>

java.lang.Object
  extended by org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
      extended by org.jboss.shrinkwrap.impl.base.container.ContainerBase<T>
          extended by org.jboss.shrinkwrap.impl.base.container.EnterpriseContainerBase<T>
Type Parameters:
T -
All Implemented Interfaces:
Archive<T>, Assignable, ClassContainer<T>, EnterpriseContainer<T>, LibraryContainer<T>, ManifestContainer<T>, ResourceContainer<T>, ServiceProviderContainer<T>, ArchiveFormatAssociable
Direct Known Subclasses:
EnterpriseArchiveImpl

public abstract class EnterpriseContainerBase<T extends Archive<T>>
extends ContainerBase<T>
implements EnterpriseContainer<T>

EnterpriseContainerSupport Abstract class that helps implement the EnterpriseContainer. Used by specs that extends the EnterpriseContainer.

Version:
$Revision: $
Author:
Aslak Knutsen

Field Summary
 
Fields inherited from interface org.jboss.shrinkwrap.api.container.ManifestContainer
DEFAULT_MANIFEST_NAME
 
Constructor Summary
protected EnterpriseContainerBase(Class<T> actualType, Archive<?> archive)
           
 
Method Summary
 T addAsApplicationResource(Asset resource, ArchivePath target)
          Adds a Asset to this Archives application context.
 T addAsApplicationResource(Asset resource, String target)
          Adds a Asset to this Archives application context.
 T addAsApplicationResource(File resource)
          Adds a File to this Archives application context.
 T addAsApplicationResource(File resource, ArchivePath target)
          Adds a File to this Archives application context.
 T addAsApplicationResource(File resource, String target)
          Adds a File to this Archives application context.
 T addAsApplicationResource(Package resourcePackage, String resourceName)
          Adds the resource as a resource to the container, returning the container itself.
 T addAsApplicationResource(Package resourcePackage, String resourceName, ArchivePath target)
          Adds the resource as a resource to a specific path inside the container, returning the container itself.
 T addAsApplicationResource(Package resourcePackage, String resourceName, String target)
          Adds the resource as a resource to a specific path inside the container, returning the container itself.
 T addAsApplicationResource(String resourceName)
          Adds a resource to this Archives application context.
 T addAsApplicationResource(String resourceName, ArchivePath target)
          Adds a resource to this Archives application context.
 T addAsApplicationResource(String resourceName, String target)
          Adds a resource to this Archives application context.
 T addAsApplicationResource(URL resource, ArchivePath target)
          Adds a URL to this Archives application context.
 T addAsApplicationResource(URL resource, String target)
          Adds a URL to this Archives application context.
 T addAsApplicationResources(Package resourcePackage, String... resourceNames)
          Adds the resources inside the package as multiple resources to the container, returning the container itself.
 T addAsModule(Archive<?> archive)
          Adds a archive to this Archives module context.
 T addAsModule(Asset resource, ArchivePath targetPath)
          Adds a Asset to this Archives module context.
 T addAsModule(Asset resource, String targetPath)
          Adds a Asset to this Archives module context.
 T addAsModule(File resource)
          Adds a File to this Archives module context.
 T addAsModule(File resource, ArchivePath targetPath)
          Adds a File to this Archives module context.
 T addAsModule(File resource, String targetPath)
          Adds a File to this Archives module context.
 T addAsModule(String resourceName)
          Adds a resource to this Archives module context.
 T addAsModule(String resourceName, ArchivePath targetPath)
          Adds a resource to this Archives module context.
 T addAsModule(String resourceName, String targetPath)
          Adds a resource to this Archives module context.
 T addAsModule(URL resource, ArchivePath targetPath)
          Adds a URL to this Archives module context.
 T addAsModule(URL resource, String targetPath)
          Adds a URL to this Archives module context.
 T addAsModules(Archive<?>... archives)
          Adds the specified archives to this Archives module context.
 T addAsModules(File... resources)
          Adds the specified Files to this Archives module context.
 T addAsModules(String... resourceNames)
          Adds the specified resources to this Archives module context.
protected abstract  ArchivePath getApplicationPath()
          Should be implemented to set the path for Application related resources.
protected abstract  ArchivePath getModulePath()
          Should be implemented to set the path for Module related resources.
 T setApplicationXML(Asset resource)
          Adds a Asset to this Archive as application.xml.
 T setApplicationXML(File resource)
          Adds a File to this Archive as application.xml.
 T setApplicationXML(Package resourcePackage, String resourceName)
          Adds a resource inside the package to this Archive as application.xml.
 T setApplicationXML(String resourceName)
          Adds a resource to this Archive as application.xml.
 T setApplicationXML(URL resource)
          Adds a URL to this Archive as application.xml.
 
Methods inherited from class org.jboss.shrinkwrap.impl.base.container.ContainerBase
add, add, add, add, add, add, add, addAsDirectories, addAsDirectories, addAsDirectory, addAsDirectory, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResources, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResources, addAsServiceProvider, addAsServiceProviderAndClasses, addClass, addClass, addClass, addClasses, addDefaultPackage, addManifest, addPackage, addPackage, addPackages, addPackages, addPackages, addPackages, contains, contains, covarientReturn, delete, delete, equals, get, get, getActualClass, getArchiveFormat, getAsType, getAsType, getAsType, getAsType, getAsType, getAsType, getClassesPath, getContent, getContent, getLibraryPath, getManifestPath, getName, getResourcePath, hashCode, merge, merge, merge, merge, merge, merge, setManifest, setManifest, setManifest, setManifest, setManifest, toString, toString, toString, writeTo
 
Methods inherited from class org.jboss.shrinkwrap.impl.base.AssignableBase
as, getArchive
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
 

Constructor Detail

EnterpriseContainerBase

protected EnterpriseContainerBase(Class<T> actualType,
                                  Archive<?> archive)
Method Detail

getApplicationPath

protected abstract ArchivePath getApplicationPath()
Should be implemented to set the path for Application related resources.

Returns:
Base Path for the EnterpriseContainer application resources

setApplicationXML

public T setApplicationXML(String resourceName)
                                       throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a resource to this Archive as application.xml.

The ClassLoader used to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" could be placed in "/META-INF/application.xml"

Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
EnterpriseContainer.setApplicationXML(Asset)

setApplicationXML

public T setApplicationXML(File resource)
                                       throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a File to this Archive as application.xml.

For instance a File "test/example.xml" could be placed in "/META-INF/application.xml"

Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.setApplicationXML(Asset)

setApplicationXML

public T setApplicationXML(URL resource)
                                       throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a URL to this Archive as application.xml.

For instance a URL "http://my.com/example.xml" could be placed in "/META-INF/application.xml"

Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - URL resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.setApplicationXML(Asset)

setApplicationXML

public T setApplicationXML(Asset resource)
                                       throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a Asset to this Archive as application.xml.

Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - Asset resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null

setApplicationXML

public T setApplicationXML(Package resourcePackage,
                           String resourceName)
                                       throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a resource inside the package to this Archive as application.xml.

The ClassLoader used to obtain the resource is up to the implementation.

Specified by:
setApplicationXML in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourcePackage - The package of the resources
resourceName - The name of the resource inside resourcePackage
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourcePackage is null
See Also:
EnterpriseContainer.setApplicationXML(String)

addAsApplicationResource

public T addAsApplicationResource(String resourceName)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a resource to this Archives application context.

The ClassLoader used to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" could be placed in "/META-INF/test/example.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(File resource)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a File to this Archives application context.

For instance a File of "test/example.xml" could be placed in "/META-INF/test/example.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(String resourceName,
                                  String target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a resource to this Archives application context.

The ClassLoader used to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceName - Name of the ClassLoader resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(File resource,
                                  String target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a File to this Archives application context.

For instance a File of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - File resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(URL resource,
                                  String target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a URL to this Archives application context.


For instance a URL of "http://my.com/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - URL resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(Asset resource,
                                  String target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a Asset to this Archives application context.

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - Asset resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(String resourceName,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a resource to this Archives application context.

The ClassLoader used to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceName - Name of the ClassLoader resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(File resource,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a File to this Archives application context.

For instance a File of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - File resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(URL resource,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a URL to this Archives application context.

For instance a File of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - URL resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)

addAsApplicationResource

public T addAsApplicationResource(Asset resource,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a Asset to this Archives application context.

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - Asset resource to add
target - The target relative to application path within the archive into which we'll place the resource
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null

addAsApplicationResources

public T addAsApplicationResources(Package resourcePackage,
                                   String... resourceNames)
                                               throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds the resources inside the package as multiple resources to the container, returning the container itself.

The ClassLoader used to obtain the resource is up to the implementation.

Specified by:
addAsApplicationResources in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourcePackage - The package of the resources
resourceNames - The names of the resources inside resoucePackage
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourcePackage is null

addAsApplicationResource

public T addAsApplicationResource(Package resourcePackage,
                                  String resourceName)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds the resource as a resource to the container, returning the container itself.

The ClassLoader used to obtain the resource is up to the implementation.

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourcePackage - The package of the resource
resourceName - The name of the resource inside resoucePackage
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourcePackage is null

addAsApplicationResource

public T addAsApplicationResource(Package resourcePackage,
                                  String resourceName,
                                  String target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds the resource as a resource to a specific path inside the container, returning the container itself.

The ClassLoader used to obtain the resource is up to the implementation.

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourcePackage - The package of the resource
resourceName - The name of the resource inside resoucePackage
target - The target location inside the container
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourcePackage is null

addAsApplicationResource

public T addAsApplicationResource(Package resourcePackage,
                                  String resourceName,
                                  ArchivePath target)
                                              throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds the resource as a resource to a specific path inside the container, returning the container itself.

The ClassLoader used to obtain the resource is up to the implementation.

Specified by:
addAsApplicationResource in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourcePackage - The package of the resource
resourceName - The name of the resource inside resoucePackage
target - The target location inside the container
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourcePackage is null

getModulePath

protected abstract ArchivePath getModulePath()
Should be implemented to set the path for Module related resources.

Returns:
Base Path for the EnterpriseContainer module resources

addAsModule

public T addAsModule(Archive<?> archive)
                                 throws IllegalArgumentException
Adds a archive to this Archives module context.

The Archive name is used as path.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
archive - The archive to use
Returns:
This virtual archive
Throws:
IllegalArgumentException - if archive is null
See Also:
EnterpriseContainer.addAsModule(org.jboss.shrinkwrap.api.Archive)

addAsModule

public T addAsModule(String resourceName)
Adds a resource to this Archives module context.
The resource name is used as path.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
See Also:
EnterpriseContainer.addAsModule(java.lang.String)

addAsModule

public T addAsModule(File resource)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a File to this Archives module context.
The File name is used as path.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModules

public T addAsModules(Archive<?>... archives)
                                  throws IllegalArgumentException
Adds the specified archives to this Archives module context.

The Archive names are used as paths.

Specified by:
addAsModules in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
archives - The archives to use
Returns:
This virtual archive
Throws:
IllegalArgumentException - if not archives are specified
See Also:
EnterpriseContainer.addAsModules(org.jboss.shrinkwrap.api.Archive[])

addAsModules

public T addAsModules(String... resourceNames)
                                  throws IllegalArgumentException
Adds the specified resources to this Archives module context.
The resource names are used as paths.

Specified by:
addAsModules in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceNames - Names of the ClassLoader resources to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceNames are not specified
See Also:
EnterpriseContainer.addAsModules(java.lang.String[])

addAsModules

public T addAsModules(File... resources)
                                  throws IllegalArgumentException
Adds the specified Files to this Archives module context.
The File names are used as paths.

Specified by:
addAsModules in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resources - File resources to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resources are not specified
See Also:
EnterpriseContainer.addAsModules(java.io.File[])

addAsModule

public T addAsModule(File resource,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a File to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - File resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModule

public T addAsModule(String resourceName,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a resource to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceName - Name of the ClassLoader resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModule

public T addAsModule(URL resource,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a URL to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - URL resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModule

public T addAsModule(File resource,
                     String targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a File to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - File resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModule

public T addAsModule(Asset resource,
                     String targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a Asset to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - Asset resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModule

public T addAsModule(String resourceName,
                     String targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a resource to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resourceName - Name of the ClassLoader resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModule

public T addAsModule(URL resource,
                     String targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a URL to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - URL resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)

addAsModule

public T addAsModule(Asset resource,
                     ArchivePath targetPath)
                                 throws IllegalArgumentException
Description copied from interface: EnterpriseContainer
Adds a Asset to this Archives module context.

Specified by:
addAsModule in interface EnterpriseContainer<T extends Archive<T>>
Parameters:
resource - URL resource to add
targetPath - The target path within the archive in which to add the resource, relative to the Archives module path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if targetPath is null

ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.