|
Cocoon API: Class Utils
org.apache.cocoon
|
Constructor Summary | |
Utils()
|
Method Summary | |
static java.lang.String |
encode(javax.servlet.http.HttpServletRequest req)
Encodes the given request into a string using the format protocol://serverName:serverPort/requestURI?query |
static java.lang.String |
encode(javax.servlet.http.HttpServletRequest req,
boolean agent)
Encodes the given request into a string using the format userAgent:method:protocol://serverName:serverPort/requestURI?query with the agent flag controlling the presence of the userAgent field. |
static java.lang.String |
encode(javax.servlet.http.HttpServletRequest req,
boolean agent,
boolean query)
Encodes the given request into a string using the format userAgent:method:protocol://serverName:serverPort/requestURI?query with the agent flag controlling the presence of the userAgent field and the query flag controlling the query field. |
static java.util.Vector |
getAllPIs(org.w3c.dom.Document document,
java.lang.String name)
This method returns a vector of PI nodes based on the PI target name. |
static java.util.Vector |
getAllPIs(org.w3c.dom.Document document,
java.lang.String name,
boolean remove)
This method returns a vector of PI nodes based on the PI target name and removes the found PIs from the document if the remove flag is true. |
static java.lang.String |
getBasename(javax.servlet.http.HttpServletRequest request,
java.lang.Object context)
XXX: This is a dirty hack. |
static java.lang.String |
getBasepath(javax.servlet.http.HttpServletRequest request,
java.lang.Object context)
|
static byte[] |
getBytes(java.lang.String s,
java.lang.String encoding)
|
static org.w3c.dom.ProcessingInstruction |
getFirstPI(org.w3c.dom.Document document,
java.lang.String name)
This method returns the first PI node based on the PI target name. |
static org.w3c.dom.ProcessingInstruction |
getFirstPI(org.w3c.dom.Document document,
java.lang.String name,
boolean remove)
This method returns the first PI node based on the PI target name and removes it from the document if the remove flag is true. |
static java.lang.Object |
getLocationResource(java.lang.String location)
|
static java.lang.Object |
getLocationResource(java.lang.String location,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
|
static java.util.Hashtable |
getPIPseudoAttributes(org.w3c.dom.Document document,
java.lang.String name)
This method returns an hashtable with all the pseudo attributes collected in the document. |
static java.util.Hashtable |
getPIPseudoAttributes(org.w3c.dom.ProcessingInstruction pi)
This method returns an hashtable of pseudo attributes found in the first occurrence of the PI with the given name in the given document. |
static java.lang.String |
getRootpath(javax.servlet.http.HttpServletRequest request,
java.lang.Object context)
|
static java.lang.String |
getStackTraceAsString(java.lang.Throwable e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utils()
Method Detail |
public static byte[] getBytes(java.lang.String s, java.lang.String encoding) throws java.io.UnsupportedEncodingException
public static final java.util.Vector getAllPIs(org.w3c.dom.Document document, java.lang.String name)
public static final java.util.Vector getAllPIs(org.w3c.dom.Document document, java.lang.String name, boolean remove)
public static final org.w3c.dom.ProcessingInstruction getFirstPI(org.w3c.dom.Document document, java.lang.String name)
public static final org.w3c.dom.ProcessingInstruction getFirstPI(org.w3c.dom.Document document, java.lang.String name, boolean remove)
public static final java.util.Hashtable getPIPseudoAttributes(org.w3c.dom.Document document, java.lang.String name)
public static final java.util.Hashtable getPIPseudoAttributes(org.w3c.dom.ProcessingInstruction pi)
public static final java.lang.String encode(javax.servlet.http.HttpServletRequest req)
public static final java.lang.String encode(javax.servlet.http.HttpServletRequest req, boolean agent)
public static final java.lang.String encode(javax.servlet.http.HttpServletRequest req, boolean agent, boolean query)
public static final java.lang.String getBasename(javax.servlet.http.HttpServletRequest request, java.lang.Object context)
public static final java.lang.String getBasepath(javax.servlet.http.HttpServletRequest request, java.lang.Object context)
public static final java.lang.String getRootpath(javax.servlet.http.HttpServletRequest request, java.lang.Object context)
public static final java.lang.String getStackTraceAsString(java.lang.Throwable e)
public static final java.lang.Object getLocationResource(java.lang.String location) throws java.net.MalformedURLException
public static final java.lang.Object getLocationResource(java.lang.String location, javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context) throws java.lang.Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |