java.lang.Object
com.xpn.xwiki.web.Utils
- public class Utils
- extends java.lang.Object
|
Constructor Summary |
Utils()
|
|
Method Summary |
private static byte |
convertHexDigit(byte b)
Convert a byte character value to hexidecimal digit value. |
static java.lang.String |
decode(java.lang.String name,
com.xpn.xwiki.XWikiContext context)
|
static java.lang.String |
encode(java.lang.String name,
com.xpn.xwiki.XWikiContext context)
|
static java.lang.String |
formEncode(java.lang.String value)
|
static byte[] |
getContent(java.util.List filelist,
java.lang.String name)
|
static java.lang.String |
getFileName(java.util.List filelist,
java.lang.String name)
|
static java.lang.String |
getPage(XWikiRequest request,
java.lang.String defaultpage)
|
static java.lang.String |
getRedirect(java.lang.String action,
com.xpn.xwiki.XWikiContext context)
|
static java.lang.String |
getRedirect(XWikiRequest request,
java.lang.String defaultRedirect)
|
static java.util.Map |
parseParameters(byte[] data,
java.lang.String encoding)
Append request parameters from the specified String to the specified
Map. |
static java.util.Map |
parseParameters(java.lang.String data,
java.lang.String encoding)
Append request parameters from the specified String to the specified
Map. |
static void |
parseTemplate(java.lang.String template,
boolean write,
com.xpn.xwiki.XWikiContext context)
|
static void |
parseTemplate(java.lang.String template,
com.xpn.xwiki.XWikiContext context)
|
static com.xpn.xwiki.XWikiContext |
prepareContext(java.lang.String action,
XWikiRequest request,
XWikiResponse response,
XWikiEngineContext engine_context)
|
private static void |
putMapEntry(java.util.Map map,
java.lang.String name,
java.lang.String value)
Put name value pair in map. |
static java.lang.String |
SQLFilter(java.lang.String text)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
parseTemplate
public static void parseTemplate(java.lang.String template,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
parseTemplate
public static void parseTemplate(java.lang.String template,
boolean write,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
getRedirect
public static java.lang.String getRedirect(XWikiRequest request,
java.lang.String defaultRedirect)
getRedirect
public static java.lang.String getRedirect(java.lang.String action,
com.xpn.xwiki.XWikiContext context)
getPage
public static java.lang.String getPage(XWikiRequest request,
java.lang.String defaultpage)
getFileName
public static java.lang.String getFileName(java.util.List filelist,
java.lang.String name)
getContent
public static byte[] getContent(java.util.List filelist,
java.lang.String name)
throws com.xpn.xwiki.XWikiException
prepareContext
public static com.xpn.xwiki.XWikiContext prepareContext(java.lang.String action,
XWikiRequest request,
XWikiResponse response,
XWikiEngineContext engine_context)
throws com.xpn.xwiki.XWikiException
parseParameters
public static java.util.Map parseParameters(java.lang.String data,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
- Append request parameters from the specified String to the specified
Map. It is presumed that the specified Map is not accessed from any
other thread, so no synchronization is performed.
IMPLEMENTATION NOTE: URL decoding is performed
individually on the parsed name and value elements, rather than on
the entire query string ahead of time, to properly deal with the case
where the name or value includes an encoded "=" or "&" character
that would otherwise be interpreted as a delimiter.
parseParameters
public static java.util.Map parseParameters(byte[] data,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
- Append request parameters from the specified String to the specified
Map. It is presumed that the specified Map is not accessed from any
other thread, so no synchronization is performed.
IMPLEMENTATION NOTE: URL decoding is performed
individually on the parsed name and value elements, rather than on
the entire query string ahead of time, to properly deal with the case
where the name or value includes an encoded "=" or "&" character
that would otherwise be interpreted as a delimiter.
NOTE: byte array data is modified by this method. Caller beware.
convertHexDigit
private static byte convertHexDigit(byte b)
- Convert a byte character value to hexidecimal digit value.
putMapEntry
private static void putMapEntry(java.util.Map map,
java.lang.String name,
java.lang.String value)
- Put name value pair in map.
Put name and value pair in map. When name already exist, add value
to array of values.
Code borrowed from Apache Tomcat 5.0
formEncode
public static java.lang.String formEncode(java.lang.String value)
SQLFilter
public static java.lang.String SQLFilter(java.lang.String text)
encode
public static java.lang.String encode(java.lang.String name,
com.xpn.xwiki.XWikiContext context)
decode
public static java.lang.String decode(java.lang.String name,
com.xpn.xwiki.XWikiContext context)