T
- public interface ManifestContainer<T extends Archive<T>>
Archive
is up to the implementations/specifications.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MANIFEST_NAME |
Modifier and Type | Method and Description |
---|---|
T |
addAsManifestResource(Asset resource,
ArchivePath target)
Adds the
Asset as a Manifest resource to the container, returning the container itself. |
T |
addAsManifestResource(Asset resource,
java.lang.String target)
Adds the
Asset as a Manifest resource to the container, returning the container itself. |
T |
addAsManifestResource(java.io.File resource)
Adds the
File as a Manifest resource to the container, returning the container itself. |
T |
addAsManifestResource(java.io.File resource,
ArchivePath target)
Adds the
File as a Manifest resource to the container, returning the container itself. |
T |
addAsManifestResource(java.io.File resource,
java.lang.String target)
Adds the
File as a Manifest resource to the container, returning the container itself. |
T |
addAsManifestResource(java.lang.Package resourcePackage,
java.lang.String resourceName)
Adds the resource as a resource to the container, returning the container itself.
|
T |
addAsManifestResource(java.lang.Package resourcePackage,
java.lang.String resourceName,
ArchivePath target)
Adds the resource as a resource to a specific path inside the container, returning the container itself.
|
T |
addAsManifestResource(java.lang.Package resourcePackage,
java.lang.String resourceName,
java.lang.String target)
Adds the resource as a resource to a specific path inside the container, returning the container itself.
|
T |
addAsManifestResource(java.lang.String resourceName)
Adds the resource as a Manifest resource to the container, returning the container itself.
|
T |
addAsManifestResource(java.lang.String resourceName,
ArchivePath target)
Adds the resource as a Manifest resource to the container, returning the container itself.
|
T |
addAsManifestResource(java.lang.String resourceName,
java.lang.String target)
Adds the resource as a Manifest resource to the container, returning the container itself.
|
T |
addAsManifestResource(java.net.URL resource,
ArchivePath target)
Adds the
URL as a Manifest resource to the container, returning the container itself. |
T |
addAsManifestResource(java.net.URL resource,
java.lang.String target)
Adds the
URL as a Manifest resource to the container, returning the container itself. |
T |
addAsManifestResources(java.lang.Package resourcePackage,
java.lang.String... resourceNames)
Adds the resources inside the package as multiple resources to the container, returning the container itself.
|
T |
addAsServiceProvider(java.lang.Class<?> serviceInterface,
java.lang.Class<?>... serviceImpls)
Adds a META-INF/services/ServiceInterfaceName
Asset representing this service. |
T |
addAsServiceProvider(java.lang.String serviceInterface,
java.lang.String... serviceImpls)
Adds a META-INF/services/ServiceInterfaceName
Asset representing this service. |
T |
addManifest()
Adds a default generated MANIFEST.MF manifest to the current archive.
|
T |
setManifest(Asset resource)
Adds the
Asset as MANIFEST.FM to the container, returning the container itself. |
T |
setManifest(java.io.File resource)
Adds the
File as MANIFEST.FM to the container, returning the container itself. |
T |
setManifest(java.lang.Package resourcePackage,
java.lang.String resourceName)
Adds the resource inside the package as a MANIFEST.MF to the container, returning the container itself.
|
T |
setManifest(java.lang.String resourceName)
Adds the resource as MANIFEST.FM to the container, returning the container itself.
|
T |
setManifest(java.net.URL resource)
Adds the
URL as MANIFEST.FM to the container, returning the container itself. |
static final java.lang.String DEFAULT_MANIFEST_NAME
T setManifest(java.lang.String resourceName) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourceName
- resource to addjava.lang.IllegalArgumentException
- if resourceName is nullsetManifest(Asset)
T setManifest(java.io.File resource) throws java.lang.IllegalArgumentException
File
as MANIFEST.FM to the container, returning the container itself.resource
- File
resource to addjava.lang.IllegalArgumentException
- if resource is nullsetManifest(Asset)
T setManifest(java.net.URL resource) throws java.lang.IllegalArgumentException
URL
as MANIFEST.FM to the container, returning the container itself.resource
- URL
resource to addjava.lang.IllegalArgumentException
- if resource is nullsetManifest(Asset)
T setManifest(Asset resource) throws java.lang.IllegalArgumentException
Asset
as MANIFEST.FM to the container, returning the container itself.resource
- File
resource to addjava.lang.IllegalArgumentException
- if resource is nulladdAsManifestResource(Asset, ArchivePath)
T setManifest(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagejava.lang.IllegalArgumentException
- if resourcePackage is nulljava.lang.IllegalArgumentException
- if resourceName is nullT addAsManifestResource(java.lang.String resourceName) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourceName
- resource to addjava.lang.IllegalArgumentException
- if resourceName is nulljava.lang.IllegalArgumentException
- if target is nullT addAsManifestResource(java.io.File resource) throws java.lang.IllegalArgumentException
File
as a Manifest resource to the container, returning the container itself. File
will be placed into the Container Manifest path under File.getName()
.resource
- resource to addjava.lang.IllegalArgumentException
- if File
resource is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourceName
- resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resourceName is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(java.io.File resource, java.lang.String target) throws java.lang.IllegalArgumentException
File
as a Manifest resource to the container, returning the container itself.resource
- File
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resource is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(java.net.URL resource, java.lang.String target) throws java.lang.IllegalArgumentException
URL
as a Manifest resource to the container, returning the container itself.resource
- URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resource is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(Asset resource, java.lang.String target) throws java.lang.IllegalArgumentException
Asset
as a Manifest resource to the container, returning the container itself.resource
- Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resource is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourceName
- resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resourceName is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(java.io.File resource, ArchivePath target) throws java.lang.IllegalArgumentException
File
as a Manifest resource to the container, returning the container itself.resource
- File
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resource is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(java.net.URL resource, ArchivePath target) throws java.lang.IllegalArgumentException
URL
as a Manifest resource to the container, returning the container itself.resource
- URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resource is nulljava.lang.IllegalArgumentException
- if target is nulladdAsManifestResource(Asset, ArchivePath)
T addAsManifestResource(Asset resource, ArchivePath target) throws java.lang.IllegalArgumentException
Asset
as a Manifest resource to the container, returning the container itself.resource
- Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s
manifest path.java.lang.IllegalArgumentException
- if resource is nulljava.lang.IllegalArgumentException
- if target is nullT addAsManifestResources(java.lang.Package resourcePackage, java.lang.String... resourceNames) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourcePackage
- The package of the resourcesresourceNames
- The names of the resources inside resoucePackagejava.lang.IllegalArgumentException
- if resourcePackage is nulljava.lang.IllegalArgumentException
- if no resourceNames are specified or containing nullT addAsManifestResource(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagejava.lang.IllegalArgumentException
- if resourcePackage is nulljava.lang.IllegalArgumentException
- if resourceName is nullT addAsManifestResource(java.lang.Package resourcePackage, java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagetarget
- The target location inside the containerjava.lang.IllegalArgumentException
- if resourcePackage is nulljava.lang.IllegalArgumentException
- if resourceName is nulljava.lang.IllegalArgumentException
- if target is nullT addAsManifestResource(java.lang.Package resourcePackage, java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagetarget
- The target location inside the containerjava.lang.IllegalArgumentException
- if resourcePackage is nulljava.lang.IllegalArgumentException
- if resourceName is nulljava.lang.IllegalArgumentException
- if target is nullT addAsServiceProvider(java.lang.Class<?> serviceInterface, java.lang.Class<?>... serviceImpls) throws java.lang.IllegalArgumentException
Asset
representing this service.
Warning: this method does not add the specified classes to the archive.serviceInterface
- The Service Interface classserviceImpls
- The Service Interface Implementationsjava.lang.IllegalArgumentException
- if serviceInterface is nulljava.lang.IllegalArgumentException
- if serviceImpls is null or contain null valuesT addAsServiceProvider(java.lang.String serviceInterface, java.lang.String... serviceImpls)
Asset
representing this service.serviceInterface
- The Service Interface class nameserviceImpls
- The Service Interface Implementations class namesjava.lang.IllegalArgumentException
- if serviceInterface is nulljava.lang.IllegalArgumentException
- if serviceImpls is null or contain null valuesaddAsServiceProvider(Class, Class...)
T addManifest() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if serviceInterface is null