public class WebXmlMerger extends XmlMerger
Constructor and Description |
---|
WebXmlMerger()
Constructor.
|
WebXmlMerger(Descriptor base)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkServletVersions(WebXml theWebXml)
Checks the versions of the servlet API in each descriptor, and logs a warning if a mismatch
might result in the loss of definitions.
|
protected VendorWebAppDescriptor |
getVendorWebAppDescriptor(WebXml theWebXml,
Class clazz)
Get the vendor web app descriptor out of the web xml.
|
void |
init(Descriptor base)
Initialise the merger with the base (first) item to be merged.
|
void |
merge(Descriptor theMerge)
Merge the descriptor with a second item.
|
protected void |
mergeFilters(WebXml theWebXml)
Merges the servlet definitions from the specified descriptor into the original descriptor.
|
protected void |
mergeSecurityRoles(WebXml theWebXml)
Merges the security roles from the provided descriptor into the original descriptor.
|
protected void |
mergeServlets(WebXml theWebXml)
Merges the servlet definitions from the specified descriptor into the original descriptor.
|
addMerger, getMergers
getLogger, setLogger
public WebXmlMerger()
public WebXmlMerger(Descriptor base)
base
- Descriptor to usepublic void init(Descriptor base)
init
in interface DescriptorMerger
init
in class XmlMerger
base
- Descriptor to useinit(Descriptor)
public final void merge(Descriptor theMerge)
merge
in interface DescriptorMerger
merge
in class XmlMerger
theMerge
- Descriptor to usemerge(Descriptor)
protected VendorWebAppDescriptor getVendorWebAppDescriptor(WebXml theWebXml, Class clazz)
theWebXml
- in the web xmlclazz
- the class of vendor descriptorprotected final void checkServletVersions(WebXml theWebXml)
theWebXml
- The descriptor that will be merged with the originalprotected final void mergeFilters(WebXml theWebXml)
theWebXml
- The descriptor that contains the filter definitions that are to be merged
into the original descriptorprotected final void mergeServlets(WebXml theWebXml) throws CargoException
theWebXml
- The descriptor that contains the servlet definitions that are to be merged
into the original descriptorCargoException
- if there is any merge problemIllegalAccessException
InstantiationException
NoSuchMethodException
IllegalArgumentException
SecurityException
protected final void mergeSecurityRoles(WebXml theWebXml)
theWebXml
- The descriptor that contains the security roles that are to be merged into
the original descriptorCopyright © 2004-2013 Codehaus. All Rights Reserved.