|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.RequestContext
org.apache.wicket.protocol.http.portlet.PortletRequestContext
public class PortletRequestContext
FIXME javadoc
Porlet strategy for url rewriting, and providing access to the portlet namespace for markup Ids and isolated session state. Portlets need to have their URLs encoded with special portal information, namespace etc.
For url rewriting, only three methods are needed to support creating Portlet ActionURLs, Portlet RenderURLs and Resource/Ajax URLs.
RequestContext
Constructor Summary | |
---|---|
PortletRequestContext(WicketFilterPortletContext filterContext,
ServletWebRequest request,
WebResponse response)
|
Method Summary | |
---|---|
CharSequence |
encodeActionURL(CharSequence path)
FIXME javadoc |
CharSequence |
encodeActionURL(CharSequence path,
boolean forceActionURL)
FIXME javadoc |
String |
encodeMarkupId(String markupId)
Encodes markup Ids, typically overridden by the portlet implementation. |
CharSequence |
encodeRenderURL(CharSequence path)
FIXME javadoc |
CharSequence |
encodeRenderURL(CharSequence path,
boolean forceRenderURL)
FIXME javadoc |
CharSequence |
encodeResourceURL(CharSequence path)
Override to encode the path to the resource with the portal specific URL (e.g. |
CharSequence |
encodeSharedResourceURL(CharSequence path)
Override to encode the path to the resource with the portal specific url (e.g. |
IHeaderResponse |
getHeaderResponse()
Override to return the special EmbeddedPortletHeaderResponse . |
String |
getLastEncodedPath()
Used to retrieve the path last encoded as a portlet URL, used for internal Wicket processing when internal methods require a target URL e.g. |
String |
getLastEncodedPath(String url)
|
CharSequence |
getNamespace()
Should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the portal page. |
javax.portlet.PortletConfig |
getPortletConfig()
|
javax.portlet.PortletRequest |
getPortletRequest()
|
javax.portlet.PortletResponse |
getPortletResponse()
|
protected String |
getPortletWindowId()
|
protected String |
getQualifiedPath(CharSequence path)
|
boolean |
isAjax()
|
boolean |
isEmbedded()
|
boolean |
isPortletRequest()
|
protected IHeaderResponse |
newPortletHeaderResponse(Response response)
|
protected String |
saveLastEncodedUrl(String url,
String path)
Saves the key/value pairs so the original Wicket URL can be retrieved later if needed by Wicket, keyed by the encoded portal URL. |
Methods inherited from class org.apache.wicket.RequestContext |
---|
get, set, unset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PortletRequestContext(WicketFilterPortletContext filterContext, ServletWebRequest request, WebResponse response)
Method Detail |
---|
protected IHeaderResponse newPortletHeaderResponse(Response response)
public String getLastEncodedPath()
Form.getJsForInterfaceUrl(CharSequence)
.
public String getLastEncodedPath(String url)
url
- the portal encoded URL
getLastEncodedPath()
protected String saveLastEncodedUrl(String url, String path)
url
- the portal encoded URLpath
- the original Wicket URL
getLastEncodedPath()
public CharSequence encodeActionURL(CharSequence path)
Delegates to encodeActionURL(CharSequence, boolean)
, passing in forceRenderURL as
false - FIXME why?
encodeActionURL
in class RequestContext
path
- the URL to encode
RequestContext.encodeActionURL(java.lang.CharSequence)
,
encodeActionURL(CharSequence, boolean)
public CharSequence encodeActionURL(CharSequence path, boolean forceActionURL)
Encodes the given path into a portlet URL, saving the original Wicket URL against the
PortletURL
and in the class saveLastEncodedUrl(String, String)
.
path
- the path to encodeforceRenderURL
- FIXME param
saveLastEncodedUrl(String, String)
public String encodeMarkupId(String markupId)
RequestContext
encodeMarkupId
in class RequestContext
markupId
- the markup Id to encode
RequestContext.encodeMarkupId(java.lang.String)
public CharSequence encodeRenderURL(CharSequence path)
Delegates to encodeRenderURL(CharSequence, boolean)
, passing in forceRenderURL as
false - FIXME why?
encodeRenderURL
in class RequestContext
path
- the URL to encode
RequestContext.encodeRenderURL(java.lang.CharSequence)
,
encodeActionURL(CharSequence, boolean)
public CharSequence encodeRenderURL(CharSequence path, boolean forceRenderURL)
Encodes the given path into a portlet URL, saving the original Wicket URL against the
PortletURL
and in the class saveLastEncodedUrl(String, String)
and also
includes the portlet view mode in the url link..
path
- the path to encodeforceRenderURL
- FIXME param
saveLastEncodedUrl(String, String)
public CharSequence encodeResourceURL(CharSequence path)
encodeResourceURL
in class RequestContext
path
- the URL to encode
RequestContext.encodeResourceURL(java.lang.CharSequence)
public CharSequence encodeSharedResourceURL(CharSequence path)
encodeSharedResourceURL
in class RequestContext
path
- the URL to encode
WicketFilterPortletContext.encodeWindowIdInPath(String, CharSequence)
,
RequestContext.encodeSharedResourceURL(java.lang.CharSequence)
public IHeaderResponse getHeaderResponse()
EmbeddedPortletHeaderResponse
.
getHeaderResponse
in class RequestContext
EmbeddedPortletHeaderResponse
,
newPortletHeaderResponse(Response)
,
RequestContext.getHeaderResponse()
public CharSequence getNamespace()
getNamespace
in class RequestContext
PortletResponse.getNamespace()
,
RequestContext.getNamespace()
public boolean isPortletRequest()
isPortletRequest
in class RequestContext
RequestContext.isPortletRequest()
public boolean isEmbedded()
protected String getQualifiedPath(CharSequence path)
path
- the relative path
protected String getPortletWindowId()
PortletWindowUtils#getPortletWindowId(javax.portlet.PortletSession)
public javax.portlet.PortletConfig getPortletConfig()
PortletConfig
public javax.portlet.PortletRequest getPortletRequest()
PortletRequest
public javax.portlet.PortletResponse getPortletResponse()
PortletResponse
public boolean isAjax()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |