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 thisArchiveas libraries to the container, returning the container itself.addAsLibraries(Collection<? extends Archive<?>> archives) addAsLibraries(Archive<?>... archives) addAsLibraries(Archive<?>[]... archives) addAsLibrary(File resource) Adds theFileas a library to the container, returning the container itself.addAsLibrary(File resource, String target) Adds theFileas a library to the container, returning the container itself.addAsLibrary(File resource, ArchivePath target) Adds theFileas 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 theURLas a library to the container, returning the container itself.addAsLibrary(URL resource, ArchivePath target) Adds theURLas a library to the container, returning the container itself.addAsLibrary(Archive<?> archive) addAsLibrary(Asset resource, String target) Adds theAssetas a library to the container, returning the container itself.addAsLibrary(Asset resource, ArchivePath target) Adds theAssetas 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.
TheClassLoaderused 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 theFileas a library to the container, returning the container itself.
TheFilewill be placed into the Container Library path underFile.getName().- Parameters:
resource-Fileresource 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.
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 library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsLibrary
Adds theFileas a library 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 library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsLibrary
Adds theURLas a library 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 library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsLibrary
Adds theAssetas a library 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 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.
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 library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsLibrary
Adds theFileas a library 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 library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsLibrary
Adds theURLas a library 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 library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsLibrary
Adds theAssetas a library 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 library path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null
-
addAsLibrary
Add anotherArchiveto thisArchiveas a library to the container, returning the container itself.
TheArchivewill be placed into the Container Library path underArchive.getName().- Parameters:
archive-Archiveresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- ifArchiveis null- See Also:
-
addAsLibraries
Add multiple resources to thisArchiveas 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.
TheClassLoaderused 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 multipleFileto thisArchiveas libraries to the container, returning the container itself.
TheFiles will be placed into the Container Library path underFile.getName().- Parameters:
resources-Fileresources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- ifFileresources are null or empty- See Also:
-
addAsLibraries
Add multipleArchives to thisArchiveas libraries to the container, returning the container itself.
TheArchives will be placed into the Container Library path underArchive.getName().- Parameters:
archives-Archiveresources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- ifArchiveresources are null- See Also:
-
addAsLibraries
Add multipleArchives to thisArchiveas libraries to the container, returning the container itself.
TheArchives will be placed into the Container Library path underArchive.getName().- Parameters:
archives-Archiveresources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- ifCollectionof archives is null- See Also:
-
addAsLibraries
Add multipleArchives to thisArchiveas libraries to the container, returning the container itself.
TheArchives will be placed into the Container Library path underArchive.getName().- Parameters:
archives-Archiveresources to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- ifCollectionof archives is null- See Also:
-