Interface LibraryContainer<T extends Archive<T>>
- All Known Subinterfaces:
EnterpriseArchive
,ResourceAdapterArchive
,WebArchive
- All Known Implementing Classes:
ContainerBase
,EnterpriseArchiveImpl
,EnterpriseContainerBase
,GenericArchiveImpl
,JavaArchiveImpl
,ResourceAdapterArchiveImpl
,ResourceAdapterContainerBase
,WebArchiveImpl
,WebContainerBase
public interface LibraryContainer<T extends Archive<T>>
Defines the contract for a component capable of storing Libraries.
The actual path to the Library resources within the
The actual path to the Library resources within the
Archive
is up to the implementations/specifications.- Version:
- $Revision: $
-
Method Summary
Modifier and TypeMethodDescriptionaddAsLibraries
(File... resources) addAsLibraries
(String... resourceNames) Add multiple resources to thisArchive
as libraries to the container, returning the container itself.addAsLibraries
(Collection<? extends Archive<?>> archives) addAsLibraries
(Archive<?>... archives) addAsLibraries
(Archive<?>[]... archives) addAsLibrary
(File resource) Adds theFile
as a library to the container, returning the container itself.addAsLibrary
(File resource, String target) Adds theFile
as a library to the container, returning the container itself.addAsLibrary
(File resource, ArchivePath target) Adds theFile
as a library to the container, returning the container itself.addAsLibrary
(String resourceName) Adds the resource as a library to the container, returning the container itself.addAsLibrary
(String resourceName, String target) Adds the resource as a library to the container, returning the container itself.addAsLibrary
(String resourceName, ArchivePath target) Adds the resource as a library to the container, returning the container itself.addAsLibrary
(URL resource, String target) Adds theURL
as a library to the container, returning the container itself.addAsLibrary
(URL resource, ArchivePath target) Adds theURL
as a library to the container, returning the container itself.addAsLibrary
(Archive<?> archive) addAsLibrary
(Asset resource, String target) Adds theAsset
as a library to the container, returning the container itself.addAsLibrary
(Asset resource, ArchivePath target) Adds theAsset
as a library to the container, returning the container itself.
-
Method Details
-
addAsLibrary
Adds the resource as a library to the container, returning the container itself.
The resource will be placed into the Container Library path under the same context from which it was retrieved.
TheClassLoader
used to obtain the resource is up to the implementation.- Parameters:
resourceName
- resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is null- See Also:
-
addAsLibrary
Adds theFile
as a library to the container, returning the container itself.
TheFile
will be placed into the Container Library path underFile.getName()
.- Parameters:
resource
-File
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is null- See Also:
-
addAsLibrary
Adds the resource as a library to the container, returning the container itself.
TheClassLoader
used 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 theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is nullIllegalArgumentException
- if target is null- See Also:
-
addAsLibrary
Adds theFile
as a library to the container, returning the container itself.- Parameters:
resource
-File
resource to addtarget
- The target path within the archive in which to add the resource, relative to theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if target is null- See Also:
-
addAsLibrary
Adds theURL
as a library to the container, returning the container itself.- Parameters:
resource
-URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if target is null- See Also:
-
addAsLibrary
Adds theAsset
as a library to the container, returning the container itself.- Parameters:
resource
-Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if target is null- See Also:
-
addAsLibrary
Adds the resource as a library to the container, returning the container itself.
TheClassLoader
used 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 theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceName is nullIllegalArgumentException
- if target is null- See Also:
-
addAsLibrary
Adds theFile
as a library to the container, returning the container itself.- Parameters:
resource
-File
resource to addtarget
- The target path within the archive in which to add the resource, relative to theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if target is null- See Also:
-
addAsLibrary
Adds theURL
as a library to the container, returning the container itself.- Parameters:
resource
-URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if target is null- See Also:
-
addAsLibrary
Adds theAsset
as a library to the container, returning the container itself.- Parameters:
resource
-Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to theArchive
s library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resource is nullIllegalArgumentException
- if target is null
-
addAsLibrary
Add anotherArchive
to thisArchive
as a library to the container, returning the container itself.
TheArchive
will be placed into the Container Library path underArchive.getName()
.- Parameters:
archive
-Archive
resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- ifArchive
is null- See Also:
-
addAsLibraries
Add multiple resources to thisArchive
as libraries to the container, returning the container itself.
The resources will be placed into the Container Library path under the same context from which they were retrieved.
TheClassLoader
used to obtain the resource is up to the implementation.- Parameters:
resourceNames
- resources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- if resourceNames are null or empty- See Also:
-
addAsLibraries
Add multipleFile
to thisArchive
as libraries to the container, returning the container itself.
TheFile
s will be placed into the Container Library path underFile.getName()
.- Parameters:
resources
-File
resources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- ifFile
resources are null or empty- See Also:
-
addAsLibraries
Add multipleArchive
s to thisArchive
as libraries to the container, returning the container itself.
TheArchive
s will be placed into the Container Library path underArchive.getName()
.- Parameters:
archives
-Archive
resources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- ifArchive
resources are null- See Also:
-
addAsLibraries
Add multipleArchive
s to thisArchive
as libraries to the container, returning the container itself.
TheArchive
s will be placed into the Container Library path underArchive.getName()
.- Parameters:
archives
-Archive
resources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- ifCollection
of archives is null- See Also:
-
addAsLibraries
Add multipleArchive
s to thisArchive
as libraries to the container, returning the container itself.
TheArchive
s will be placed into the Container Library path underArchive.getName()
.- Parameters:
archives
-Archive
resources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException
- ifCollection
of archives is null- See Also:
-