|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RedirectResolution
An interface implemented by redirect resolutions.
Method Summary | |
---|---|
RedirectResolution |
add(java.lang.String name,
java.lang.Object value)
Add a parameter to the redirected url |
RedirectResolution |
addCookie(javax.servlet.http.Cookie cookie)
Adds a cookie |
RedirectResolution |
addCookie(java.lang.String name,
java.lang.String value)
Adds a cookie that will not be stored on disk (will be deleted when the browser is closed). |
RedirectResolution |
addCookie(java.lang.String name,
java.lang.String value,
int maxAge)
Adds a cookie |
RedirectResolution |
addHeader(java.lang.String name,
java.lang.Object value)
Add a http header. |
RedirectResolution |
addParameter(java.lang.String name,
java.lang.Object value)
Deprecated. use add(String, Object) instead |
RedirectResolution |
addProperty(java.lang.String propertyName)
Add an action property as a parameter. |
RedirectResolution |
addPropertyParameter(java.lang.String propertyName)
Deprecated. use addProperty(String) instead |
RedirectResolution |
permanent()
Invoke this method to perform a permanent redirect (301) instead of a temporary redirect (302). |
java.util.List<java.lang.String> |
remove(java.lang.String name)
Remove a GET parameter |
java.util.List<java.lang.String> |
removeParameter(java.lang.String name)
Deprecated. use remove(String) instead |
RedirectResolution |
replace(java.lang.String name,
java.lang.Object value)
Replace a parameter value. |
RedirectResolution |
replaceParameter(java.lang.String name,
java.lang.Object value)
Deprecated. use replace(String, Object) instead |
RedirectResolution |
setCacheControl(CacheControl cacheControl)
Sets the cache data to be sent to the browser |
RedirectResolution |
setCharset(java.lang.String charset)
Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
RedirectResolution |
setContentType(java.lang.String contentType)
Sets the content type of the response being sent to the client, if the response has not been committed yet. |
RedirectResolution |
setHash(java.lang.String hash)
Add a hash to the URL. |
RedirectResolution |
setHeader(java.lang.String name,
java.lang.Object value)
Set a String http header. |
RedirectResolution |
setHeaderIfNotPresent(java.lang.String name,
java.lang.Object value)
Set a String http header if it has not been set. |
RedirectResolution |
setHostname(java.lang.String hostname)
Set to not null to override the request server name |
RedirectResolution |
setIncludeRequestParameters(boolean addCurrentRequestParameters)
true to append to the generated URL all current request parameters, default false. |
RedirectResolution |
setPort(java.lang.Integer port)
Set to not null to override the request port |
RedirectResolution |
setScheme(java.lang.String scheme)
Set to not null to override the request scheme. |
Methods inherited from interface org.loom.resolution.Resolution |
---|
resolve |
Method Detail |
---|
RedirectResolution add(java.lang.String name, java.lang.Object value)
name
- the name of the parametervalue
- the value of the parameter
RedirectResolution addParameter(java.lang.String name, java.lang.Object value)
add(String, Object)
instead
name
- the name of the parametervalue
- the value of the parameter
RedirectResolution replace(java.lang.String name, java.lang.Object value)
name
- the name of the parameter to be replaced.value
- the new value of the parameter. If null, the parameter will just be removed.RedirectResolution replaceParameter(java.lang.String name, java.lang.Object value)
replace(String, Object)
instead
name
- the name of the parameter to be replaced.value
- the new value of the parameter. If null, the parameter will just be removed.java.util.List<java.lang.String> remove(java.lang.String name)
name
- the name of the Parameter to remove
java.util.List<java.lang.String> removeParameter(java.lang.String name)
remove(String)
instead
name
- the name of the Parameter to remove
RedirectResolution addProperty(java.lang.String propertyName)
propertyName
- the name of the action property to be added.
RedirectResolution addPropertyParameter(java.lang.String propertyName)
addProperty(String)
instead
propertyName
- the name of the action property to be added.
RedirectResolution setHash(java.lang.String hash)
hash
- The hash to be added
RedirectResolution setHostname(java.lang.String hostname)
RedirectResolution setScheme(java.lang.String scheme)
scheme
- the scheme name, without colon: "http", "https", etc.
Use the empty String to generate a protocol-less URL, e.g. "//myhost.com/resource.html"RedirectResolution setPort(java.lang.Integer port)
RedirectResolution setIncludeRequestParameters(boolean addCurrentRequestParameters)
RedirectResolution
instance will override the value included in the request.
RedirectResolution permanent()
RedirectResolution addCookie(java.lang.String name, java.lang.String value)
HttpResolution
addCookie
in interface HttpResolution
name
- the name of the cookievalue
- the value of the CookieRedirectResolution addCookie(java.lang.String name, java.lang.String value, int maxAge)
HttpResolution
addCookie
in interface HttpResolution
name
- the name of the cookievalue
- the value of the CookiemaxAge
- can be positive (number of seconds that it will be stored in
the browser), zero (to delete the cookie from the browser) or
a negative value (to indicate that the cookie should not be
stored in disk and will be forgotten when the browser exists).RedirectResolution addCookie(javax.servlet.http.Cookie cookie)
HttpResolution
addCookie
in interface HttpResolution
cookie
- the cookie to be added to the responseRedirectResolution addHeader(java.lang.String name, java.lang.Object value)
HttpResolution
addHeader
in interface HttpResolution
name
- the name of the http headervalue
- the value of the http header. Date, int and String are supported. Anything else will be cast to toString(). Null will be ignored.RedirectResolution setHeader(java.lang.String name, java.lang.Object value)
HttpResolution
setHeader
in interface HttpResolution
name
- the name of the http headervalue
- the value of the http headerRedirectResolution setHeaderIfNotPresent(java.lang.String name, java.lang.Object value)
HttpResolution
setHeaderIfNotPresent
in interface HttpResolution
name
- the name of the http headervalue
- the value of the http headerRedirectResolution setCharset(java.lang.String charset)
HttpResolution
setCharset
in interface HttpResolution
RedirectResolution setContentType(java.lang.String contentType)
HttpResolution
text/html;charset=UTF-8
.
Notice that #setCharset(String) can also be used for this.
setContentType
in interface HttpResolution
RedirectResolution setCacheControl(CacheControl cacheControl)
CacheableResolution
setCacheControl
in interface CacheableResolution
setCacheControl
in interface HttpResolution
cacheControl
- the cache data.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |