public class ShortURLConstructor extends DefaultURLConstructor
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
m_urlPrefix
Contains the path part after the JSPWiki base URL
|
static java.lang.String |
PROP_PREFIX
This corresponds to your WikiServlet path.
|
m_engine, m_pathPrefix| Constructor and Description |
|---|
ShortURLConstructor() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getForwardPage(javax.servlet.http.HttpServletRequest req)
This method is not needed for the DefaultURLConstructor.
|
void |
initialize(Engine engine,
java.util.Properties properties) |
java.lang.String |
makeURL(java.lang.String context,
java.lang.String name,
java.lang.String parameters)
Constructs the URL with a bunch of parameters.
|
java.lang.String |
parsePage(java.lang.String context,
javax.servlet.http.HttpServletRequest request,
java.nio.charset.Charset encoding)
Should parse the "page" parameter from the actual request.
|
doReplacement, getURLPatternclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparsePageFromURLprotected java.lang.String m_urlPrefix
public static final java.lang.String PROP_PREFIX
public ShortURLConstructor()
public void initialize(Engine engine, java.util.Properties properties)
initialize in interface Initializableinitialize in class DefaultURLConstructorpublic java.lang.String makeURL(java.lang.String context, java.lang.String name, java.lang.String parameters)
makeURL in interface URLConstructormakeURL in class DefaultURLConstructorcontext - The request context (@see WikiContext) that you want the URL forname - The page name (or in case of WikiContext.NONE, the auxiliary JSP page
or resource you want to point at). This must be URL encoded. Null is NOT safe.parameters - If null or empty, no parameters are added.
An URL parameter string (these must be URL-encoded, and separated with &)public java.lang.String parsePage(java.lang.String context, javax.servlet.http.HttpServletRequest request, java.nio.charset.Charset encoding)
parsePage in interface URLConstructorparsePage in class DefaultURLConstructorcontext - In which request context the request was made (this should help in parsing)request - The HTTP request that was used when coming hereencoding - The encoding with which the request was made (UTF-8 or ISO-8859-1).public java.lang.String getForwardPage(javax.servlet.http.HttpServletRequest req)
getForwardPage in interface URLConstructorgetForwardPage in class DefaultURLConstructorreq - The HTTP Request that was used to end up in this page.Copyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.