Interface WebContainer<T extends Archive<T>>
-
- Type Parameters:
T-
- All Known Subinterfaces:
WebArchive
- All Known Implementing Classes:
WebArchiveImpl,WebContainerBase
public interface WebContainer<T extends Archive<T>>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: $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TaddAsWebInfResource(java.io.File resource)Adds theFileas a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.io.File resource, java.lang.String target)Adds theFileas a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.io.File resource, ArchivePath target)Adds theFileas a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.lang.Package resourcePackage, java.lang.String resourceName)Adds the resource as a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.lang.Package resourcePackage, java.lang.String resourceName, java.lang.String target)Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.TaddAsWebInfResource(java.lang.Package resourcePackage, java.lang.String resourceName, ArchivePath target)Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.TaddAsWebInfResource(java.lang.String resourceName)Adds the resource as a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.lang.String resourceName, java.lang.String target)Adds the resource as a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.lang.String resourceName, ArchivePath target)Adds the resource as a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.net.URL resource, java.lang.String target)Adds theURLas a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(java.net.URL resource, ArchivePath target)Adds theURLas a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(Asset resource, java.lang.String target)Adds theAssetas a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResource(Asset resource, ArchivePath target)Adds theAssetas a WEB-INF resource to the container, returning the container itself.TaddAsWebInfResources(java.lang.Package resourcePackage, java.lang.String... resourceNames)Adds the resources inside the package as multiple WEB-INF resources to the container, returning the container itself.TaddAsWebResource(java.io.File resource)Adds theFileas a Web resource to the container, returning the container itself.TaddAsWebResource(java.io.File resource, java.lang.String target)Adds theFileas a Web resource to the container, returning the container itself.TaddAsWebResource(java.io.File resource, ArchivePath target)Adds theFileas a Web resource to the container, returning the container itself.TaddAsWebResource(java.lang.Package resourcePackage, java.lang.String resourceName)Adds the resource as a resource to the container, returning the container itself.TaddAsWebResource(java.lang.Package resourcePackage, java.lang.String resourceName, java.lang.String target)Adds the resource as a resource to a specific path inside the container, returning the container itself.TaddAsWebResource(java.lang.Package resourcePackage, java.lang.String resourceName, ArchivePath target)Adds the resource as a resource to a specific path inside the container, returning the container itself.TaddAsWebResource(java.lang.String resourceName)Adds the resource as a Web resource to the container, returning the container itself.TaddAsWebResource(java.lang.String resourceName, java.lang.String target)Adds the resource as a Web resource to the container, returning the container itself.TaddAsWebResource(java.lang.String resourceName, ArchivePath target)Adds the resource as a Web resource to the container, returning the container itself.TaddAsWebResource(java.net.URL resource, java.lang.String target)Adds theURLas a Web resource to the container, returning the container itself.TaddAsWebResource(java.net.URL resource, ArchivePath target)Adds theURLas a Web resource to the container, returning the container itself.TaddAsWebResource(Asset resource, java.lang.String target)Adds theAssetas a Web resource to the container, returning the container itself.TaddAsWebResource(Asset resource, ArchivePath target)Adds theAssetas a Web resource to the container, returning the container itself.TaddAsWebResources(java.lang.Package resourcePackage, java.lang.String... resourceNames)Adds the resources inside the package as multiple resources to the container, returning the container itself.TsetWebXML(java.io.File resource)Adds theFileas web.xml to the container, returning the container itself.TsetWebXML(java.lang.Package resourcePackage, java.lang.String resourceName)Adds the resource inside the package as web.xml to the container, returning the container itself.TsetWebXML(java.lang.String resourceName)Adds the resource as web.xml to the container, returning the container itself.TsetWebXML(java.net.URL resource)Adds theURLas web.xml to the container, returning the container itself.TsetWebXML(Asset resource)Adds theAssetas web.xml to the container, returning the container itself.
-
-
-
Method Detail
-
setWebXML
T setWebXML(java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds the resource as web.xml to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourceName- resource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
setWebXML(Asset)
-
setWebXML
T setWebXML(java.io.File resource) throws java.lang.IllegalArgumentException
Adds theFileas web.xml to the container, returning the container itself.- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
setWebXML(Asset)
-
setWebXML
T setWebXML(java.net.URL resource) throws java.lang.IllegalArgumentException
Adds theURLas web.xml to the container, returning the container itself.- Parameters:
resource-URLresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
setWebXML(Asset)
-
setWebXML
T setWebXML(Asset resource) throws java.lang.IllegalArgumentException
Adds theAssetas web.xml to the container, returning the container itself.- Parameters:
resource-Assetresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null
-
setWebXML
T setWebXML(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds the resource inside the package as web.xml to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourcesresourceName- The name of the resources inside resourcePackage- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is nulljava.lang.IllegalArgumentException- if resourceName is null
-
addAsWebResource
T addAsWebResource(java.lang.String resourceName) throws java.lang.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.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourceName- resource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(java.io.File resource) throws java.lang.IllegalArgumentException
Adds theFileas a Web resource to the container, returning the container itself.
TheFilewill be placed into the Container Web path underFile.getName().- Parameters:
resource- resource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- ifFileresource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
Adds the resource as a Web resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourceName- resource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(java.io.File resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds theFileas a Web resource to the container, returning the container itself.- Parameters:
resource-Fileresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(java.net.URL resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds theURLas a Web resource to the container, returning the container itself.- Parameters:
resource-URLresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(Asset resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds theAssetas a Web resource to the container, returning the container itself.- Parameters:
resource-Assetresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
Adds the resource as a Web resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourceName- resource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(java.io.File resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds theFileas a Web resource to the container, returning the container itself.- Parameters:
resource-Fileresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(java.net.URL resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds theURLas a Web resource to the container, returning the container itself.- Parameters:
resource-URLresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsWebResource(Asset, ArchivePath)
-
addAsWebResource
T addAsWebResource(Asset resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds theAssetas a Web resource to the container, returning the container itself.- Parameters:
resource-Assetresource to addtarget- The target path within the archive in which to add the resource, relative to theArchives web path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null
-
addAsWebResources
T addAsWebResources(java.lang.Package resourcePackage, java.lang.String... resourceNames) throws java.lang.IllegalArgumentException
Adds the resources inside the package as multiple resources to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourcesresourceNames- The names of the resources inside resoucePackage- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is nulljava.lang.IllegalArgumentException- if no resourceNames are specified or containing null
-
addAsWebResource
T addAsWebResource(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds the resource as a resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackage- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is nulljava.lang.IllegalArgumentException- if resourceName is null
-
addAsWebResource
T addAsWebResource(java.lang.Package resourcePackage, java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
Adds the resource as a resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is nulljava.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if target is null
-
addAsWebResource
T addAsWebResource(java.lang.Package resourcePackage, java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
Adds the resource as a resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is nulljava.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if target is null
-
addAsWebInfResource
T addAsWebInfResource(java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourceName- resource to add- Returns:
- This
Archive - Throws:
java.lang.IllegalArgumentException- if resourceName is not specified
-
addAsWebInfResource
T addAsWebInfResource(java.io.File resource) throws java.lang.IllegalArgumentException
Adds theFileas a WEB-INF resource to the container, returning the container itself.
TheFilewill be placed into the Container WEB-INF path underFile.getName().- Parameters:
resource- Resource to add- Returns:
- This
Archive - Throws:
java.lang.IllegalArgumentException- ifFileresource is null
-
addAsWebInfResource
T addAsWebInfResource(java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.
-
addAsWebInfResource
T addAsWebInfResource(java.io.File resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds theFileas a WEB-INF resource to the container, returning the container itself.
-
addAsWebInfResource
T addAsWebInfResource(java.net.URL resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds theURLas a WEB-INF resource to the container, returning the container itself.
-
addAsWebInfResource
T addAsWebInfResource(Asset resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds theAssetas a WEB-INF resource to the container, returning the container itself.
-
addAsWebInfResource
T addAsWebInfResource(java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.
-
addAsWebInfResource
T addAsWebInfResource(java.io.File resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds theFileas a WEB-INF resource to the container, returning the container itself.
-
addAsWebInfResource
T addAsWebInfResource(java.net.URL resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds theURLas a WEB-INF resource to the container, returning the container itself.
-
addAsWebInfResource
T addAsWebInfResource(Asset resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds theAssetas a WEB-INF resource to the container, returning the container itself.
-
addAsWebInfResources
T addAsWebInfResources(java.lang.Package resourcePackage, java.lang.String... resourceNames) throws java.lang.IllegalArgumentException
Adds the resources inside the package as multiple WEB-INF resources to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourcesresourceNames- The names of the resources inside resourcePackage- Returns:
- This
Archive - Throws:
java.lang.IllegalArgumentException- If resourcePackage is null, or if no resourceNames are specified or containing null
-
addAsWebInfResource
T addAsWebInfResource(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds the resource as a WEB-INF resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resourcePackage- Returns:
- This
Archive - Throws:
java.lang.IllegalArgumentException- If the package or resource name is not specified
-
addAsWebInfResource
T addAsWebInfResource(java.lang.Package resourcePackage, java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This
Archive - Throws:
java.lang.IllegalArgumentException- If the package, resource name, or target is not specified
-
addAsWebInfResource
T addAsWebInfResource(java.lang.Package resourcePackage, java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackagetarget- The target location inside the container- Returns:
- This
Archive - Throws:
java.lang.IllegalArgumentException- If the package, resource name, or target is not specified
-
-