Class EnterpriseContainerBase<T extends Archive<T>>
- java.lang.Object
-
- org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
-
- org.jboss.shrinkwrap.impl.base.container.ContainerBase<T>
-
- org.jboss.shrinkwrap.impl.base.container.EnterpriseContainerBase<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Archive<T>,Assignable,ClassContainer<T>,EnterpriseContainer<T>,LibraryContainer<T>,ManifestContainer<T>,ResourceContainer<T>,ServiceProviderContainer<T>,ArchiveFormatAssociable
- Direct Known Subclasses:
EnterpriseArchiveImpl
public abstract class EnterpriseContainerBase<T extends Archive<T>> extends ContainerBase<T> implements EnterpriseContainer<T>
EnterpriseContainerSupport Abstract class that helps implement the EnterpriseContainer. Used by specs that extends the EnterpriseContainer.- Version:
- $Revision: $
-
-
Field Summary
-
Fields inherited from interface org.jboss.shrinkwrap.api.container.ManifestContainer
DEFAULT_MANIFEST_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEnterpriseContainerBase(java.lang.Class<T> actualType, Archive<?> archive)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TaddAsApplicationResource(java.io.File resource)Adds aFileto thisArchives application context.TaddAsApplicationResource(java.io.File resource, java.lang.String target)Adds aFileto thisArchives application context.TaddAsApplicationResource(java.io.File resource, ArchivePath target)Adds aFileto thisArchives application context.TaddAsApplicationResource(java.lang.Package resourcePackage, java.lang.String resourceName)Adds the resource as a resource to the container, returning the container itself.TaddAsApplicationResource(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.TaddAsApplicationResource(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.TaddAsApplicationResource(java.lang.String resourceName)Adds a resource to thisArchives application context.TaddAsApplicationResource(java.lang.String resourceName, java.lang.String target)Adds a resource to thisArchives application context.TaddAsApplicationResource(java.lang.String resourceName, ArchivePath target)Adds a resource to thisArchives application context.TaddAsApplicationResource(java.net.URL resource, java.lang.String target)Adds aURLto thisArchives application context.TaddAsApplicationResource(java.net.URL resource, ArchivePath target)Adds aURLto thisArchives application context.TaddAsApplicationResource(Asset resource, java.lang.String target)TaddAsApplicationResource(Asset resource, ArchivePath target)TaddAsApplicationResources(java.lang.Package resourcePackage, java.lang.String... resourceNames)Adds the resources inside the package as multiple resources to the container, returning the container itself.TaddAsModule(java.io.File resource)Adds aFileto thisArchives module context.TaddAsModule(java.io.File resource, java.lang.String targetPath)Adds aFileto thisArchives module context.TaddAsModule(java.io.File resource, ArchivePath targetPath)Adds aFileto thisArchives module context.TaddAsModule(java.lang.String resourceName)Adds a resource to thisArchives module context.TaddAsModule(java.lang.String resourceName, java.lang.String targetPath)Adds a resource to thisArchives module context.TaddAsModule(java.lang.String resourceName, ArchivePath targetPath)Adds a resource to thisArchives module context.TaddAsModule(java.net.URL resource, java.lang.String targetPath)Adds aURLto thisArchives module context.TaddAsModule(java.net.URL resource, ArchivePath targetPath)Adds aURLto thisArchives module context.TaddAsModule(Archive<?> archive)Adds a archive to thisArchives module context.TaddAsModule(Asset resource, java.lang.String targetPath)TaddAsModule(Asset resource, ArchivePath targetPath)TaddAsModules(java.io.File... resources)Adds the specifiedFiles to thisArchives module context.TaddAsModules(java.lang.String... resourceNames)Adds the specified resources to thisArchives module context.TaddAsModules(Archive<?>... archives)Adds the specified archives to thisArchives module context.protected abstract ArchivePathgetApplicationPath()Should be implemented to set the path for Application related resources.protected abstract ArchivePathgetModulePath()Should be implemented to set the path for Module related resources.TsetApplicationXML(java.io.File resource)Adds aFileto thisArchiveas application.xml.TsetApplicationXML(java.lang.Package resourcePackage, java.lang.String resourceName)Adds a resource inside the package to thisArchiveas application.xml.TsetApplicationXML(java.lang.String resourceName)Adds a resource to thisArchiveas application.xml.TsetApplicationXML(java.net.URL resource)Adds aURLto thisArchiveas application.xml.TsetApplicationXML(Asset resource)-
Methods inherited from class org.jboss.shrinkwrap.impl.base.container.ContainerBase
add, add, add, add, add, add, add, addAsDirectories, addAsDirectories, addAsDirectory, addAsDirectory, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibraries, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsLibrary, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResource, addAsManifestResources, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResource, addAsResources, addAsServiceProvider, addAsServiceProvider, addAsServiceProviderAndClasses, addClass, addClass, addClass, addClasses, addDefaultPackage, addHandlers, addManifest, addPackage, addPackage, addPackages, addPackages, addPackages, addPackages, contains, contains, covarientReturn, delete, delete, deleteClass, deleteClass, deleteClasses, deleteDefaultPackage, deletePackage, deletePackage, deletePackages, deletePackages, deletePackages, deletePackages, equals, filter, get, get, getActualClass, getArchiveFormat, getAsType, getAsType, getAsType, getAsType, getAsType, getAsType, getClassesPath, getContent, getContent, getId, getLibraryPath, getManifestPath, getName, getResourcePath, hashCode, merge, merge, merge, merge, merge, merge, move, move, setManifest, setManifest, setManifest, setManifest, setManifest, shallowCopy, shallowCopy, toString, toString, toString, writeTo
-
Methods inherited from class org.jboss.shrinkwrap.impl.base.AssignableBase
as, getArchive
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
-
-
-
-
Method Detail
-
getApplicationPath
protected abstract ArchivePath getApplicationPath()
Should be implemented to set the path for Application related resources.- Returns:
- Base Path for the EnterpriseContainer application resources
-
setApplicationXML
public T setApplicationXML(java.lang.String resourceName) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds a resource to thisArchiveas application.xml.
TheClassLoaderused 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"- Specified by:
setApplicationXMLin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceName- Name of theClassLoaderresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
EnterpriseContainer.setApplicationXML(Asset)
-
setApplicationXML
public T setApplicationXML(java.io.File resource) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aFileto thisArchiveas application.xml.
For instance aFile"test/example.xml" could be placed in "/META-INF/application.xml"- Specified by:
setApplicationXMLin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.setApplicationXML(Asset)
-
setApplicationXML
public T setApplicationXML(java.net.URL resource) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aURLto thisArchiveas application.xml.
For instance aURL"http://my.com/example.xml" could be placed in "/META-INF/application.xml"- Specified by:
setApplicationXMLin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-URLresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.setApplicationXML(Asset)
-
setApplicationXML
public T setApplicationXML(Asset resource) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainer- Specified by:
setApplicationXMLin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null
-
setApplicationXML
public T setApplicationXML(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds a resource inside the package to thisArchiveas application.xml.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
setApplicationXMLin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourcesresourceName- The name of the resource inside resourcePackage- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is null- See Also:
EnterpriseContainer.setApplicationXML(String)
-
addAsApplicationResource
public T addAsApplicationResource(java.lang.String resourceName) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds a resource to thisArchives application context.
TheClassLoaderused 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"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceName- Name of theClassLoaderresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(java.io.File resource) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aFileto thisArchives application context.
For instance aFileof "test/example.xml" could be placed in "/META-INF/test/example.xml"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds a resource to thisArchives application context.
TheClassLoaderused 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"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceName- Name of theClassLoaderresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(java.io.File resource, java.lang.String target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aFileto thisArchives application context.
For instance aFileof "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(java.net.URL resource, java.lang.String target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aURLto thisArchives application context.
For instance aURLof "http://my.com/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(Asset resource, java.lang.String target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainer- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds a resource to thisArchives application context.
TheClassLoaderused 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"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceName- Name of theClassLoaderresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(java.io.File resource, ArchivePath target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aFileto thisArchives application context.
For instance aFileof "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(java.net.URL resource, ArchivePath target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aURLto thisArchives application context.
For instance aFileof "test/example.xml" and a target of "example/myexample.xml" could be placed in "/META-INF/example/myexample.xml"- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsApplicationResource(Asset, ArchivePath)
-
addAsApplicationResource
public T addAsApplicationResource(Asset resource, ArchivePath target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainer- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to addtarget- The target relative to application path within the archive into which we'll place the resource- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null
-
addAsApplicationResources
public T addAsApplicationResources(java.lang.Package resourcePackage, java.lang.String... resourceNames) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds 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.- Specified by:
addAsApplicationResourcesin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourcesresourceNames- The names of the resources inside resoucePackage- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is null
-
addAsApplicationResource
public T addAsApplicationResource(java.lang.Package resourcePackage, java.lang.String resourceName) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds the resource as a resource to the container, returning the container itself.
TheClassLoaderused to obtain the resource is up to the implementation.- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourcePackage- The package of the resourceresourceName- The name of the resource inside resoucePackage- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourcePackage is null
-
addAsApplicationResource
public T addAsApplicationResource(java.lang.Package resourcePackage, java.lang.String resourceName, java.lang.String target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds 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.- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- 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:
java.lang.IllegalArgumentException- if resourcePackage is null
-
addAsApplicationResource
public T addAsApplicationResource(java.lang.Package resourcePackage, java.lang.String resourceName, ArchivePath target) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds 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.- Specified by:
addAsApplicationResourcein interfaceEnterpriseContainer<T extends Archive<T>>- 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:
java.lang.IllegalArgumentException- if resourcePackage is null
-
getModulePath
protected abstract ArchivePath getModulePath()
Should be implemented to set the path for Module related resources.- Returns:
- Base Path for the EnterpriseContainer module resources
-
addAsModule
public T addAsModule(Archive<?> archive) throws java.lang.IllegalArgumentException
- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
archive- The archive to use- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if archive is null- See Also:
EnterpriseContainer.addAsModule(org.jboss.shrinkwrap.api.Archive)
-
addAsModule
public T addAsModule(java.lang.String resourceName)
Adds a resource to thisArchives module context.
The resource name is used as path.- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceName- Name of theClassLoaderresource to add- Returns:
- This virtual archive
- See Also:
EnterpriseContainer.addAsModule(java.lang.String)
-
addAsModule
public T addAsModule(java.io.File resource) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainer- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModules
public T addAsModules(Archive<?>... archives) throws java.lang.IllegalArgumentException
- Specified by:
addAsModulesin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
archives- The archives to use- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if not archives are specified- See Also:
org.jboss.shrinkwrap.api.container.EnterpriseContainer#addAsModules(org.jboss.shrinkwrap.api.Archive>[])
-
addAsModules
public T addAsModules(java.lang.String... resourceNames) throws java.lang.IllegalArgumentException
Adds the specified resources to thisArchives module context.
The resource names are used as paths.- Specified by:
addAsModulesin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceNames- Names of theClassLoaderresources to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceNames are not specified- See Also:
EnterpriseContainer.addAsModules(java.lang.String[])
-
addAsModules
public T addAsModules(java.io.File... resources) throws java.lang.IllegalArgumentException
- Specified by:
addAsModulesin interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resources-Fileresources to add- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resources are not specified- See Also:
EnterpriseContainer.addAsModules(java.io.File[])
-
addAsModule
public T addAsModule(java.io.File resource, ArchivePath targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aFileto thisArchives module context.- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModule
public T addAsModule(java.lang.String resourceName, ArchivePath targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds a resource to thisArchives module context.- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceName- Name of theClassLoaderresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModule
public T addAsModule(java.net.URL resource, ArchivePath targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aURLto thisArchives module context.- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModule
public T addAsModule(java.io.File resource, java.lang.String targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aFileto thisArchives module context.- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Fileresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModule
public T addAsModule(Asset resource, java.lang.String targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainer- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-Assetresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModule
public T addAsModule(java.lang.String resourceName, java.lang.String targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds a resource to thisArchives module context.- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resourceName- Name of theClassLoaderresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resourceName is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModule
public T addAsModule(java.net.URL resource, java.lang.String targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainerAdds aURLto thisArchives module context.- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if resource is null- See Also:
EnterpriseContainer.addAsModule(Asset, ArchivePath)
-
addAsModule
public T addAsModule(Asset resource, ArchivePath targetPath) throws java.lang.IllegalArgumentException
Description copied from interface:EnterpriseContainer- Specified by:
addAsModulein interfaceEnterpriseContainer<T extends Archive<T>>- Parameters:
resource-URLresource to addtargetPath- The target path within the archive in which to add the resource, relative to theArchives module path.- Returns:
- This virtual archive
- Throws:
java.lang.IllegalArgumentException- if targetPath is null
-
-