|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.tools.deploy.JetspeedWebApplicationRewriter
public abstract class JetspeedWebApplicationRewriter
Utilities for manipulating the web.xml deployment descriptor
Field Summary | |
---|---|
private boolean |
changed
|
private org.jdom.Document |
document
|
static String |
JETSPEED_CONTAINER
|
static String |
JETSPEED_SERVLET_CLASS
|
static String |
JETSPEED_SERVLET_DESCRIPTION
|
static String |
JETSPEED_SERVLET_DISPLAY_NAME
|
static String |
NAMESPACE_PREFIX
|
private String |
portletApplication
|
private boolean |
portletTaglibAdded
|
protected static String |
WEB_XML_PATH
|
Constructor Summary | |
---|---|
JetspeedWebApplicationRewriter(org.jdom.Document doc)
|
|
JetspeedWebApplicationRewriter(org.jdom.Document doc,
String portletApplication)
|
Method Summary | |
---|---|
protected abstract String |
getJetspeedServletMappingXPath()
Returns the jetspeed servlet mapping xpath. |
protected abstract String |
getJetspeedServletXPath()
Returns the jetspeed servlet xpath. |
protected abstract String |
getPortletTagLibXPath()
Returns the portlet taglib xpath. |
protected org.jdom.xpath.XPath |
getXPath(String path)
Returns the xpath containing the namespace prefix 'js' mapped to the document default namespace. |
protected void |
insertContextNameParam(org.jdom.Element jetspeedServletElement)
|
protected void |
insertElementCorrectly(org.jdom.Element root,
org.jdom.Element toInsert,
String[] elementsBefore)
insertElementCorrectly |
protected abstract void |
insertJetspeedServlet(org.jdom.Element root)
Inserts the jetspeed servlet into web.xml |
protected abstract void |
insertJetspeedServletMapping(org.jdom.Element root)
Inserts the jetspeed servlet mapping into web.xml |
protected void |
insertLoadOnStartup(org.jdom.Element jetspeedServletElement)
|
protected abstract void |
insertPortletTagLib(org.jdom.Element root)
Inserts the portlet taglib into web.xml |
boolean |
isChanged()
|
boolean |
isPortletTaglibAdded()
|
void |
processWebXML()
processWebXML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JETSPEED_CONTAINER
public static final String JETSPEED_SERVLET_CLASS
public static final String JETSPEED_SERVLET_DISPLAY_NAME
public static final String JETSPEED_SERVLET_DESCRIPTION
public static final String NAMESPACE_PREFIX
protected static final String WEB_XML_PATH
private org.jdom.Document document
private String portletApplication
private boolean changed
private boolean portletTaglibAdded
Constructor Detail |
---|
public JetspeedWebApplicationRewriter(org.jdom.Document doc, String portletApplication)
public JetspeedWebApplicationRewriter(org.jdom.Document doc)
Method Detail |
---|
public void processWebXML() throws Exception
processWebXML
Infuses this PortletApplicationWar's web.xml file withservlet
and a servlet-mapping
element for
the JetspeedContainer servlet. This is only done if the descriptor does
not already contain these items.
MetaDataException
- if there is a problem infusing
Exception
protected void insertContextNameParam(org.jdom.Element jetspeedServletElement)
protected void insertLoadOnStartup(org.jdom.Element jetspeedServletElement)
public boolean isChanged()
protected void insertElementCorrectly(org.jdom.Element root, org.jdom.Element toInsert, String[] elementsBefore) throws Exception
insertElementCorrectly
root
- JDom element representing the < web-app >toInsert
- JDom element to insert into the web.xml hierarchy.elementsBefore
- an array of web.xml elements that should be defined before the
element we want to insert. This order should be the order
defined by the web.xml's DTD type definition.
Exception
public boolean isPortletTaglibAdded()
protected org.jdom.xpath.XPath getXPath(String path) throws org.jdom.JDOMException
path
-
org.jdom.JDOMException
protected abstract String getJetspeedServletXPath()
protected abstract String getJetspeedServletMappingXPath()
protected abstract String getPortletTagLibXPath()
protected abstract void insertJetspeedServlet(org.jdom.Element root) throws Exception
root
-
Exception
protected abstract void insertJetspeedServletMapping(org.jdom.Element root) throws Exception
root
-
Exception
protected abstract void insertPortletTagLib(org.jdom.Element root) throws Exception
root
-
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |