[jboss-svn-commits] JBoss Common SVN: r3704 - shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Nov 15 08:05:43 EST 2009


Author: aslak
Date: 2009-11-15 08:05:43 -0500 (Sun, 15 Nov 2009)
New Revision: 3704

Modified:
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/EnterpriseContainer.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/LibraryContainer.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ManifestContainer.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceAdapterContainer.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceContainer.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/WebContainer.java
Log:
SHRINKWRAP-71 Updated javadoc

Modified: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/EnterpriseContainer.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/EnterpriseContainer.java	2009-11-15 11:28:27 UTC (rev 3703)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/EnterpriseContainer.java	2009-11-15 13:05:43 UTC (rev 3704)
@@ -42,7 +42,7 @@
    //-------------------------------------------------------------------------------------||
 
    /**
-    * Adds a resource to this {@link Archive}s as application.xml.
+    * Adds a resource to this {@link Archive} as application.xml.
     * <br/><br/>
     * The {@link ClassLoader} used to obtain the resource is up to
     * the implementation. 
@@ -53,26 +53,38 @@
     * @param resourceName Name of the {@link ClassLoader} resource to add 
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @see #setApplicationXML(Asset)
     */
    T setApplicationXML(String resourceName) throws IllegalArgumentException;
 
    /**
+    * Adds a {@link File} to this {@link Archive} as application.xml.
+    * <br/><br/>
+    * For instance a {@link File} "test/example.xml" could be placed in 
+    * "/META-INF/application.xml"
     * 
     * @param resource {@link File} resource to add 
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @see #setApplicationXML(Asset)
     */
    T setApplicationXML(File resource) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link URL} to this {@link Archive} as application.xml.
+    * <br/><br/>
+    * For instance a {@link URL} "http://my.com/example.xml" could be placed in 
+    * "/META-INF/application.xml"
     * 
     * @param resource {@link URL} resource to add 
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @see #setApplicationXML(Asset)
     */
    T setApplicationXML(URL resource) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link Asset} to this {@link Archive} as application.xml.
     * 
     * @param resource {@link Asset} resource to add 
     * @return This virtual archive
@@ -92,55 +104,85 @@
     * @param resourceName Name of the {@link ClassLoader} resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(String resourceName) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link File} to this {@link Archive}s application context.
+    * <br/><br/>
+    * For instance a {@link File} of "test/example.xml" could be placed in 
+    * "/META-INF/test/example.xml"
     * 
     * @param resource {@link File} resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(File resource) throws IllegalArgumentException;
    
    
    /**
+    * Adds a resource to this {@link Archive}s application context.
+    * <br/><br/>
+    * The {@link ClassLoader} used to obtain the resource is up to
+    * the implementation.
+    * <br/>
+    * For instance a resourceName of "test/example.xml" and a 
+    * target of "example/myexample.xml" could be placed in 
+    * "/META-INF/example/myexample.xml"
     * 
+    * @param resourceName Name of the {@link ClassLoader} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resourceName Name of the {@link ClassLoader} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(String resourceName, String target) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link File} to this {@link Archive}s application context.
+    * <br/><br/>
+    * For instance a {@link File} of "test/example.xml" and a 
+    * target of "example/myexample.xml" could be placed in 
+    * "/META-INF/example/myexample.xml"
     * 
+    * @param resource {@link File} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resource {@link File} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(File resource, String target) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link URL} to this {@link Archive}s application context.
+    * <br/><br/>
+    * <br/>
+    * For instance a {@link URL} of "http://my.com/example.xml" and a 
+    * target of "example/myexample.xml" could be placed in 
+    * "/META-INF/example/myexample.xml"
     * 
+    * @param resource {@link URL} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resource {@link URL} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(URL resource, String target) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link Asset} to this {@link Archive}s application context.
     * 
+    * @param resource {@link Asset} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resource {@link Asset} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(Asset resource, String target) throws IllegalArgumentException;
 
@@ -154,41 +196,55 @@
     * target of "example/myexample.xml" could be placed in 
     * "/META-INF/example/myexample.xml"
     *   
+    * @param resourceName Name of the {@link ClassLoader} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resourceName Name of the {@link ClassLoader} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resourceName is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(String resourceName, Path target) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link File} to this {@link Archive}s application context.
+    * <br/><br/>
+    * For instance a {@link File} of "test/example.xml" and a 
+    * target of "example/myexample.xml" could be placed in 
+    * "/META-INF/example/myexample.xml"
     * 
+    * @param resource {@link File} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resource {@link File} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(File resource, Path target) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link URL} to this {@link Archive}s application context.
+    * <br/><br/>
+    * For instance a {@link File} of "test/example.xml" and a 
+    * target of "example/myexample.xml" could be placed in 
+    * "/META-INF/example/myexample.xml"
     * 
+    * @param resource {@link URL} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resource {@link URL} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addApplicationResource(Asset, Path)
     */
    T addApplicationResource(URL resource, Path target) throws IllegalArgumentException;
    
    /**
+    * Adds a {@link Asset} to this {@link Archive}s application context.
     * 
+    * @param resource {@link Asset} resource to add
     * @param target The target relative to application path within the archive into which we'll place the resource
-    * @param resource {@link Asset} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
     */
    T addApplicationResource(Asset resource, Path target) throws IllegalArgumentException;
 
@@ -205,84 +261,120 @@
    
    /**
     * Adds a resource to this {@link Archive}s module context.
-    * <br/><br/>
+    * <br/>
     * The resource name is used as path.
     * 
     * @param resourceName Name of the {@link ClassLoader} resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(String resourceName) throws IllegalArgumentException;
    
    /**
-    * 
+    * Adds a {@link File} to this {@link Archive}s module context.
+    * <br/>
+    * The {@link File} name is used as path.
+    *  
     * @param resource {@link File} resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(File resource) throws IllegalArgumentException;
 
    /**
     * Adds a resource to this {@link Archive}s module context.
-    * <br/><br/>
-    * The resource name is used as path.
     * 
-    * @param targetPath The target path within the archive in which to add the resource
     * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if targetPath is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(String resourceName, String targetPath) throws IllegalArgumentException;
 
    /**
+    * Adds a {@link File} to this {@link Archive}s module context.
     * 
-    * @param targetPath The target path within the archive in which to add the resource
     * @param resource {@link File} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if targetPath is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(File resource, String targetPath) throws IllegalArgumentException;
 
    /**
+    * Adds a {@link URL} to this {@link Archive}s module context.
     * 
-    * @param targetPath The target path within the archive in which to add the resource
     * @param resource {@link URL} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if targetPath is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(URL resource, String targetPath) throws IllegalArgumentException;
    
+   /**
+    * Adds a {@link Asset} to this {@link Archive}s module context.
+    * 
+    * @param resource {@link Asset} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if targetPath is null
+    * @see #addModule(Asset, Path)
+    */
    T addModule(Asset resource, String targetPath) throws IllegalArgumentException;
 
    /**
     * Adds a resource to this {@link Archive}s module context.
-    * <br/><br/>
-    * The resource name is used as path.
     * 
-    * @param targetPath The target path within the archive in which to add the resource
     * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if targetPath is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(String resourceName, Path targetPath) throws IllegalArgumentException;
 
    /**
+    * Adds a {@link File} to this {@link Archive}s module context.
     * 
-    * @param targetPath The target path within the archive in which to add the resource
     * @param resource {@link File} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if targetPath is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(File resource, Path targetPath) throws IllegalArgumentException;
 
    /**
+    * Adds a {@link URL} to this {@link Archive}s module context.
     * 
-    * @param targetPath The target path within the archive in which to add the resource
     * @param resource {@link URL} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if targetPath is null
+    * @see #addModule(Asset, Path)
     */
    T addModule(URL resource, Path targetPath) throws IllegalArgumentException;
    
+   /**
+    * Adds a {@link Asset} to this {@link Archive}s module context.
+    * 
+    * @param resource {@link URL} resource to add
+    * @param targetPath The target path within the archive in which to add the resource, relative to the {@link Archive}s module path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if targetPath is null
+    * @throws IllegalArgumentException if resource is null
+    */
    T addModule(Asset resource, Path targetPath) throws IllegalArgumentException;
 }

Modified: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/LibraryContainer.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/LibraryContainer.java	2009-11-15 11:28:27 UTC (rev 3703)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/LibraryContainer.java	2009-11-15 13:05:43 UTC (rev 3704)
@@ -42,65 +42,180 @@
    //-------------------------------------------------------------------------------------||
 
    /**
-    * Adds the resource with the specified name
-    * as a library to the container, returning the container itself.
+    * Adds the resource as a library to the container, returning the container itself.
+    * <br/>
+    * The resource will be placed into the Container Library path under the same context 
+    * from which it was retrieved.
     * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation.  The resource will be placed into 
-    * the Container Library path under the same context from which it was retrieved.
-    * <br/>
-    * For instance a resourceName of "test/library.jar" could be placed
-    * "/lib/test/library.jar".
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resourceName resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @see #addLibrary(Asset, Path)
     */
    T addLibrary(String resourceName) throws IllegalArgumentException;
    
+   /**
+    * Adds the {@link File} as a library to the container, returning the container itself.
+    * <br/>
+    * The {@link File} will be placed into the Container Library path under {@link File#getName()}. 
+    * 
+    * @param resource {@link File} resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    * @see #addLibrary(Asset, Path)
+    */
    T addLibrary(File resource) throws IllegalArgumentException;
 
+   /**
+    * Adds the resource as a library to the container, returning the container itself.
+    * <br/><br/>
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
+    * 
+    * @param resourceName resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addLibrary(Asset, Path)
+    */
    T addLibrary(String resourceName, String target) throws IllegalArgumentException;
+   
+   /**
+    * Adds the {@link File} as a library to the container, returning the container itself.
+    * 
+    * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addLibrary(Asset, Path)
+    */
    T addLibrary(File resource, String target) throws IllegalArgumentException;
+   
+   /**
+    * Adds the {@link URL} as a library to the container, returning the container itself.
+    * 
+    * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addLibrary(Asset, Path)
+    */
    T addLibrary(URL resource, String target) throws IllegalArgumentException;
+   
+   /**
+    * Adds the {@link Asset} as a library to the container, returning the container itself.
+    * 
+    * @param resource {@link Asset} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addLibrary(Asset, Path)
+    */
    T addLibrary(Asset resource, String target) throws IllegalArgumentException;
 
    /**
-    * Adds the resource with the specified name
-    * as a library to the container under the target path, returning the container itself.
+    * Adds the resource as a library to the container, returning the container itself.
     * <br/><br/>
     * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation.  The resource will be placed into 
-    * the Containers Library path under the relative target path.
-    * <br/>
-    * For instance a resourceName of "test/library.jar" and target as "/test/example.jar" could be placed in
-    * "/lib/test/example.jar".
+    * the implementation.  
     * 
-    * @param target New name of the resource in the container
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resource resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resourceName is null
+    * @see #addLibrary(Asset, Path)
     */
    T addLibrary(String resourceName, Path target) throws IllegalArgumentException;
    
+   /**
+    * Adds the {@link File} as a library to the container, returning the container itself.
+    * 
+    * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addLibrary(Asset, Path)
+    */
    T addLibrary(File resource, Path target) throws IllegalArgumentException;
+
+   /**
+    * Adds the {@link URL} as a library to the container, returning the container itself.
+    * 
+    * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addLibrary(Asset, Path)
+    */
    T addLibrary(URL resource, Path target) throws IllegalArgumentException;
-   T addLibrary(Asset resource, Path target) throws IllegalArgumentException;
 
    /**
-    * Add another {@link Archive} to this {@link Archive} as a Library.
-    * <br/><br/>
-    * For instance a Archive with name 'example.jar' could be placed in
-    * "/lib/example.jar".
+    * Adds the {@link Asset} as a library to the container, returning the container itself.
     * 
-    * @param archive The {@link Archive} to be added to the Library path
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s library path.
+    * @param resource {@link Asset} resource to add
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    */
+   T addLibrary(Asset resource, Path target) throws IllegalArgumentException;
+
+   /**
+    * Add another {@link Archive} to this {@link Archive} as a library to the container, returning the container itself.
+    * <br/>
+    * The {@link Archive} will be placed into the Container Library path under {@link Archive#getName()}.
+    *  
+    * @param archive {@link Archive} resource to add
+    * @return This virtual archive
     * @throws IllegalArgumentException if {@link Archive} is null
+    * @see #addLibrary(Asset, Path)
     */
    T addLibrary(Archive<?> archive) throws IllegalArgumentException;
    
+   /**
+    * Add multiple resources to this {@link Archive} as libraries to the container, returning the container itself.
+    * <br/>
+    * The resources will be placed into the Container Library path under the same context 
+    * from which they were retrieved.
+    * <br/><br/>
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
+    *  
+    * @param resourceNames resources to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceNames are null or empty
+    * @see #addLibrary(String)
+    */
    T addLibraries(String... resourceNames) throws IllegalArgumentException;
