|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wicket.protocol.http.request.WebRequestCodingStrategy
public class WebRequestCodingStrategy
Request parameters factory implementation that uses http request parameters and path info to construct the request parameters object.
Field Summary | |
---|---|
static java.lang.String |
BEHAVIOR_ID_PARAMETER_NAME
AJAX query parameter name |
static java.lang.String |
BOOKMARKABLE_PAGE_PARAMETER_NAME
Parameter name used all over the place |
static java.lang.String |
IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME
Parameter name that tells decode to ignore this request if the page+version encoded in the url is not on top of the stack. |
static java.lang.String |
INTERFACE_PARAMETER_NAME
Name of interface target query parameter |
static java.lang.String |
NAME_SPACE
Name of interface target query parameter |
static java.lang.String |
PAGEMAP
Pagemap parameter constant |
Constructor Summary | |
---|---|
WebRequestCodingStrategy()
Construct. |
Method Summary | |
---|---|
protected void |
addBookmarkablePageParameters(Request request,
RequestParameters parameters)
Adds bookmarkable page related parameters (page alias and optionally page parameters). |
protected void |
addInterfaceParameters(Request request,
RequestParameters parameters)
Adds page related parameters (path and pagemap and optionally version and interface). |
protected void |
addResourceParameters(Request request,
RequestParameters parameters)
Adds (shared) resource related parameters (resource key). |
RequestParameters |
decode(Request request)
Analyze the request and create a corresponding request parameters object for it. |
protected java.lang.String |
doEncode(RequestCycle requestCycle,
IRequestTarget requestTarget)
In case you are using custom targets that are not part of the default target hierarchy, you need to override this method, which will be called after the defaults have been tried. |
protected java.lang.CharSequence |
encode(RequestCycle requestCycle,
IBookmarkablePageRequestTarget requestTarget)
Encode a page class target. |
protected java.lang.CharSequence |
encode(RequestCycle requestCycle,
IListenerInterfaceRequestTarget requestTarget)
Encode a listener interface target. |
protected java.lang.CharSequence |
encode(RequestCycle requestCycle,
IPageRequestTarget requestTarget)
Encode a page target. |
java.lang.CharSequence |
encode(RequestCycle requestCycle,
IRequestTarget requestTarget)
Encode the given request target. |
protected java.lang.CharSequence |
encode(RequestCycle requestCycle,
ISharedResourceRequestTarget requestTarget)
Encode a shared resource target. |
protected IRequestTargetUrlCodingStrategy |
getMountEncoder(IRequestTarget requestTarget)
Gets the mount encoder for the given request target if any. |
protected java.lang.String |
getRequestPath(Request request)
Gets the request info path. |
IRequestTargetUrlCodingStrategy[] |
listMounts()
List the mounts that are known to the implementing mounter. |
void |
mount(java.lang.String path,
IRequestTargetUrlCodingStrategy encoder)
Mounts a request target with the given path. |
java.lang.CharSequence |
pathForTarget(IRequestTarget requestTarget)
Gets the url that the provided request target conforms to. |
IRequestTarget |
targetForRequest(RequestParameters requestParameters)
Gets the request target that conforms to the given request parameters. |
void |
unmount(java.lang.String path)
Unmounts a request target. |
IRequestTargetUrlCodingStrategy |
urlCodingStrategyForPath(java.lang.String path)
Gets the encoder that was mounted on the provided path if any. |
protected java.lang.CharSequence |
urlPrefix(RequestCycle requestCycle)
Gets prefix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME_SPACE
public static final java.lang.String INTERFACE_PARAMETER_NAME
public static final java.lang.String BEHAVIOR_ID_PARAMETER_NAME
public static final java.lang.String BOOKMARKABLE_PAGE_PARAMETER_NAME
public static final java.lang.String PAGEMAP
public static final java.lang.String IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME
Constructor Detail |
---|
public WebRequestCodingStrategy()
Method Detail |
---|
public final RequestParameters decode(Request request)
IRequestCodingStrategy
decode
in interface IRequestCodingStrategy
request
- the incoming request
IRequestCodingStrategy.decode(wicket.Request)
public final java.lang.CharSequence encode(RequestCycle requestCycle, IRequestTarget requestTarget)
doEncode(RequestCycle, IRequestTarget)
, which will be called
after the defaults have been tried. When that doesn't provide a url
either, and exception will be thrown saying that encoding could not be
done.
encode
in interface IRequestCodingStrategy
requestCycle
- the current request cycle (for efficient access)requestTarget
- the request target
IRequestCodingStrategy.encode(wicket.RequestCycle,
wicket.IRequestTarget)
public IRequestTargetUrlCodingStrategy[] listMounts()
IRequestTargetMountsInfo
listMounts
in interface IRequestTargetMountsInfo
IRequestTargetMountsInfo.listMounts()
public final IRequestTargetUrlCodingStrategy urlCodingStrategyForPath(java.lang.String path)
IRequestTargetMounter
urlCodingStrategyForPath
in interface IRequestTargetMounter
path
- the path
IRequestTargetMounter.urlCodingStrategyForPath(java.lang.String)
public final void mount(java.lang.String path, IRequestTargetUrlCodingStrategy encoder)
IRequestTargetMounter
mount
in interface IRequestTargetMounter
path
- the path to mount the request target withencoder
- The strategy to use for encoding and decoding urlsIRequestTargetMounter.mount(java.lang.String,
wicket.request.target.coding.IRequestTargetUrlCodingStrategy)
public final java.lang.CharSequence pathForTarget(IRequestTarget requestTarget)
IRequestTargetMounter
pathForTarget
in interface IRequestTargetMounter
requestTarget
- the request target
IRequestTargetMounter.pathForTarget(wicket.IRequestTarget)
public final IRequestTarget targetForRequest(RequestParameters requestParameters)
IRequestTargetMounter
targetForRequest
in interface IRequestTargetMounter
requestParameters
- the request parameters
IRequestTargetMounter.targetForRequest(wicket.request.RequestParameters)
public final void unmount(java.lang.String path)
IRequestTargetMounter
unmount
in interface IRequestTargetMounter
path
- the path to unmountIRequestTargetMounter.unmount(java.lang.String)
protected void addBookmarkablePageParameters(Request request, RequestParameters parameters)
encode(RequestCycle, IBookmarkablePageRequestTarget)
should be
overridden to by in sync with that behaviour.
request
- the incoming requestparameters
- the parameters object to set the found values onprotected void addInterfaceParameters(Request request, RequestParameters parameters)
encode(RequestCycle, IListenerInterfaceRequestTarget)
should be
overridden to by in sync with that behaviour.
request
- the incoming requestparameters
- the parameters object to set the found values onprotected void addResourceParameters(Request request, RequestParameters parameters)
encode(RequestCycle, ISharedResourceRequestTarget)
should be
overridden to by in sync with that behaviour.
request
- the incomming requestparameters
- the parameters object to set the found values onprotected java.lang.String doEncode(RequestCycle requestCycle, IRequestTarget requestTarget)
requestCycle
- the current request cycle (for efficient access)requestTarget
- the request target
protected java.lang.CharSequence encode(RequestCycle requestCycle, IBookmarkablePageRequestTarget requestTarget)
addBookmarkablePageParameters(Request, RequestParameters)
should
be overridden to by in sync with that behaviour.
requestCycle
- the current request cyclerequestTarget
- the target to encode
protected java.lang.CharSequence encode(RequestCycle requestCycle, ISharedResourceRequestTarget requestTarget)
addResourceParameters(Request, RequestParameters)
should be
overridden to by in sync with that behaviour.
requestCycle
- the current request cyclerequestTarget
- the target to encode
protected java.lang.CharSequence encode(RequestCycle requestCycle, IListenerInterfaceRequestTarget requestTarget)
addInterfaceParameters(Request, RequestParameters)
should be
overridden to by in sync with that behaviour.
requestCycle
- the current request cyclerequestTarget
- the target to encode
protected java.lang.CharSequence encode(RequestCycle requestCycle, IPageRequestTarget requestTarget)
requestCycle
- the current request cyclerequestTarget
- the target to encode
protected IRequestTargetUrlCodingStrategy getMountEncoder(IRequestTarget requestTarget)
requestTarget
- the request target to match
protected java.lang.String getRequestPath(Request request)
Request.getPath()
.
request
- the request
protected final java.lang.CharSequence urlPrefix(RequestCycle requestCycle)
requestCycle
- the request cycle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |