|
||||||||||
| 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.webapp.WebXmlMerger
public class WebXmlMerger
Helper class that can merge two web deployment descriptors.
| Nested Class Summary | |
|---|---|
protected static interface |
WebXmlMerger.IMergeImplementation
Interface used as a callback for descriptors. |
| Field Summary | |
|---|---|
protected MergeStrategy |
mergeContextParamsStrategy
Strategy for merging context parameters. |
protected MergeStrategy |
mergeListenerStrategy
Strategy for merging listeners. |
| Constructor Summary | |
|---|---|
WebXmlMerger(WebXml theWebXml)
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 |
merge(WebXml theMergeWebXml)
Merges the merge descriptor with the original descriptor. |
protected void |
mergeContextParams(WebXml theWebXml)
Merges the context-param definitions from the specified descriptor into the original descriptor. |
protected void |
mergeEjbLocalRefs(WebXml theWebXml)
Merges the EJB local references from the provided descriptor into the original descriptor. |
protected void |
mergeEjbRefs(WebXml theWebXml)
Merges the EJB references from the provided descriptor into the original descriptor. |
protected void |
mergeEnvironmentEntries(WebXml theWebXml)
Merges the environment entries from the provided descriptor into the original descriptor. |
protected void |
mergeFilters(WebXml theWebXml)
Merges the servlet definitions from the specified descriptor into the original descriptor. |
protected void |
mergeListeners(WebXml theWebXml)
Merges the listener elements from the provided descriptor into the original descriptor. |
protected void |
mergeLoginConfig(WebXml theWebXml)
Merges the login configuration from the provided descriptor into the original descriptor, thereby eventually replacing the existing login config. |
protected void |
mergeResourceEnvironmentReferences(WebXml theWebXml)
Merges the resource environment references from the provided descriptor into the original descriptor. |
protected void |
mergeResourceReferences(WebXml theWebXml)
Merges the resource references from the provided descriptor into the original descriptor. |
protected void |
mergeSecurityConstraints(WebXml theWebXml)
|
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. |
protected void |
mergeVendorDescriptors(WebXml theWebXml)
Merge in any vendor specific descriptors. |
protected void |
mergeVendorDescriptors(WebXml theWebXml,
java.lang.Class clazz,
WebXmlMerger.IMergeImplementation merger)
Find vendor descriptors of a specific class, and merge them if they exist. |
void |
setMergeContextParamsStrategy(MergeStrategy ms)
Set the merging strategy for context-param nodes. |
| 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 |
| Field Detail |
|---|
protected MergeStrategy mergeContextParamsStrategy
protected MergeStrategy mergeListenerStrategy
| Constructor Detail |
|---|
public WebXmlMerger(WebXml theWebXml)
theWebXml - The original descriptor| Method Detail |
|---|
public void setMergeContextParamsStrategy(MergeStrategy ms)
ms - in the merging strategypublic final void merge(WebXml theMergeWebXml)
theMergeWebXml - The descriptor to merge inprotected final void mergeVendorDescriptors(WebXml theWebXml)
theWebXml - xml to merge in
protected final void mergeVendorDescriptors(WebXml theWebXml,
java.lang.Class clazz,
WebXmlMerger.IMergeImplementation merger)
theWebXml - in the web xml to be mergedclazz - in the class of vendor webxml to mergemerger - in the callback class that does the merging
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 original
protected final void mergeContextParams(WebXml theWebXml)
throws MergeException
theWebXml - The descriptor that contains the context-params definitions that are to be
merged into the original descriptor
MergeException - if there is a problem performing the mergeprotected 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)
theWebXml - The descriptor that contains the servlet definitions that are to be merged
into the original descriptorprotected final void mergeListeners(WebXml theWebXml)
theWebXml - The descriptor that contains the references that are to be merged into the
original descriptorprotected final void mergeResourceEnvironmentReferences(WebXml theWebXml)
theWebXml - The descriptor that contains the references that are to be merged into the
original descriptorprotected final void mergeResourceReferences(WebXml theWebXml)
theWebXml - The descriptor that contains the resource refs that are to be merged into
the original descriptorprotected final void mergeSecurityConstraints(WebXml theWebXml)
theWebXml - The descriptor that contains the security constraints that are to be merged
into the original descriptorprotected final void mergeLoginConfig(WebXml theWebXml)
theWebXml - The descriptor that contains the login config that is to be merged into the
original descriptorprotected final void mergeSecurityRoles(WebXml theWebXml)
theWebXml - The descriptor that contains the security roles that are to be merged into
the original descriptorprotected final void mergeEnvironmentEntries(WebXml theWebXml)
theWebXml - The descriptor that contains the environment entries that are to be merged
into the original descriptorprotected final void mergeEjbRefs(WebXml theWebXml)
theWebXml - The descriptor that contains the EJB refs that are to be merged into the
original descriptorprotected final void mergeEjbLocalRefs(WebXml theWebXml)
theWebXml - The descriptor that contains the EJB local refs 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 | |||||||||