|
ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
org.jboss.shrinkwrap.impl.base.container.ContainerBase<T>
org.jboss.shrinkwrap.impl.base.container.WebContainerBase<T>
T
- public abstract class WebContainerBase<T extends Archive<T>>
WebContainerBase Abstract class that helps implement the WebContainer. Used by specs that extends the WebContainer.
Field Summary |
---|
Fields inherited from interface org.jboss.shrinkwrap.api.container.ManifestContainer |
---|
DEFAULT_MANIFEST_NAME |
Constructor Summary | |
---|---|
protected |
WebContainerBase(Class<T> actualType,
Archive<?> archive)
|
Method Summary | |
---|---|
T |
addAsServiceProvider(Class<?> serviceInterface,
Class<?>... serviceImpls)
Adds a META-INF/services/ServiceInterfaceName Asset representing this service. |
T |
addAsServiceProviderAndClasses(Class<?> serviceInterface,
Class<?>... serviceImpls)
Adds a META-INF/services/ServiceInterfaceName Asset and the classes related to the service
to the archive. |
T |
addAsWebInfResource(Asset resource,
ArchivePath target)
Adds the Asset as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(Asset resource,
String target)
Adds the Asset as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(File resource)
Adds the File as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(File resource,
ArchivePath target)
Adds the File as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(File resource,
String target)
Adds the File as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(Package resourcePackage,
String resourceName)
Adds the resource as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(Package resourcePackage,
String resourceName,
ArchivePath target)
Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself. |
T |
addAsWebInfResource(Package resourcePackage,
String resourceName,
String target)
Adds the resource as a WEB-INF resource to a specific path inside the container, returning the container itself. |
T |
addAsWebInfResource(String resourceName)
Adds the resource as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(String resourceName,
ArchivePath target)
Adds the resource as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(String resourceName,
String target)
Adds the resource as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(URL resource,
ArchivePath target)
Adds the URL as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResource(URL resource,
String target)
Adds the URL as a WEB-INF resource to the container, returning the container itself. |
T |
addAsWebInfResources(Package resourcePackage,
String... resourceNames)
Adds the resources inside the package as multiple WEB-INF resources to the container, returning the container itself. |
T |
addAsWebResource(Asset resource,
ArchivePath target)
Adds the Asset as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(Asset resource,
String target)
Adds the Asset as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(File resource)
Adds the File as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(File resource,
ArchivePath target)
Adds the File as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(File resource,
String target)
Adds the File as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(Package resourcePackage,
String resourceName)
Adds the resource as a resource to the container, returning the container itself. |
T |
addAsWebResource(Package resourcePackage,
String resourceName,
ArchivePath target)
Adds the resource as a resource to a specific path inside the container, returning the container itself. |
T |
addAsWebResource(Package resourcePackage,
String resourceName,
String target)
Adds the resource as a resource to a specific path inside the container, returning the container itself. |
T |
addAsWebResource(String resourceName)
Adds the resource as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(String resourceName,
ArchivePath target)
Adds the resource as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(String resourceName,
String target)
Adds the resource as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(URL resource,
ArchivePath target)
Adds the URL as a Web resource to the container, returning the container itself. |
T |
addAsWebResource(URL resource,
String target)
Adds the URL as a Web resource to the container, returning the container itself. |
T |
addAsWebResources(Package resourcePackage,
String... resourceNames)
Adds the resources inside the package as multiple resources to the container, returning the container itself. |
protected abstract ArchivePath |
getServiceProvidersPath()
Returns the path to web container service providers |
protected abstract ArchivePath |
getWebInfPath()
Returns the path to WEB-INF |
protected abstract ArchivePath |
getWebPath()
Returns the path to web resources |
T |
setWebXML(Asset resource)
Adds the Asset as web.xml to the container, returning the container itself. |
T |
setWebXML(File resource)
Adds the File as web.xml to the container, returning the container itself. |
T |
setWebXML(Package resourcePackage,
String resourceName)
Adds the resource inside the package as web.xml to the container, returning the container itself. |
T |
setWebXML(String resourceName)
Adds the resource as web.xml to the container, returning the container itself. |
T |
setWebXML(URL resource)
Adds the URL as web.xml to the container, returning the container itself. |
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 |
Constructor Detail |
---|
protected WebContainerBase(Class<T> actualType, Archive<?> archive)
Method Detail |
---|
protected abstract ArchivePath getWebPath()
protected abstract ArchivePath getWebInfPath()
protected abstract ArchivePath getServiceProvidersPath()
public T setWebXML(String resourceName) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
setWebXML
in interface WebContainer<T extends Archive<T>>
resourceName
- resource to add
IllegalArgumentException
- if resourceName is nullWebContainer.setWebXML(Asset)
public T setWebXML(File resource) throws IllegalArgumentException
WebContainer
File
as web.xml to the container, returning the container itself.
setWebXML
in interface WebContainer<T extends Archive<T>>
resource
- File
resource to add
IllegalArgumentException
- if resource is nullWebContainer.setWebXML(Asset)
public T setWebXML(URL resource) throws IllegalArgumentException
WebContainer
URL
as web.xml to the container, returning the container itself.
setWebXML
in interface WebContainer<T extends Archive<T>>
resource
- URL
resource to add
IllegalArgumentException
- if resource is nullWebContainer.setWebXML(Asset)
public T setWebXML(Asset resource) throws IllegalArgumentException
WebContainer
Asset
as web.xml to the container, returning the container itself.
setWebXML
in interface WebContainer<T extends Archive<T>>
resource
- Asset
resource to add
IllegalArgumentException
- if resource is nulladdAsWebResource(Asset, ArchivePath)
public T setWebXML(Package resourcePackage, String resourceName) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
setWebXML
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourcesresourceName
- The name of the resources inside resourcePackage
IllegalArgumentException
- if resourcePackage is nullpublic T addAsWebResource(String resourceName) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resourceName
- resource to add
IllegalArgumentException
- if resourceName is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(File resource) throws IllegalArgumentException
WebContainer
File
as a Web resource to the container, returning the container itself.
File
will be placed into the Container Web path under File.getName()
.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resource
- resource to add
IllegalArgumentException
- if File
resource is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(String resourceName, String target) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resourceName
- resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resourceName is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(File resource, String target) throws IllegalArgumentException
WebContainer
File
as a Web resource to the container, returning the container itself.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resource
- File
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resource is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(URL resource, String target) throws IllegalArgumentException
WebContainer
URL
as a Web resource to the container, returning the container itself.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resource
- URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resource is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(Asset resource, String target) throws IllegalArgumentException
WebContainer
Asset
as a Web resource to the container, returning the container itself.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resource
- Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resource is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(String resourceName, ArchivePath target) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resourceName
- resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resourceName is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(File resource, ArchivePath target) throws IllegalArgumentException
File
as a Web resource to the container, returning the container itself.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resource
- File
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resource is nullWebContainer.addAsWebResource(java.io.File, org.jboss.shrinkwrap.api.ArchivePath)
public T addAsWebResource(URL resource, ArchivePath target) throws IllegalArgumentException
WebContainer
URL
as a Web resource to the container, returning the container itself.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resource
- URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resource is nullWebContainer.addAsWebResource(Asset, ArchivePath)
public T addAsWebResource(Asset resource, ArchivePath target) throws IllegalArgumentException
Asset
as a Web resource to the container, returning the container itself.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resource
- Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s web path.
IllegalArgumentException
- if resource is nullWebContainer.addAsWebResource(org.jboss.shrinkwrap.api.asset.Asset, org.jboss.shrinkwrap.api.ArchivePath)
public T addAsWebResources(Package resourcePackage, String... resourceNames) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebResources
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourcesresourceNames
- The names of the resources inside resoucePackage
IllegalArgumentException
- if resourcePackage is nullWebContainer.addAsWebResources(java.lang.Package, java.lang.String[])
public T addAsWebResource(Package resourcePackage, String resourceName) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackage
IllegalArgumentException
- if resourcePackage is nullpublic T addAsWebResource(Package resourcePackage, String resourceName, String target) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagetarget
- The target location inside the container
IllegalArgumentException
- if resourcePackage is nullpublic T addAsWebResource(Package resourcePackage, String resourceName, ArchivePath target) throws IllegalArgumentException
WebContainer
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebResource
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagetarget
- The target location inside the container
IllegalArgumentException
- if resourcePackage is nullpublic T addAsWebInfResource(String resourceName) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resourceName
- resource to add
Archive
IllegalArgumentException
- if resourceName is not specifiedWebContainer.addAsWebInfResource(java.lang.String)
public T addAsWebInfResource(File resource) throws IllegalArgumentException
File
as a WEB-INF resource to the container, returning the container itself.
File
will be placed into the Container WEB-INF path under File.getName()
.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resource
- Resource to add
Archive
IllegalArgumentException
- if File
resource is nullWebContainer.addAsWebInfResource(java.io.File)
public T addAsWebInfResource(String resourceName, String target) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resourceName
- resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- if resourceName or target is not specifiedWebContainer.addAsWebInfResource(java.lang.String, java.lang.String)
public T addAsWebInfResource(File resource, String target) throws IllegalArgumentException
File
as a WEB-INF resource to the container, returning the container itself.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resource
- File
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- If the resource or target is not specifiedWebContainer.addAsWebInfResource(java.io.File, java.lang.String)
public T addAsWebInfResource(URL resource, String target) throws IllegalArgumentException
URL
as a WEB-INF resource to the container, returning the container itself.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resource
- URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- If the resource or target is not specifiedWebContainer.addAsWebInfResource(java.net.URL, java.lang.String)
public T addAsWebInfResource(Asset resource, String target) throws IllegalArgumentException
Asset
as a WEB-INF resource to the container, returning the container itself.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resource
- Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- If the resource or target is not specifiedWebContainer.addAsWebInfResource(org.jboss.shrinkwrap.api.asset.Asset, java.lang.String)
public T addAsWebInfResource(String resourceName, ArchivePath target) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resourceName
- resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- If the resource or target is not specifiedWebContainer.addAsWebInfResource(java.lang.String, org.jboss.shrinkwrap.api.ArchivePath)
public T addAsWebInfResource(File resource, ArchivePath target) throws IllegalArgumentException
File
as a WEB-INF resource to the container, returning the container itself.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resource
- File
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- If the resource or target is not specifiedWebContainer.addAsWebInfResource(java.io.File, org.jboss.shrinkwrap.api.ArchivePath)
public T addAsWebInfResource(URL resource, ArchivePath target) throws IllegalArgumentException
URL
as a WEB-INF resource to the container, returning the container itself.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resource
- URL
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- If the resource or target is not specifiedWebContainer.addAsWebInfResource(java.net.URL, org.jboss.shrinkwrap.api.ArchivePath)
public T addAsWebInfResource(Asset resource, ArchivePath target) throws IllegalArgumentException
Asset
as a WEB-INF resource to the container, returning the container itself.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resource
- Asset
resource to addtarget
- The target path within the archive in which to add the resource, relative to the Archive
s WEB-INF path.
Archive
IllegalArgumentException
- If the resource or target is not specifiedWebContainer.addAsWebInfResource(org.jboss.shrinkwrap.api.asset.Asset, org.jboss.shrinkwrap.api.ArchivePath)
public T addAsWebInfResources(Package resourcePackage, String... resourceNames) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebInfResources
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourcesresourceNames
- The names of the resources inside resourcePackage
Archive
IllegalArgumentException
- If resourcePackage is null, or if no resourceNames are specified or containing nullWebContainer.addAsWebInfResources(java.lang.Package, java.lang.String[])
public T addAsWebInfResource(Package resourcePackage, String resourceName) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resourcePackage
Archive
IllegalArgumentException
- If the package or resource name is not specifiedWebContainer.addAsWebInfResource(java.lang.Package, java.lang.String)
public T addAsWebInfResource(Package resourcePackage, String resourceName, String target) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagetarget
- The target location inside the container
Archive
IllegalArgumentException
- If the package, resource name, or target is not specifiedWebContainer.addAsWebInfResource(java.lang.Package, java.lang.String, java.lang.String)
public T addAsWebInfResource(Package resourcePackage, String resourceName, ArchivePath target) throws IllegalArgumentException
ClassLoader
used to obtain the resource is up to the implementation.
addAsWebInfResource
in interface WebContainer<T extends Archive<T>>
resourcePackage
- The package of the resourceresourceName
- The name of the resource inside resoucePackagetarget
- The target location inside the container
Archive
IllegalArgumentException
- If the package, resource name, or target is not specifiedWebContainer.addAsWebInfResource(java.lang.Package, java.lang.String, org.jboss.shrinkwrap.api.ArchivePath)
public T addAsServiceProvider(Class<?> serviceInterface, Class<?>... serviceImpls) throws IllegalArgumentException
ManifestContainer
Asset
representing this service.
Warning: this method does not add the specified classes to the archive.
addAsServiceProvider
in interface ManifestContainer<T extends Archive<T>>
addAsServiceProvider
in class ContainerBase<T extends Archive<T>>
serviceInterface
- The Service Interface classserviceImpls
- The Service Interface Implementations
IllegalArgumentException
- if serviceInterface is nullpublic T addAsServiceProviderAndClasses(Class<?> serviceInterface, Class<?>... serviceImpls) throws IllegalArgumentException
ServiceProviderContainer
Asset
and the classes related to the service
to the archive.
addAsServiceProviderAndClasses
in interface ServiceProviderContainer<T extends Archive<T>>
addAsServiceProviderAndClasses
in class ContainerBase<T extends Archive<T>>
serviceInterface
- The Service Interface classserviceImpls
- The Service Interface Implementations
IllegalArgumentException
- if serviceInterface is null
|
ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |