Interface ManifestContainer<T extends Archive<T>>
- Type Parameters:
T-
- All Known Subinterfaces:
EnterpriseArchive, JavaArchive, ResourceAdapterArchive, ServiceProviderContainer<T>, WebArchive
- All Known Implementing Classes:
ContainerBase, EnterpriseArchiveImpl, EnterpriseContainerBase, GenericArchiveImpl, JavaArchiveImpl, ResourceAdapterArchiveImpl, ResourceAdapterContainerBase, WebArchiveImpl, WebContainerBase
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddAsManifestResource(File resource) Adds theFileas a Manifest resource to the container, returning the container itself.addAsManifestResource(File resource, String target) Adds theFileas a Manifest resource to the container, returning the container itself.addAsManifestResource(File resource, ArchivePath target) Adds theFileas a Manifest resource to the container, returning the container itself.addAsManifestResource(Package resourcePackage, String resourceName) Adds the resource as a resource to the container, returning the container itself.addAsManifestResource(Package resourcePackage, String resourceName, String target) Adds the resource as a resource to a specific path inside the container, returning the container itself.addAsManifestResource(Package resourcePackage, String resourceName, ArchivePath target) Adds the resource as a resource to a specific path inside the container, returning the container itself.addAsManifestResource(String resourceName) Adds the resource as a Manifest resource to the container, returning the container itself.addAsManifestResource(String resourceName, String target) Adds the resource as a Manifest resource to the container, returning the container itself.addAsManifestResource(String resourceName, ArchivePath target) Adds the resource as a Manifest resource to the container, returning the container itself.addAsManifestResource(URL resource, String target) Adds theURLas a Manifest resource to the container, returning the container itself.addAsManifestResource(URL resource, ArchivePath target) Adds theURLas a Manifest resource to the container, returning the container itself.addAsManifestResource(Asset resource, String target) Adds theAssetas a Manifest resource to the container, returning the container itself.addAsManifestResource(Asset resource, ArchivePath target) Adds theAssetas a Manifest resource to the container, returning the container itself.addAsManifestResources(Package resourcePackage, String... resourceNames) Adds the resources inside the package as multiple resources to the container, returning the container itself.addAsServiceProvider(Class<?> serviceInterface, Class<?>... serviceImpls) Adds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service.addAsServiceProvider(String serviceInterface, String... serviceImpls) Adds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service.Adds a default generated MANIFEST.MF manifest to the current archive.setManifest(File resource) Adds theFileas MANIFEST.FM to the container, returning the container itself.setManifest(Package resourcePackage, String resourceName) Adds the resource inside the package as a MANIFEST.MF to the container, returning the container itself.setManifest(String resourceName) Adds the resource as MANIFEST.FM to the container, returning the container itself.setManifest(URL resource) Adds theURLas MANIFEST.FM to the container, returning the container itself.setManifest(Asset resource) Adds theAssetas MANIFEST.FM to the container, returning the container itself.
-
Field Details
-
DEFAULT_MANIFEST_NAME
- See Also:
-
-
Method Details
-
setManifest
Adds the resource as MANIFEST.FM to the container, returning the container itself.
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:
-
setManifest
Adds theFileas MANIFEST.FM to the container, returning the container itself.- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null- See Also:
-
setManifest
Adds theURLas MANIFEST.FM to the container, returning the container itself.- Parameters:
resource-URLresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null- See Also:
-
setManifest
Adds theAssetas MANIFEST.FM to the container, returning the container itself.- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is null- See Also:
-
setManifest
Adds the resource inside the package as a MANIFEST.MF 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
-
addAsManifestResource
Adds the resource as a Manifest resource to the container, returning the container itself.
The resource will be placed into the Container Manifest 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 nullIllegalArgumentException- if target is null
-
addAsManifestResource
Adds theFileas a Manifest resource to the container, returning the container itself.
TheFilewill be placed into the Container Manifest path underFile.getName().- Parameters:
resource- resource to add- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- ifFileresource is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds the resource as a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds theFileas a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds theURLas a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds theAssetas a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds the resource as a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resourceName is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds theFileas a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds theURLas a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null- See Also:
-
addAsManifestResource
Adds theAssetas a Manifest resource 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 manifest path.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if resource is nullIllegalArgumentException- if target is null
-
addAsManifestResources
T addAsManifestResources(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
-
addAsManifestResource
T addAsManifestResource(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
-
addAsManifestResource
T addAsManifestResource(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
-
addAsManifestResource
T addAsManifestResource(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
-
addAsServiceProvider
T addAsServiceProvider(Class<?> serviceInterface, Class<?>... serviceImpls) throws IllegalArgumentException Adds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service. Warning: this method does not add the specified classes to the archive.- Parameters:
serviceInterface- The Service Interface classserviceImpls- The Service Interface Implementations- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if serviceInterface is nullIllegalArgumentException- if serviceImpls is null or contain null values
-
addAsServiceProvider
Adds a META-INF/services/ServiceInterfaceNameAssetrepresenting this service.- Parameters:
serviceInterface- The Service Interface class nameserviceImpls- The Service Interface Implementations class names- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if serviceInterface is nullIllegalArgumentException- if serviceImpls is null or contain null values- See Also:
-
addManifest
Adds a default generated MANIFEST.MF manifest to the current archive.- Returns:
- This virtual archive
- Throws:
IllegalArgumentException- if serviceInterface is null
-