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 theArchive
is up to the implementations/specifications.- Version:
- $Revision: $
- Author:
- Aslak Knutsen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
addAsApplicationResource(File resource)
T
addAsApplicationResource(File resource, String target)
T
addAsApplicationResource(File resource, ArchivePath target)
T
addAsApplicationResource(Package resourcePackage, String resourceName)
Adds the resource as a resource to the container, returning the container itself.T
addAsApplicationResource(Package resourcePackage, String resourceName, String target)
Adds the resource as a resource to a specific path inside the container, returning the container itself.T
addAsApplicationResource(Package resourcePackage, String resourceName, ArchivePath target)
Adds the resource as a resource to a specific path inside the container, returning the container itself.T
addAsApplicationResource(String resourceName)
Adds a resource to thisArchive
s application context.T
addAsApplicationResource(String resourceName, String target)
Adds a resource to thisArchive
s application context.T
addAsApplicationResource(String resourceName, ArchivePath target)
Adds a resource to thisArchive
s application context.T
addAsApplicationResource(URL resource, String target)
T
addAsApplicationResource(URL resource, ArchivePath target)
T
addAsApplicationResource(Asset resource, String target)
T
addAsApplicationResource(Asset resource, ArchivePath target)
T
addAsApplicationResources(Package resourcePackage, String... resourceNames)
Adds the resources inside the package as multiple resources to the container, returning the container itself.T
addAsModule(File resource)
T
addAsModule(File resource, String targetPath)
T
addAsModule(File resource, ArchivePath targetPath)
T
addAsModule(String resourceName)
Adds a resource to thisArchive
s module context.T
addAsModule(String resourceName, String targetPath)
Adds a resource to thisArchive
s module context.T
addAsModule(String resourceName, ArchivePath targetPath)
Adds a resource to thisArchive
s module context.T
addAsModule(URL resource, String targetPath)
T
addAsModule(URL resource, ArchivePath targetPath)
T
addAsModule(Archive<?> archive)
Adds a archive to thisArchive
s module context.T
addAsModule(Asset resource, String targetPath)
T
addAsModule(Asset resource, ArchivePath targetPath)
T
addAsModules(File... resources)
T
addAsModules(String... resourceNames)
Adds the specified resources to thisArchive
s module context.T
addAsModules(Archive<?>... archives)
Adds the specified archives to thisArchive
s module context.T
setApplicationXML(File resource)
T
setApplicationXML(Package resourcePackage, String resourceName)
Adds a resource inside the package to thisArchive
as application.xml.T
setApplicationXML(String resourceName)
Adds a resource to thisArchive
as application.xml.T
setApplicationXML(URL resource)
T
setApplicationXML(Asset resource)
-
-
-
Method Detail
-
setApplicationXML
T setApplicationXML(String resourceName) throws IllegalArgumentException
Adds a resource to thisArchive
as application.xml.
TheClassLoader
used 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 theClassLoader
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is null- See Also:
setApplicationXML(Asset)
-
setApplicationXML
T setApplicationXML(File resource) throws IllegalArgumentException
Adds aFile
to thisArchive
as application.xml.
For instance aFile
"test/example.xml" could be placed in "/META-INF/application.xml"- Parameters:
resource
-File
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is null- See Also:
setApplicationXML(Asset)
-
setApplicationXML
T setApplicationXML(URL resource) throws IllegalArgumentException
Adds aURL
to thisArchive
as application.xml.
For instance aURL
"http://my.com/example.xml" could be placed in "/META-INF/application.xml"- Parameters:
resource
-URL
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is null- See Also:
setApplicationXML(Asset)
-
setApplicationXML
T setApplicationXML(Asset resource) throws IllegalArgumentException
- Parameters:
resource
-Asset
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is null
-
setApplicationXML
T setApplicationXML(Package resourcePackage, String resourceName) throws IllegalArgumentException
Adds a resource inside the package to thisArchive
as application.xml.
TheClassLoader
used 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:
setApplicationXML(String)
-
addAsApplicationResource
T addAsApplicationResource(String resourceName) throws IllegalArgumentException
Adds a resource to thisArchive
s application context.
TheClassLoader
used 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 theClassLoader
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(File resource) throws IllegalArgumentException
Adds aFile
to thisArchive
s application context.
For instance aFile
of "test/example.xml" could be placed in "/META-INF/test/example.xml"- Parameters:
resource
-File
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is null- See Also:
addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(String resourceName, String target) throws IllegalArgumentException
Adds a resource to thisArchive
s application context.
TheClassLoader
used 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 theClassLoader
resource 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(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(File resource, String target) throws IllegalArgumentException
Adds aFile
to thisArchive
s application context.
For instance aFile
of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource
-File
resource 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(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(URL resource, String target) throws IllegalArgumentException
Adds aURL
to thisArchive
s application context.
For instance aURL
of "http://my.com/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource
-URL
resource 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(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(Asset resource, String target) throws IllegalArgumentException
- Parameters:
resource
-Asset
resource 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(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(String resourceName, ArchivePath target) throws IllegalArgumentException
Adds a resource to thisArchive
s application context.
TheClassLoader
used 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 theClassLoader
resource 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(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(File resource, ArchivePath target) throws IllegalArgumentException
Adds aFile
to thisArchive
s application context.
For instance aFile
of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource
-File
resource 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(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(URL resource, ArchivePath target) throws IllegalArgumentException
Adds aURL
to thisArchive
s application context.
For instance aFile
of "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Parameters:
resource
-URL
resource 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(Asset, ArchivePath)
-
addAsApplicationResource
T addAsApplicationResource(Asset resource, ArchivePath target) throws IllegalArgumentException
- Parameters:
resource
-Asset
resource 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.
TheClassLoader
used 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.
TheClassLoader
used 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.
TheClassLoader
used 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.
TheClassLoader
used 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
T addAsModule(Archive<?> archive) throws IllegalArgumentException
- Parameters:
archive
- The archive to use- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if archive is null
-
addAsModules
T addAsModules(Archive<?>... archives) throws IllegalArgumentException
- Parameters:
archives
- The archives to use- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if not archives are specified
-
addAsModule
T addAsModule(String resourceName) throws IllegalArgumentException
Adds a resource to thisArchive
s module context.
The resource name is used as path.- Parameters:
resourceName
- Name of theClassLoader
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModules
T addAsModules(String... resourceNames) throws IllegalArgumentException
Adds the specified resources to thisArchive
s module context.
The resource names are used as paths.- Parameters:
resourceNames
- Names of theClassLoader
resources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceNames are not specified- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(File resource) throws IllegalArgumentException
- Parameters:
resource
-File
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModules
T addAsModules(File... resources) throws IllegalArgumentException
- Parameters:
resources
-File
resources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resources are not specified- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(String resourceName, String targetPath) throws IllegalArgumentException
Adds a resource to thisArchive
s module context.- Parameters:
resourceName
- Name of theClassLoader
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is nullIllegalArgumentException
- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(File resource, String targetPath) throws IllegalArgumentException
- Parameters:
resource
-File
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(URL resource, String targetPath) throws IllegalArgumentException
- Parameters:
resource
-URL
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(Asset resource, String targetPath) throws IllegalArgumentException
- Parameters:
resource
-Asset
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(String resourceName, ArchivePath targetPath) throws IllegalArgumentException
Adds a resource to thisArchive
s module context.- Parameters:
resourceName
- Name of theClassLoader
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is nullIllegalArgumentException
- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(File resource, ArchivePath targetPath) throws IllegalArgumentException
- Parameters:
resource
-File
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(URL resource, ArchivePath targetPath) throws IllegalArgumentException
- Parameters:
resource
-URL
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if targetPath is null- See Also:
addAsModule(Asset, ArchivePath)
-
addAsModule
T addAsModule(Asset resource, ArchivePath targetPath) throws IllegalArgumentException
- Parameters:
resource
-URL
resource to addtargetPath
- The target path within the archive in which to add the resource, relative to theArchive
s module path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if targetPath is nullIllegalArgumentException
- if resource is null
-
-