|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wiki.url.DefaultURLConstructor
org.apache.wiki.url.ShortURLConstructor
public class ShortURLConstructor

Provides a way to do short URLs of the form /wiki/PageName.
| Field Summary | |
|---|---|
protected String |
m_urlPrefix
Contains the path part after the JSPWiki base URL |
static String |
PROP_PREFIX
This corresponds to your WikiServlet path. |
| Fields inherited from class org.apache.wiki.url.DefaultURLConstructor |
|---|
m_engine, m_pathPrefix |
| Constructor Summary | |
|---|---|
ShortURLConstructor()
|
|
| Method Summary | |
|---|---|
String |
getForwardPage(javax.servlet.http.HttpServletRequest req)
This method is not needed for the DefaultURLConstructor. |
void |
initialize(WikiEngine engine,
Properties properties)
Initializes. |
String |
makeURL(String context,
String name,
boolean absolute,
String parameters)
Constructs the URL with a bunch of parameters. |
String |
parsePage(String context,
javax.servlet.http.HttpServletRequest request,
String encoding)
Should parse the "page" parameter from the actual request. |
| Methods inherited from class org.apache.wiki.url.DefaultURLConstructor |
|---|
doReplacement, getURLPattern, parsePageFromURL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String m_urlPrefix
public static final String PROP_PREFIX
| Constructor Detail |
|---|
public ShortURLConstructor()
| Method Detail |
|---|
public void initialize(WikiEngine engine,
Properties properties)
initialize in interface URLConstructorinitialize in class DefaultURLConstructorengine - The WikiEngine that this URLConstructor belongs toproperties - Properties used to initialize
public String makeURL(String context,
String name,
boolean absolute,
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.absolute - True, if you need an absolute URL. False, if both relative and absolute
URLs are fine.parameters - If null or empty, no parameters are added.
An URL parameter string (these must be URL-encoded, and separated with &)
public String parsePage(String context,
javax.servlet.http.HttpServletRequest request,
String encoding)
throws UnsupportedEncodingException
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).
UnsupportedEncodingExceptionpublic 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||