Interface EnterpriseContainer<T extends Archive<T>>
-
- All Known Subinterfaces:
EnterpriseArchive
- All Known Implementing Classes:
EnterpriseArchiveImpl,EnterpriseContainerBase
public interface EnterpriseContainer<T extends Archive<T>>Defines the contract for a component capable of storing Enterprise related resources.
The actual path to the Enterprise resources within theArchiveis up to the implementations/specifications.- Version:
- $Revision: $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TaddAsApplicationResource(java.io.File resource)Adds aFileto thisArchives application context.TaddAsApplicationResource(java.io.File resource, java.lang.String target)Adds aFileto thisArchives application context.TaddAsApplicationResource(java.io.File resource, ArchivePath target)Adds aFileto thisArchives application context.TaddAsApplicationResource(java.lang.Package resourcePackage, java.lang.String resourceName)Adds the resource as a resource to the container, returning the container itself.TaddAsApplicationResource(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.TaddAsApplicationResource(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.TaddAsApplicationResource(java.lang.String resourceName)Adds a resource to thisArchives application context.TaddAsApplicationResource(java.lang.String resourceName, java.lang.String target)Adds a resource to thisArchives application context.TaddAsApplicationResource(java.lang.String resourceName, ArchivePath target)Adds a resource to thisArchives application context.TaddAsApplicationResource(java.net.URL resource, java.lang.String target)Adds aURLto thisArchives application context.TaddAsApplicationResource(java.net.URL resource, ArchivePath target)Adds aURLto thisArchives application context.TaddAsApplicationResource(Asset resource, java.lang.String target)TaddAsApplicationResource(Asset resource, ArchivePath target)TaddAsApplicationResources(java.lang.Package resourcePackage, java.lang.String... resourceNames)Adds the resources inside the package as multiple resources to the container, returning the container itself.TaddAsModule(java.io.File resource)Adds aFileto thisArchives module context.TaddAsModule(java.io.File resource, java.lang.String targetPath)Adds aFileto thisArchives module context.TaddAsModule(java.io.File resource, ArchivePath targetPath)Adds aFileto thisArchives module context.TaddAsModule(java.lang.String resourceName)Adds a resource to thisArchives module context.TaddAsModule(java.lang.String resourceName, java.lang.String targetPath)Adds a resource to thisArchives module context.TaddAsModule(java.lang.String resourceName, ArchivePath targetPath)Adds a resource to thisArchives module context.TaddAsModule(java.net.URL resource, java.lang.String targetPath)Adds aURLto thisArchives module context.TaddAsModule(java.net.URL resource, ArchivePath targetPath)Adds aURLto thisArchives module context.TaddAsModule(Archive<?> archive)Adds a archive to thisArchives module context.TaddAsModule(Asset resource, java.lang.String targetPath)TaddAsModule(Asset resource, ArchivePath targetPath)TaddAsModules(java.io.File... resources)Adds the specifiedFiles to thisArchives module context.TaddAsModules(java.lang.String... resourceNames)Adds the specified resources to thisArchives module context.TaddAsModules(Archive<?>... archives)Adds the specified archives to thisArchives module context.TsetApplicationXML(java.io.File resource)Adds aFileto thisArchiveas application.xml.TsetApplicationXML(java.lang.Package resourcePackage, java.lang.String resourceName)Adds a resource inside the package to thisArchiveas application.xml.TsetApplicationXML(java.lang.String resourceName)Adds a resource to thisArchiveas application.xml.TsetApplicationXML(java.net.URL resource)Adds aURLto thisArchiveas application.xml.TsetApplicationXML(Asset resource)
-
-
-
Method Detail
-
setApplicationXML
T setApplicationXML(java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds a resource to thisArchiveas application.xml.
TheClassLoaderused to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" could be placed in "/META-INF/application.xml"- Parameters:
resourceName- Name of theClassLoaderresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
setApplicationXML(Asset)
-
setApplicationXML
T setApplicationXML(java.io.File resource) throws java.lang.IllegalArgumentException
Adds aFileto thisArchiveas application.xml.
For instance aFile"test/example.xml" could be placed in "/META-INF/application.xml"- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
setApplicationXML(Asset)
-
setApplicationXML
T setApplicationXML(java.net.URL resource) throws java.lang.IllegalArgumentException
Adds aURLto thisArchiveas application.xml.
For instance aURL"http://my.com/example.xml" could be placed in "/META-INF/application.xml"- Parameters:
resource-URLresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
setApplicationXML(Asset)
-
setApplicationXML
T setApplicationXML(Asset resource) throws java.lang.IllegalArgumentException
- Parameters:
resource-Assetresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null
-
setApplicationXML
T setApplicationXML(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds a resource inside the package to thisArchiveas application.xml.
TheClassLoaderused to obtain the resource is up to the implementation.- Parameters:
resourcePackage- The package of the resourcesresourceName- The name of the resource inside resourcePackage- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is nulljava.lang.IllegalArgumentException- if resourceName is null- See Also:
setApplicationXML(String)
-
addAsApplicationResource
T addAsApplicationResource(java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds a resource to thisArchives application context.
TheClassLoaderused to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" could be placed in "/META-INF/test/example.xml"- Parameters:
resourceName- Name of theClassLoaderresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(java.io.File resource) throws java.lang.IllegalArgumentException
Adds aFileto thisArchives application context.
For instance aFileof "test/example.xml" could be placed in "/META-INF/test/example.xml"- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
Adds a resource to thisArchives application context.
TheClassLoaderused to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resourceName- Name of theClassLoaderresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(java.io.File resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds aFileto thisArchives application context.
For instance aFileof "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource-Fileresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(java.net.URL resource, java.lang.String target) throws java.lang.IllegalArgumentException
Adds aURLto thisArchives application context.
For instance aURLof "http://my.com/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource-URLresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(Asset resource, java.lang.String target) throws java.lang.IllegalArgumentException
- Parameters:
resource-Assetresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
Adds a resource to thisArchives application context.
TheClassLoaderused to obtain the resource is up to the implementation.
For instance a resourceName of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resourceName- Name of theClassLoaderresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(java.io.File resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds aFileto thisArchives application context.
For instance aFileof "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource-Fileresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(java.net.URL resource, ArchivePath target) throws java.lang.IllegalArgumentException
Adds aURLto thisArchives application context.
For instance aFileof "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource-URLresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(Asset resource, ArchivePath target) throws java.lang.IllegalArgumentException
- Parameters:
resource-Assetresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if target is null
-
addAsApplicationResources
T addAsApplicationResources(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
-
addAsApplicationResource
T addAsApplicationResource(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
-
addAsApplicationResource
T addAsApplicationResource(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
-
addAsApplicationResource
T addAsApplicationResource(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
-
addAsModule
T addAsModule(Archive<?> archive) throws java.lang.IllegalArgumentException
- Parameters:
archive- The archive to use- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if archive is null
-
addAsModules
T addAsModules(Archive<?>... archives) throws java.lang.IllegalArgumentException
- Parameters:
archives- The archives to use- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if not archives are specified
-
addAsModule
T addAsModule(java.lang.String resourceName) throws java.lang.IllegalArgumentException
Adds a resource to thisArchives module context.
The resource name is used as path.- Parameters:
resourceName- Name of theClassLoaderresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModules
T addAsModules(java.lang.String... resourceNames) throws java.lang.IllegalArgumentException
Adds the specified resources to thisArchives module context.
The resource names are used as paths.- Parameters:
resourceNames- Names of theClassLoaderresources to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceNames are not specified- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(java.io.File resource) throws java.lang.IllegalArgumentException
- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModules
T addAsModules(java.io.File... resources) throws java.lang.IllegalArgumentException
- Parameters:
resources-Fileresources to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resources are not specified- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(java.lang.String resourceName, java.lang.String targetPath) throws java.lang.IllegalArgumentException
Adds a resource to thisArchives module context.- Parameters:
resourceName- Name of theClassLoaderresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(java.io.File resource, java.lang.String targetPath) throws java.lang.IllegalArgumentException
Adds aFileto thisArchives module context.- Parameters:
resource-Fileresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(java.net.URL resource, java.lang.String targetPath) throws java.lang.IllegalArgumentException
Adds aURLto thisArchives module context.- Parameters:
resource-URLresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(Asset resource, java.lang.String targetPath) throws java.lang.IllegalArgumentException
- Parameters:
resource-Assetresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(java.lang.String resourceName, ArchivePath targetPath) throws java.lang.IllegalArgumentException
Adds a resource to thisArchives module context.- Parameters:
resourceName- Name of theClassLoaderresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is nulljava.lang.IllegalArgumentException- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(java.io.File resource, ArchivePath targetPath) throws java.lang.IllegalArgumentException
Adds aFileto thisArchives module context.- Parameters:
resource-Fileresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(java.net.URL resource, ArchivePath targetPath) throws java.lang.IllegalArgumentException
Adds aURLto thisArchives module context.- Parameters:
resource-URLresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is nulljava.lang.IllegalArgumentException- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(Asset resource, ArchivePath targetPath) throws java.lang.IllegalArgumentException
- Parameters:
resource-URLresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if targetPath is nulljava.lang.IllegalArgumentException- if resource is null
-
-