+  
+   /**
+    * Add multiple {@link File} to this {@link Archive} as libraries to the container, returning the container itself.
+    * <br/>
+    * The {@link File}s will be placed into the Container Library path under {@link File#getName()}.
+    *  
+    * @param resourceNames {@link File} resources to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if {@link File} resources are null or empty
+    * @see #addLibrary(File)
+    */
    T addLibraries(File... resources) throws IllegalArgumentException;
+
+   /**
+    * Add multiple {@link Archive}s to this {@link Archive} as libraries to the container, returning the container itself.
+    * <br/>
+    * The {@link Archive}s will be placed into the Container Library path under {@link Archive#getName()}.
+    *  
+    * @param archive {@link Archive} resources to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if {@link Archive} resources are null
+    * @see #addLibrary(Archive)
+    */
    T addLibraries(Archive<?>... archives) throws IllegalArgumentException;
 }

Modified: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ManifestContainer.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ManifestContainer.java	2009-11-15 11:28:27 UTC (rev 3703)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ManifestContainer.java	2009-11-15 13:05:43 UTC (rev 3704)
@@ -43,66 +43,172 @@
    //-------------------------------------------------------------------------------------||
 
    /**
-    * Adds a resource to this {@link Archive} as MEANIFEST.MF.
-    * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation. 
+    * Adds the resource as MANIFEST.FM to the container, returning the container itself.
     * <br/>
-    * For instance a resourceName of "test/example.txt" could be placed in 
-    * "/META-INF/MANIFEST.MF"
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param resourceName Name of the {@link ClassLoader} resource to add 
+    * @param resourceName resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @see #setManifest(Asset)
     */
    T setManifest(String resourceName) throws IllegalArgumentException;
    
+   /**
+    * Adds the {@link File} as MANIFEST.FM to the container, returning the container itself.
+    * 
+    * @param resource {@link File} resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @see #setManifest(Asset)
+    */
    T setManifest(File resource) throws IllegalArgumentException;
+
+   /**
+    * Adds the {@link URL} as MANIFEST.FM to the container, returning the container itself.
+    * 
+    * @param resource {@link URL} resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @see #setManifest(Asset)
+    */
    T setManifest(URL resource) throws IllegalArgumentException;
+   
+   /**
+    * Adds the {@link Asset} as MANIFEST.FM to the container, returning the container itself.
+    * 
+    * @param resource {@link File} resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @see #addManifestResource(Asset, Path)
+    */
    T setManifest(Asset resource) throws IllegalArgumentException;
    
    /**
-    * Adds the resource with the specified name
-    * to the container, returning the container itself.
+    * Adds the resource as a Manifest resource to the container, returning the container itself.
+    * <br/>
+    * The resource will be placed into the Container Manifest path under the same context 
+    * from which it was retrieved.
     * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation. 
-    * <br/>
-    * For instance a resourceName of "test/example.xml" could be placed in 
-    * "/META-INF/test/example.xml"
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param resourceName Name of the {@link ClassLoader} resource to add 
+    * @param resourceName resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
     */
    T addManifestResource(String resourceName) throws IllegalArgumentException;
    
+   /**
+    * Adds the {@link File} as a Manifest resource to the container, returning the container itself.
+    * <br/>
+    * The {@link File} will be placed into the Container Manifest path under {@link File#getName()}. 
+    * 
+    * @param resource resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if {@link File} resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
+    */
    T addManifestResource(File resource) throws IllegalArgumentException;
 
+   /**
+    * Adds the resource as a Manifest resource to the container, returning the container itself.
+    * <br/>
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
+    * 
+    * @param resourceName resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
+    */
+   T addManifestResource(String resourceName, String target) throws IllegalArgumentException;
 
-   T addManifestResource(String resourceName, String target) throws IllegalArgumentException;
+   /**
+    * Adds the {@link File} as a Manifest resource to the container, returning the container itself.
+    * 
+    * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
+    */
    T addManifestResource(File resource, String target) throws IllegalArgumentException;
+
+   /**
+    * Adds the {@link URL} as a Manifest resource to the container, returning the container itself.
+    * 
+    * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
+    */
    T addManifestResource(URL resource, String target) throws IllegalArgumentException;
+
+   /**
+    * Adds the {@link Asset} as a Manifest resource to the container, returning the container itself.
+    * 
+    * @param resource {@link Asset} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
+    */
    T addManifestResource(Asset resource, String target) throws IllegalArgumentException;
 
    /**
-    * Adds the resource with the specified name
-    * to the container, returning the container itself.
-    * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation. 
+    * Adds the resource as a Manifest resource to the container, returning the container itself.
     * <br/>
-    * For instance a resourceName of "test/library.xml" and target of "/test/example.xml" could be placed in
-    * "/META-INF/test/example.xml".
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param target The target relative to Manifest path within the archive into which we'll place the resource
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resourceName resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resourceName is null
+    * @see #addManifestResource(Asset, Path)
     */
    T addManifestResource(String resourceName, Path target) throws IllegalArgumentException;
+
+   /**
+    * Adds the {@link File} as a Manifest resource to the container, returning the container itself.
+    * 
+    * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
+    */
    T addManifestResource(File resource, Path target) throws IllegalArgumentException;
+   
+   /**
+    * Adds the {@link URL} as a Manifest resource to the container, returning the container itself.
+    * 
+    * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addManifestResource(Asset, Path)
+    */
    T addManifestResource(URL resource, Path target) throws IllegalArgumentException;
+
+   /**
+    * Adds the {@link Asset} as a Manifest resource to the container, returning the container itself.
+    * 
+    * @param resource {@link Asset} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s manifest path.
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    */
    T addManifestResource(Asset resource, Path target) throws IllegalArgumentException;
 }

Modified: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceAdapterContainer.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceAdapterContainer.java	2009-11-15 11:28:27 UTC (rev 3703)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceAdapterContainer.java	2009-11-15 13:05:43 UTC (rev 3704)
@@ -30,30 +30,51 @@
  * <br/>
  * 
  * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
  * @version $Revision: $
  * @param <T>
  */
 public interface ResourceAdapterContainer<T extends Archive<T>>
 {
    /**
-    * Adds a resource to this Archive as ra.xml. <br/>
+    * Adds the resource as ra.xml to the container, returning the container itself.
     * <br/>
-    * The mechanism to obtain the resource is up to the
-    * implementation. <br/>
-    * For instance a resourceName of "test/ra.xml" could be placed in
-    * "/META-INF/ra.xml"
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param resourceName Name of the resource to add
+    * @param resourceName resource to add
     * @return This virtual archive
-    * @throws IllegalArgumentException
-    *             if resourceName is null
+    * @throws IllegalArgumentException if resourceName is null
+    * @see #setResourceAdapterXML(Asset)
     */
    T setResourceAdapterXML(String resourceName) throws IllegalArgumentException;
    
+   /**
+    * Adds the {@link File} as ra.xml to the container, returning the container itself.
+    * 
+    * @param resource {@link File} resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @see #setResourceAdapterXML(Asset)
+    */
    T setResourceAdapterXML(File resource) throws IllegalArgumentException;
    
+   /**
+    * Adds the {@link URL} as ra.xml to the container, returning the container itself.
+    * 
+    * @param resource {@link URL} resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    * @see #setResourceAdapterXML(Asset)
+    */
    T setResourceAdapterXML(URL resource) throws IllegalArgumentException;
    
+   /**
+    * Adds the {@link Asset} as ra.xml to the container, returning the container itself.
+    * 
+    * @param resource {@link Asset} resource to add
+    * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
+    */
    T setResourceAdapterXML(Asset resource) throws IllegalArgumentException;
 
 }

