org.vraptor.scope
Class FlashContext

java.lang.Object
  extended by org.vraptor.scope.FlashContext
All Implemented Interfaces:
Context

public class FlashContext
extends Object
implements Context

A flash context lives through the current and following request only. It is then copied to the request scope and replaced with a new empty implementation.

Since:
2.4
Author:
Guilherme Silveira

Constructor Summary
FlashContext(javax.servlet.http.HttpServletRequest request)
           
 
Method Summary
 void dumpToRequest()
           
 Object getAttribute(String name)
          Retrieves an attribute
 boolean hasAttribute(String name)
          Whether it contains an attribute
 Object removeAttribute(String name)
          Removes an attribute
 void renew()
           
 void setAttribute(String name, Object value)
          Sets an attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlashContext

public FlashContext(javax.servlet.http.HttpServletRequest request)
Method Detail

getAttribute

public Object getAttribute(String name)
Description copied from interface: Context
Retrieves an attribute

Specified by:
getAttribute in interface Context
Parameters:
name - name
Returns:
value or null if not found

hasAttribute

public boolean hasAttribute(String name)
Description copied from interface: Context
Whether it contains an attribute

Specified by:
hasAttribute in interface Context
Parameters:
name - name
Returns:
true if contained

removeAttribute

public Object removeAttribute(String name)
Description copied from interface: Context
Removes an attribute

Specified by:
removeAttribute in interface Context
Parameters:
name - name
Returns:
value

setAttribute

public void setAttribute(String name,
                         Object value)
Description copied from interface: Context
Sets an attribute. Optional operation.

Specified by:
setAttribute in interface Context
Parameters:
name - name
value - value

dumpToRequest

public void dumpToRequest()

renew

public void renew()


Copyright © 2004-2008 VRaptor. All Rights Reserved.