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

Type Parameters:
T -
All Known Subinterfaces:
WebArchive

public interface WebContainer<T extends Archive<T>>

WebContainer Defines the contract for a component capable of storing Web related resources.

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


Method Summary
 T addWebResource(java.io.File resource)
           
 T addWebResource(Path target, Asset resource)
           
 T addWebResource(Path target, java.io.File resource)
           
 T addWebResource(Path target, java.lang.String resourceName)
          Adds the resource with the specified name to the container, returning the container itself.
 T addWebResource(Path target, java.net.URL resource)
           
 T addWebResource(java.lang.String resourceName)
          Adds the resource with the specified name to the container, returning the container itself.
 T addWebResource(java.lang.String target, Asset resource)
           
 T addWebResource(java.lang.String target, java.io.File resource)
           
 T addWebResource(java.lang.String target, java.lang.String resourceName)
           
 T addWebResource(java.lang.String target, java.net.URL resource)
           
 T setWebXML(Asset resource)
          Adds a resource to this Archive as /WEB-INF/web.xml.
 T setWebXML(java.io.File resource)
          Adds a resource to this Archive as /WEB-INF/web.xml.
 T setWebXML(java.lang.String resourceName)
          Adds a resource to this Archive as /WEB-INF/web.xml.
 T setWebXML(java.net.URL resource)
          Adds a resource to this Archive as /WEB-INF/web.xml.
 

Method Detail

setWebXML

T setWebXML(java.lang.String resourceName)
                               throws java.lang.IllegalArgumentException
Adds a resource to this Archive as /WEB-INF/web.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 "/WEB-INF/web.xml"

Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resourceName is null

setWebXML

T setWebXML(java.io.File resource)
                               throws java.lang.IllegalArgumentException
Adds a resource to this Archive as /WEB-INF/web.xml.

Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resource is null

setWebXML

T setWebXML(java.net.URL resource)
                               throws java.lang.IllegalArgumentException
Adds a resource to this Archive as /WEB-INF/web.xml.

Parameters:
resource - URL resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resource is null

setWebXML

T setWebXML(Asset resource)
                               throws java.lang.IllegalArgumentException
Adds a resource to this Archive as /WEB-INF/web.xml.

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

addWebResource

T addWebResource(java.lang.String resourceName)
                                    throws java.lang.IllegalArgumentException
Adds the resource with the specified name to the container, returning the container itself.

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

Parameters:
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resourceName is null

addWebResource

T addWebResource(java.io.File resource)
                                    throws java.lang.IllegalArgumentException
Parameters:
resource - File resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if resource is null

addWebResource

T addWebResource(java.lang.String target,
                 java.lang.String resourceName)
                                    throws java.lang.IllegalArgumentException
Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resourceName is null

addWebResource

T addWebResource(java.lang.String target,
                 java.io.File resource)
                                    throws java.lang.IllegalArgumentException
Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resource - File resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resource is null

addWebResource

T addWebResource(java.lang.String target,
                 java.net.URL resource)
                                    throws java.lang.IllegalArgumentException
Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resource - URL resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resource is null

addWebResource

T addWebResource(java.lang.String target,
                 Asset resource)
                                    throws java.lang.IllegalArgumentException
Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resource - Asset resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resource is null

addWebResource

T addWebResource(Path target,
                 java.lang.String resourceName)
                                    throws java.lang.IllegalArgumentException
Adds the resource with the specified name to the container, returning the container itself.

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

Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resourceName - Name of the ClassLoader resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resourceName is null

addWebResource

T addWebResource(Path target,
                 java.io.File resource)
                                    throws java.lang.IllegalArgumentException
Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resource - File resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resource is null

addWebResource

T addWebResource(Path target,
                 java.net.URL resource)
                                    throws java.lang.IllegalArgumentException
Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resource - URL resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resource is null

addWebResource

T addWebResource(Path target,
                 Asset resource)
                                    throws java.lang.IllegalArgumentException
Parameters:
target - The target relative to Web path within the archive into which we'll place the resource
resource - Asset resource to add
Returns:
This virtual archive
Throws:
java.lang.IllegalArgumentException - if target is null
java.lang.IllegalArgumentException - if resource is null