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.

Version:
$Revision: $
Author:
Aslak Knutsen

Method Summary
 T addWebResource(Asset resource, ArchivePath target)
          Adds the Asset as a Web resource to the container, returning the container itself.
 T addWebResource(Asset resource, String target)
          Adds the Asset as a Web resource to the container, returning the container itself.
 T addWebResource(File resource)
          Adds the File as a Web resource to the container, returning the container itself.
 T addWebResource(File resource, ArchivePath target)
          Adds the File as a Web resource to the container, returning the container itself.
 T addWebResource(File resource, String target)
          Adds the File as a Web resource to the container, returning the container itself.
 T addWebResource(String resourceName)
          Adds the resource as a Web resource to the container, returning the container itself.
 T addWebResource(String resourceName, ArchivePath target)
          Adds the resource as a Web resource to the container, returning the container itself.
 T addWebResource(String resourceName, String target)
          Adds the resource as a Web resource to the container, returning the container itself.
 T addWebResource(URL resource, ArchivePath target)
          Adds the URL as a Web resource to the container, returning the container itself.
 T addWebResource(URL resource, String target)
          Adds the URL as a Web resource to the container, returning the container itself.
 T setWebXML(Asset resource)
          Adds the Asset as web.xml to the container, returning the container itself.
 T setWebXML(File resource)
          Adds the File as web.xml to the container, returning the container itself.
 T setWebXML(String resourceName)
          Adds the resource as web.xml to the container, returning the container itself.
 T setWebXML(URL resource)
          Adds the URL as web.xml to the container, returning the container itself.
 

Method Detail

setWebXML

T setWebXML(String resourceName)
                               throws IllegalArgumentException
Adds the resource as web.xml to the container, returning the container itself.
The ClassLoader used to obtain the resource is up to the implementation.

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

setWebXML

T setWebXML(File resource)
                               throws IllegalArgumentException
Adds the File as web.xml to the container, returning the container itself.

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

setWebXML

T setWebXML(URL resource)
                               throws IllegalArgumentException
Adds the URL as web.xml to the container, returning the container itself.

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

setWebXML

T setWebXML(Asset resource)
                               throws IllegalArgumentException
Adds the Asset as web.xml to the container, returning the container itself.

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

addWebResource

T addWebResource(String resourceName)
                                    throws IllegalArgumentException
Adds the resource as a Web resource to the container, returning the container itself.
The resource will be placed into the Container Web path under the same context from which it was retrieved.

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

Parameters:
resourceName - resource to add
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(File resource)
                                    throws IllegalArgumentException
Adds the File as a Web resource to the container, returning the container itself.
The File will be placed into the Container Web path under File.getName().

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

addWebResource

T addWebResource(String resourceName,
                 String target)
                                    throws IllegalArgumentException
Adds the resource as a Web resource to the container, returning the container itself.
The ClassLoader used to obtain the resource is up to the implementation.

Parameters:
resourceName - resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(File resource,
                 String target)
                                    throws IllegalArgumentException
Adds the File as a Web resource to the container, returning the container itself.

Parameters:
resource - File resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(URL resource,
                 String target)
                                    throws IllegalArgumentException
Adds the URL as a Web resource to the container, returning the container itself.

Parameters:
resource - URL resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(Asset resource,
                 String target)
                                    throws IllegalArgumentException
Adds the Asset as a Web resource to the container, returning the container itself.

Parameters:
resource - Asset resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(String resourceName,
                 ArchivePath target)
                                    throws IllegalArgumentException
Adds the resource as a Web resource to the container, returning the container itself.


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

Parameters:
resourceName - resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resourceName is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(File resource,
                 ArchivePath target)
                                    throws IllegalArgumentException
Adds the File as a Web resource to the container, returning the container itself.

Parameters:
resource - File resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(URL resource,
                 ArchivePath target)
                                    throws IllegalArgumentException
Adds the URL as a Web resource to the container, returning the container itself.

Parameters:
resource - URL resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
IllegalArgumentException - if target is null
See Also:
addWebResource(Asset, ArchivePath)

addWebResource

T addWebResource(Asset resource,
                 ArchivePath target)
                                    throws IllegalArgumentException
Adds the Asset as a Web resource to the container, returning the container itself.

Parameters:
resource - Asset resource to add
target - The target path within the archive in which to add the resource, relative to the Archives web path.
Returns:
This virtual archive
Throws:
IllegalArgumentException - if resource is null
IllegalArgumentException - if target is null


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