Modified: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceContainer.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceContainer.java	2009-11-15 11:28:27 UTC (rev 3703)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/ResourceContainer.java	2009-11-15 13:05:43 UTC (rev 3704)
@@ -43,85 +43,86 @@
    //-------------------------------------------------------------------------------------||
 
    /**
-    * Adds the resource with the specified name
-    * to the container, returning the container itself.
+    * Adds the resource as a resource to the container, returning the container itself.
+    * <br/>
+    * The resource will be placed into the Container Resource path under the same context 
+    * from which it was retrieved.
     * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation.  The resource will be placed into 
-    * the Container under the same context from which it was retrieved.
-    * <br/>
-    * For instance a resourceName of "META-INF/resource.xml" will be placed
-    * at the same location within the Container.
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resourceName resource to add
     * @return This virtual archive
-    * @throws IllegalArgumentException If the name is null
+    * @throws IllegalArgumentException If the resourceName is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(String resourceName) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link File} as a resource to the container, returning the container itself.
+    * <br/>
+    * The {@link File} will be placed into the Container Library path under {@link File#getName()}. 
     * 
-    * @param resource The resource to add
+    * @param resource {@link File} resource to add
     * @return This virtual archive
-    * @throws IllegalArgumentException If the resource is null 
+    * @throws IllegalArgumentException If the resource is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(File resource) throws IllegalArgumentException;
 
    /**
-    * Adds the resource with the specified name
-    * to the container, returning the container itself.
-    * <br/><br/> 
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation.  The resource will be placed into 
-    * the Container under the same context specified by
-    * "target"
+    * Adds the resource as a resource to the container, returning the container itself.
+    * <br/><br/>
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resourceName resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resourceName is null
+    * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(String resourceName, String target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link File} as a resource to the container, returning the container itself.
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resource The resource to add
+    * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resource is null 
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(File resource, String target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link URL} as a resource to the container, returning the container itself.
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resource The resource to add
+    * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resource is null 
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(URL resource, String target) throws IllegalArgumentException;
 
    /**
+    * Adds the {@link Asset} as a resource to the container, returning the container itself.
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resource The resource to add
+    * @param resource {@link Asset} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resource is null 
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(Asset resource, String target) throws IllegalArgumentException;
 
    /**
-    * Adds the resource with the specified name
-    * to the container, returning the container itself.
+    * Adds the resource with the specified name to the container, returning the container itself.
     * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation.  The resource will be placed into 
-    * the Container under the same context specified by
-    * "target"
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
     * @param target The target within the archive into which we'll place the resource
     * @param resourceName Name of the {@link ClassLoader} resource to add
@@ -132,49 +133,51 @@
    T addResource(String resourceName, Path target) throws IllegalArgumentException;
    
    /**
-    * Adds the specified resource to the {@link Archive}, using the specified {@link ClassLoader}
-    * to load the resource
+    * Adds the resource as a resource to the container, returning the container itself.
+    * <br/><br/>
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resourceName The name of the resource to load
-    * @param classLoader The ClassLoader from where the resource should be loaded
+    * @param resourceName resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resourceName is null
-    * @throws IllegalArgumentException If the classLoader is null
+    * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(String resourceName, Path target, ClassLoader classLoader) throws IllegalArgumentException;
 
-
    /**
+    * Adds the {@link File} as a resource to the container, returning the container itself.
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resource The resource to add
+    * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resource is null 
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(File resource, Path target) throws IllegalArgumentException;
 
    /**
-    * Adds the resource located at the specified {@link URL} to
-    * the archive at the specified path.
+    * Adds the {@link URL} as a resource to the container, returning the container itself.
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resource The resource to add
+    * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resource is null 
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addResource(Asset, Path)
     */
    T addResource(URL resource, Path target) throws IllegalArgumentException;
 
    /**
+    * Adds the {@link Asset} as a resource to the container, returning the container itself.
     * 
-    * @param target The target within the archive into which we'll place the resource
-    * @param resource The resource to add
+    * @param resource {@link Asset} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s resource path.
     * @return This virtual archive
-    * @throws IllegalArgumentException If the target is null
-    * @throws IllegalArgumentException If the resource is null 
+    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if target is null
     */
    T addResource(Asset resource, Path target) throws IllegalArgumentException;
 }

