|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
org.apache.myfaces.trinidad.util.URLEncoder
public abstract class URLEncoder
Encodes URL's based on thier type. While the ExternalContext does this to some extent, the types of URL's it encodes are often ill-defined. This utility method allows the caller to ensure that URL's are encoded in the proper fashion depending on which container is active at the time. <p/> Out of the box, this class supports Servlet and Portlet encoding, but it may be extended on a per-request basis to support other types of URL encoding with the use of the "registerURLEncoder" method. <p/> It is also important to note that this does not impact the encoding done by the ExternalContext. As such, all current applications should work without modification if they do not choose to use this API for encoding.
| Constructor Summary | |
|---|---|
URLEncoder() |
|
| Method Summary | |
|---|---|
abstract java.lang.String |
encodeActionURL(java.lang.String url)This function should be the same as the ExternalContext.encodeActionURL(String) method. |
abstract java.lang.String |
encodeInProtocolResourceURL(java.lang.String url)Encodes a url to a resource such that it is inProtocol. |
abstract java.lang.String |
encodePartialActionURL(java.lang.String url)This encodes a URL so that it can be used to make a PPR request in all containers. |
abstract java.lang.String |
encodeRedirectURL(java.lang.String url)Encodes a url to be explicitly used for a redirect. |
abstract java.lang.String |
encodeResourceURL(java.lang.String url)Encodes a url as a resource. |
abstract java.lang.String |
encodeSkinResourceURL(java.lang.String url)Encodes a resource URL that is mapped to a skinning resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLEncoder()
| Method Detail |
|---|
public abstract java.lang.String encodeActionURL(java.lang.String url)
ExternalContext.encodeActionURL(String) method. By default it call the code in the ExternalContext. The reason its provided here is that certain URLEncoderUtility instances may wish to override the default functionality and have the ExternalContext pull its default encoding from here.public abstract java.lang.String encodePartialActionURL(java.lang.String url)
url - the unencoded urljava.lang.IllegalArgumentException - if the URL cannot be encodedpublic abstract java.lang.String encodeRedirectURL(java.lang.String url)
url - the unencoded urljava.lang.IllegalArgumentException - if the URL cannot be encodedpublic abstract java.lang.String encodeResourceURL(java.lang.String url)
ExternalContext.encodeResourceURL(String). The url returned from this method is NOT guarenteed to be in-protocol (meaning that it MAY not have access to session information). The advantage of encoding something in this fashion is that in certain types of containers, like portals, the URL generated may have faster access and will generally work better for the purposes of caching do to its RESTful state.url - the unencoded urljava.lang.IllegalArgumentException - if the URL cannot be encodedpublic abstract java.lang.String encodeInProtocolResourceURL(java.lang.String url)
url - the unencoded urljava.lang.IllegalArgumentException - if the URL cannot be encodedpublic abstract java.lang.String encodeSkinResourceURL(java.lang.String url)
url -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.