org.loom.resolution
Interface ForwardResolution

All Superinterfaces:
CacheableResolution, HttpResolution, Resolution
All Known Implementing Classes:
DefaultForwardResolution, LocaleForwardResolution

public interface ForwardResolution
extends HttpResolution

A forward resolution


Method Summary
 ForwardResolution addCookie(javax.servlet.http.Cookie cookie)
          Adds a cookie
 ForwardResolution 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).
 ForwardResolution addCookie(java.lang.String name, java.lang.String value, int maxAge)
          Adds a cookie
 ForwardResolution addHeader(java.lang.String name, java.lang.Object value)
          Add a http header.
 ForwardResolution set(java.lang.String name, java.lang.Object value)
          Set a request-scoped attribute.
 ForwardResolution setAttribute(java.lang.String name, java.lang.Object value)
          Deprecated. use set(java.lang.String, java.lang.Object) instead
 ForwardResolution setCacheControl(CacheControl cacheControl)
          Sets the cache data to be sent to the browser
 ForwardResolution setCharset(java.lang.String charset)
          Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8.
 ForwardResolution 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.
 ForwardResolution setHeader(java.lang.String name, java.lang.Object value)
          Set a String http header.
 ForwardResolution setHeaderIfNotPresent(java.lang.String name, java.lang.Object value)
          Set a String http header if it has not been set.
 
Methods inherited from interface org.loom.resolution.Resolution
resolve
 

Method Detail

set

ForwardResolution set(java.lang.String name,
                      java.lang.Object value)
Set a request-scoped attribute. This method is equivalent to invoking request.setAttribute(name, value)

Parameters:
name - the name of the attribute to set
value - the value of the attribute
Returns:
this same resolution instance

setAttribute

ForwardResolution setAttribute(java.lang.String name,
                               java.lang.Object value)
Deprecated. use set(java.lang.String, java.lang.Object) instead

Set a request-scoped attribute. This method is equivalent to invoking request.setAttribute(name, value)

Parameters:
name - the name of the attribute to set
value - the value of the attribute
Returns:
this same resolution instance

addCookie

ForwardResolution addCookie(java.lang.String name,
                            java.lang.String value)
Description copied from interface: HttpResolution
Adds a cookie that will not be stored on disk (will be deleted when the browser is closed).

Specified by:
addCookie in interface HttpResolution
Parameters:
name - the name of the cookie
value - the value of the Cookie

addCookie

ForwardResolution addCookie(java.lang.String name,
                            java.lang.String value,
                            int maxAge)
Description copied from interface: HttpResolution
Adds a cookie

Specified by:
addCookie in interface HttpResolution
Parameters:
name - the name of the cookie
value - the value of the Cookie
maxAge - 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).

addCookie

ForwardResolution addCookie(javax.servlet.http.Cookie cookie)
Description copied from interface: HttpResolution
Adds a cookie

Specified by:
addCookie in interface HttpResolution
Parameters:
cookie - the cookie to be added to the response

addHeader

ForwardResolution addHeader(java.lang.String name,
                            java.lang.Object value)
Description copied from interface: HttpResolution
Add a http header. If the header already exists a new value will be added.

Specified by:
addHeader in interface HttpResolution
Parameters:
name - the name of the http header
value - the value of the http header. Date, int and String are supported. Anything else will be cast to toString(). Null will be ignored.

setHeader

ForwardResolution setHeader(java.lang.String name,
                            java.lang.Object value)
Description copied from interface: HttpResolution
Set a String http header. If the header already exists it will be replaced.

Specified by:
setHeader in interface HttpResolution
Parameters:
name - the name of the http header
value - the value of the http header

setHeaderIfNotPresent

ForwardResolution setHeaderIfNotPresent(java.lang.String name,
                                        java.lang.Object value)
Description copied from interface: HttpResolution
Set a String http header if it has not been set.

Specified by:
setHeaderIfNotPresent in interface HttpResolution
Parameters:
name - the name of the http header
value - the value of the http header

setCharset

ForwardResolution setCharset(java.lang.String charset)
Description copied from interface: HttpResolution
Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8.

Specified by:
setCharset in interface HttpResolution

setContentType

ForwardResolution setContentType(java.lang.String contentType)
Description copied from interface: HttpResolution
Sets the content type of the response being sent to the client, if the response has not been committed yet. The given content type may include a character encoding specification, for example, text/html;charset=UTF-8. Notice that #setCharset(String) can also be used for this.

Specified by:
setContentType in interface HttpResolution

setCacheControl

ForwardResolution setCacheControl(CacheControl cacheControl)
Description copied from interface: CacheableResolution
Sets the cache data to be sent to the browser

Specified by:
setCacheControl in interface CacheableResolution
Specified by:
setCacheControl in interface HttpResolution
Parameters:
cacheControl - the cache data.
Returns:
this same instance, to allow easy chaining of invocations