Modified: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/WebContainer.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/WebContainer.java	2009-11-15 11:28:27 UTC (rev 3703)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/container/WebContainer.java	2009-11-15 13:05:43 UTC (rev 3704)
@@ -43,156 +43,173 @@
    //-------------------------------------------------------------------------------------||
 
    /**
-    * Adds a resource to this Archive as /WEB-INF/web.xml.
-    * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation. 
+    * Adds the resource as web.xml to the container, returning the container itself.
     * <br/>
-    * For instance a resourceName of "test/example.xml" could be placed in 
-    * "/WEB-INF/web.xml"
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param resourceName Name of the {@link ClassLoader} resource to add 
+    * @param resourceName resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @see #setWebXML(Asset)
     */
    T setWebXML(String resourceName)  throws IllegalArgumentException;
    
    /**
-    * Adds a resource to this Archive as /WEB-INF/web.xml.
+    * Adds the {@link File} as web.xml to the container, returning the container itself.
     * 
-    * @param resource {@link File} resource to add 
+    * @param resource {@link File} resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @see #setWebXML(Asset)
     */
    T setWebXML(File resource)  throws IllegalArgumentException;
    
    /**
-    * Adds a resource to this Archive as /WEB-INF/web.xml.
-    *  
-    * @param resource {@link URL} resource to add 
+    * Adds the {@link URL} as web.xml to the container, returning the container itself.
+    * 
+    * @param resource {@link URL} resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @see #setWebXML(Asset)
     */
    T setWebXML(URL resource)  throws IllegalArgumentException;
    
    /**
-    * Adds a resource to this Archive as /WEB-INF/web.xml. 
+    * Adds the {@link Asset} as web.xml to the container, returning the container itself.
     * 
-    * @param resource {@link Asset} resource to add 
+    * @param resource {@link Asset} resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resource is null
+    * @see #addWebResource(Asset, Path)
     */
    T setWebXML(Asset resource)  throws IllegalArgumentException;
    
    /**
-    * Adds the resource with the specified name
-    * to the container, returning the container itself.
+    * Adds the resource as a Web resource to the container, returning the container itself.
+    * <br/>
+    * The resource will be placed into the Container Web path under the same context 
+    * from which it was retrieved.
     * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation. 
-    * <br/>
-    * For instance a resourceName of "test/example.xml" could be placed in 
-    * "/WEB-INF/test/example.xml"
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resourceName resource to add
     * @return This virtual archive
     * @throws IllegalArgumentException if resourceName is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(String resourceName) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link File} as a Web resource to the container, returning the container itself.
+    * <br/>
+    * The {@link File} will be placed into the Container Web path under {@link File#getName()}. 
     * 
-    * @param resource {@link File} resource to add
+    * @param resource resource to add
     * @return This virtual archive
-    * @throws IllegalArgumentException if resource is null
+    * @throws IllegalArgumentException if {@link File} resource is null
+    * @throws IllegalArgumentException if target is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(File resource) throws IllegalArgumentException;
    
    /**
+    * Adds the resource as a Web resource to the container, returning the container itself.
+    * <br/>
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resourceName resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resourceName is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(String resourceName, String target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link File} as a Web resource to the container, returning the container itself.
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
     * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(File resource, String target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link URL} as a Web resource to the container, returning the container itself.
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
     * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(URL resource, String target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link Asset} as a Web resource to the container, returning the container itself.
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
     * @param resource {@link Asset} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(Asset resource, String target) throws IllegalArgumentException;
 
    /**
-    * Adds the resource with the specified name
-    * to the container, returning the container itself.
+    * Adds the resource as a Web resource to the container, returning the container itself.
+    * <br/>
     * <br/><br/>
-    * The {@link ClassLoader} used to obtain the resource is up to
-    * the implementation. 
-    * <br/>
-    * For instance a resourceName of "test/library.xml" and target of "/test/example.xml" could be placed in
-    * "/lib/test/example.xml".
+    * The {@link ClassLoader} used to obtain the resource is up to the implementation.  
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
-    * @param resourceName Name of the {@link ClassLoader} resource to add
+    * @param resourceName resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resourceName is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resourceName is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(String resourceName, Path target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link File} as a Web resource to the container, returning the container itself.
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
     * @param resource {@link File} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(File resource, Path target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link URL} as a Web resource to the container, returning the container itself.
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
     * @param resource {@link URL} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
+    * @see #addWebResource(Asset, Path)
     */
    T addWebResource(URL resource, Path target) throws IllegalArgumentException;
    
    /**
+    * Adds the {@link Asset} as a Web resource to the container, returning the container itself.
     * 
-    * @param target The target relative to Web path within the archive into which we'll place the resource
     * @param resource {@link Asset} resource to add
+    * @param target The target path within the archive in which to add the resource, relative to the {@link Archive}s web path.
     * @return This virtual archive
+    * @throws IllegalArgumentException if resource is null
     * @throws IllegalArgumentException if target is null
-    * @throws IllegalArgumentException if resource is null
     */
    T addWebResource(Asset resource, Path target) throws IllegalArgumentException;
 }



More information about the jboss-svn-commits mailing list