Interface EnterpriseContainer<T extends Archive<T>>
- All Known Subinterfaces:
EnterpriseArchive
- All Known Implementing Classes:
EnterpriseArchiveImpl, EnterpriseContainerBase
-
Method Summary
Modifier and TypeMethodDescriptionaddAsApplicationResource(File resource) addAsApplicationResource(File resource, String target) addAsApplicationResource(File resource, ArchivePath target) addAsApplicationResource(Package resourcePackage, String resourceName) Adds the resource as a resource to the container, returning the container itself.addAsApplicationResource(Package resourcePackage, String resourceName, String target) Adds the resource as a resource to a specific path inside the container, returning the container itself.addAsApplicationResource(Package resourcePackage, String resourceName, ArchivePath target) Adds the resource as a resource to a specific path inside the container, returning the container itself.addAsApplicationResource(String resourceName) Adds a resource to thisArchives application context.addAsApplicationResource(String resourceName, String target) Adds a resource to thisArchives application context.addAsApplicationResource(String resourceName, ArchivePath target) Adds a resource to thisArchives application context.addAsApplicationResource(URL resource, String target) addAsApplicationResource(URL resource, ArchivePath target) addAsApplicationResource(Asset resource, String target) addAsApplicationResource(Asset resource, ArchivePath target) addAsApplicationResources(Package resourcePackage, String... resourceNames) Adds the resources inside the package as multiple resources to the container, returning the container itself.addAsModule(File resource) addAsModule(File resource, String targetPath) addAsModule(File resource, ArchivePath targetPath) addAsModule(String resourceName) Adds a resource to thisArchives module context.addAsModule(String resourceName, String targetPath) Adds a resource to thisArchives module context.addAsModule(String resourceName, ArchivePath targetPath) Adds a resource to thisArchives module context.addAsModule(URL resource, String targetPath) addAsModule(URL resource, ArchivePath targetPath) addAsModule(Archive<?> archive) Adds a archive to thisArchives module context.addAsModule(Asset resource, String targetPath) addAsModule(Asset resource, ArchivePath targetPath) addAsModules(File... resources) addAsModules(String... resourceNames) Adds the specified resources to thisArchives module context.addAsModules(Archive<?>... archives) Adds the specified archives to thisArchives module context.setApplicationXML(File resource) setApplicationXML(Package resourcePackage, String resourceName) Adds a resource inside the package to thisArchiveas application.xml.setApplicationXML(String resourceName) Adds a resource to thisArchiveas application.xml.setApplicationXML(URL resource) setApplicationXML(Asset resource)
-
Method Details
-
setApplicationXML
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:
IllegalArgumentException- if resourceName is null- See Also:
-
setApplicationXML
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:
IllegalArgumentException- if resource is null- See Also:
-
setApplicationXML
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:
IllegalArgumentException- if resource is null- See Also:
-
setApplicationXML
- Parameters:
resource-Assetresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null
-
setApplicationXML
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:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resourceName is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resource is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsApplicationResource
- 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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsApplicationResource
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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsApplicationResource
- 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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null
-
addAsApplicationResources
T addAsApplicationResources(Package resourcePackage, String... resourceNames) throws 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:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if no resourceNames are specified or containing null
-
addAsApplicationResource
T addAsApplicationResource(Package resourcePackage, String resourceName) throws 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:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is null
-
addAsApplicationResource
T addAsApplicationResource(Package resourcePackage, String resourceName, String target) throws 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:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null
-
addAsApplicationResource
T addAsApplicationResource(Package resourcePackage, String resourceName, ArchivePath target) throws 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:
IllegalArgumentException- if resourcePackage is nullIllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null
-
addAsModule
- Parameters:
archive- The archive to use- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if archive is null
-
addAsModules
- Parameters:
archives- The archives to use- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if not archives are specified
-
addAsModule
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:
IllegalArgumentException- if resourceName is null- See Also:
-
addAsModules
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:
IllegalArgumentException- if resourceNames are not specified- See Also:
-
addAsModule
- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null- See Also:
-
addAsModules
- Parameters:
resources-Fileresources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resources are not specified- See Also:
-
addAsModule
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:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if targetPath is null- See Also:
-
addAsModule
- 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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if targetPath is null- See Also:
-
addAsModule
- 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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if targetPath is null- See Also:
-
addAsModule
- 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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if targetPath is null- See Also:
-
addAsModule
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:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if targetPath is null- See Also:
-
addAsModule
- 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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if targetPath is null- See Also:
-
addAsModule
- 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:
IllegalArgumentException- if resource is nullIllegalArgumentException- if targetPath is null- See Also:
-
addAsModule
- 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:
IllegalArgumentException- if targetPath is nullIllegalArgumentException- if resource is null
-