|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.module.XmlMerger
org.codehaus.cargo.module.webapp.merge.WebXmlMerger
public class WebXmlMerger
Helper class that can merge two web deployment descriptors.
| Constructor Summary | |
|---|---|
WebXmlMerger()
Constructor. |
|
WebXmlMerger(Descriptor base)
Constructor. |
|
| Method Summary | |
|---|---|
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,
java.lang.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. |
| Methods inherited from class org.codehaus.cargo.module.XmlMerger |
|---|
addMerger, getMergers |
| Methods inherited from class org.codehaus.cargo.util.log.LoggedObject |
|---|
getLogger, setLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebXmlMerger()
public WebXmlMerger(Descriptor base)
base - Descriptor to use| Method Detail |
|---|
public void init(Descriptor base)
init in interface DescriptorMergerinit in class XmlMergerbase - Descriptor to useinit(Descriptor)public final void merge(Descriptor theMerge)
merge in interface DescriptorMergermerge in class XmlMergertheMerge - Descriptor to usemerge(Descriptor)
protected VendorWebAppDescriptor getVendorWebAppDescriptor(WebXml theWebXml,
java.lang.Class clazz)
theWebXml - in the web xmlclazz - the class of vendor descriptor
protected 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 descriptor
protected final void mergeServlets(WebXml theWebXml)
throws CargoException
theWebXml - The descriptor that contains the servlet definitions that are to be merged
into the original descriptor
CargoException - if there is any merge problem
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.SecurityExceptionprotected final void mergeSecurityRoles(WebXml theWebXml)
theWebXml - The descriptor that contains the security roles that are to be merged into
the original descriptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||