org.jboss.shrinkwrap.api.container
Interface EnterpriseContainer<T extends Archive<T>>

All Known Subinterfaces:
EnterpriseArchive

public interface EnterpriseContainer<T extends Archive<T>>

EnterpriseContainer Defines the contract for a component capable of storing Enterprise related resources.

The actual path to the Enterprise resources within the Archive is up to the implementations/specifications.

Version:
$Revision: $
Author:
Aslak Knutsen

Method Summary
 T addApplicationResource(Asset resource, Path target)
          Adds a Asset to this Archives application context.
 T addApplicationResource(Asset resource, String target)
          Adds a Asset to this Archives application context.
 T addApplicationResource(File resource)
          Adds a File to this Archives application context.
 T addApplicationResource(File resource, Path target)
          Adds a File to this Archives application context.
 T addApplicationResource(File resource, String target)
          Adds a File to this Archives application context.
 T addApplicationResource(String resourceName)
          Adds a resource to this Archives application context.
 T addApplicationResource(String resourceName, Path target)
          Adds a resource to this Archives application context.
 T addApplicationResource(String resourceName, String target)
          Adds a resource to this Archives application context.
 T addApplicationResource(URL resource, Path target)
          Adds a URL to this Archives application context.
 T addApplicationResource(URL resource, String target)
          Adds a URL to this Archives application context.
 T addModule(Archive<?> archive)
          Adds a archive to this Archives module context.
 T addModule(Asset resource, Path targetPath)
          Adds a Asset to this Archives module context.
 T addModule(Asset resource, String targetPath)
          Adds a Asset to this Archives module context.
 T addModule(File resource)
          Adds a File to this Archives module context.
 T addModule(File resource, Path targetPath)
          Adds a File to this Archives module context.
 T addModule(File resource, String targetPath)
          Adds a File to this Archives module context.
 T addModule(String resourceName)
          Adds a resource to this Archives module context.
 T addModule(String resourceName, Path targetPath)
          Adds a resource to this Archives module context.
 T addModule(String resourceName, String targetPath)
          Adds a resource to this Archives module context.
 T addModule(URL resource, Path targetPath)
          Adds a URL to this Archives module context.
 T addModule(URL resource, String targetPath)
          Adds a URL to this Archives module context.
 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(String resourceName)
          Adds a resource to this Archive as application.xml.
 T setApplicationXML(URL resource)
          Adds a URL to this Archive as application.xml.
 

Method Detail

setApplicationXML

T setApplicationXML(String resourceName)
                                       throws IllegalArgumentException
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"

Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
setApplicationXML(Asset)

setApplicationXML

T setApplicationXML(File resource)
                                       throws IllegalArgumentException
Adds a File to this Archive as application.xml.

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

Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
setApplicationXML(Asset)

setApplicationXML

T setApplicationXML(URL resource)
                                       throws IllegalArgumentException
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"

Parameters:
resource - URL resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
setApplicationXML(Asset)

setApplicationXML

T setApplicationXML(Asset resource)
                                       throws IllegalArgumentException
Adds a Asset to this Archive as application.xml.

Parameters:
resource - Asset resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null

addApplicationResource

T addApplicationResource(String resourceName)
                                            throws IllegalArgumentException
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"

Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(File resource)
                                            throws IllegalArgumentException
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"

Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(String resourceName,
                         String target)
                                            throws IllegalArgumentException
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"

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
IllegalArgumentException - if target is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(File resource,
                         String target)
                                            throws IllegalArgumentException
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"

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
IllegalArgumentException - if target is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(URL resource,
                         String target)
                                            throws IllegalArgumentException
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"

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
IllegalArgumentException - if target is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(Asset resource,
                         String target)
                                            throws IllegalArgumentException
Adds a Asset to this Archives application context.

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
IllegalArgumentException - if target is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(String resourceName,
                         Path target)
                                            throws IllegalArgumentException
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"

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
IllegalArgumentException - if target is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(File resource,
                         Path target)
                                            throws IllegalArgumentException
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"

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
IllegalArgumentException - if target is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(URL resource,
                         Path target)
                                            throws IllegalArgumentException
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"

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
IllegalArgumentException - if target is null
See Also:
addApplicationResource(Asset, Path)

addApplicationResource

T addApplicationResource(Asset resource,
                         Path target)
                                            throws IllegalArgumentException
Adds a Asset to this Archives application context.

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
IllegalArgumentException - if target is null

addModule

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

The Archive name is used as path.

Parameters:
archive - The archive to use
Returns:
This virtual archive
Throws:
IllegalArgumentException - if archive is null

addModule

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

Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
See Also:
addModule(Asset, Path)

addModule

T addModule(File resource)
                               throws IllegalArgumentException
Adds a File to this Archives module context.
The File name is used as path.

Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
See Also:
addModule(Asset, Path)

addModule

T addModule(String resourceName,
            String targetPath)
                               throws IllegalArgumentException
Adds a resource to this Archives module context.

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
IllegalArgumentException - if targetPath is null
See Also:
addModule(Asset, Path)

addModule

T addModule(File resource,
            String targetPath)
                               throws IllegalArgumentException
Adds a File to this Archives module context.

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
IllegalArgumentException - if targetPath is null
See Also:
addModule(Asset, Path)

addModule

T addModule(URL resource,
            String targetPath)
                               throws IllegalArgumentException
Adds a URL to this Archives module context.

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
IllegalArgumentException - if targetPath is null
See Also:
addModule(Asset, Path)

addModule

T addModule(Asset resource,
            String targetPath)
                               throws IllegalArgumentException
Adds a Asset to this Archives module context.

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
IllegalArgumentException - if targetPath is null
See Also:
addModule(Asset, Path)

addModule

T addModule(String resourceName,
            Path targetPath)
                               throws IllegalArgumentException
Adds a resource to this Archives module context.

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
IllegalArgumentException - if targetPath is null
See Also:
addModule(Asset, Path)

addModule

T addModule(File resource,
            Path targetPath)
                               throws IllegalArgumentException
Adds a File to this Archives module context.

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
IllegalArgumentException - if targetPath is null
See Also:
addModule(Asset, Path)

addModule

T addModule(URL resource,
            Path targetPath)
                               throws IllegalArgumentException
Adds a URL to this Archives module context.

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
IllegalArgumentException - if targetPath is null
See Also:
addModule(Asset, Path)

addModule

T addModule(Asset resource,
            Path targetPath)
                               throws IllegalArgumentException
Adds a Asset to this Archives module context.

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
IllegalArgumentException - if resource is null


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