|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.context.Flash
org.apache.myfaces.test.mock.MockFlash
public class MockFlash
Mock implementation of Flash
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
protected static String |
FLASH_CURRENT_MAP_CACHE
|
protected static String |
FLASH_CURRENT_MAP_KEY
|
protected static String |
FLASH_INSTANCE
Key on app map to keep current instance |
protected static String |
FLASH_KEEP_MESSAGES
Key used to check if this request should keep messages (like tomahawk sandbox RedirectTracker. |
protected static String |
FLASH_KEEP_MESSAGES_LIST
|
protected static String |
FLASH_POSTBACK_MAP_CACHE
|
protected static String |
FLASH_POSTBACK_MAP_KEY
|
protected static String |
FLASH_REDIRECT
Key used to check if there is the current request will be or was redirected |
protected static String |
FLASH_SCOPE_CACHE
Session map prefix to flash maps |
Constructor Summary | |
---|---|
MockFlash()
|
Method Summary | |
---|---|
protected String |
_getNextToken()
|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
void |
doPostPhaseActions(javax.faces.context.FacesContext facesContext)
|
void |
doPrePhaseActions(javax.faces.context.FacesContext facesContext)
|
Set<Map.Entry<String,Object>> |
entrySet()
|
Object |
get(Object key)
|
static javax.faces.context.Flash |
getCurrentInstance(javax.faces.context.ExternalContext context)
Return a Flash instance from the application map |
protected Map<String,Object> |
getCurrentRequestMap(javax.faces.context.FacesContext context)
Return the flash map created on this traversal. |
protected Map<String,Object> |
getPostbackRequestMap(javax.faces.context.FacesContext context)
|
boolean |
isEmpty()
|
boolean |
isKeepMessages()
|
boolean |
isRedirect()
For check if there is a redirect we to take into accout this points: 1. |
void |
keep(String key)
In few words take a value from request scope map and put it on current request map, so it is visible on the next request. |
Set<String> |
keySet()
|
Object |
put(String key,
Object value)
|
void |
putAll(Map<? extends String,? extends Object> m)
|
void |
putNow(String key,
Object value)
This is just an alias for request scope map. |
Object |
remove(Object key)
|
protected void |
restoreMessages(javax.faces.context.FacesContext facesContext)
|
protected void |
saveMessages(javax.faces.context.FacesContext facesContext)
|
void |
setKeepMessages(boolean keepMessages)
If this property is true, the messages should be keep for the next request, no matter if it is a normal postback case or a post-redirect-get case. |
void |
setRedirect(boolean redirect)
|
int |
size()
|
Collection<Object> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
protected static final String FLASH_INSTANCE
protected static final String FLASH_REDIRECT
protected static final String FLASH_KEEP_MESSAGES
protected static final String FLASH_KEEP_MESSAGES_LIST
protected static final String FLASH_SCOPE_CACHE
protected static final String FLASH_CURRENT_MAP_CACHE
protected static final String FLASH_CURRENT_MAP_KEY
protected static final String FLASH_POSTBACK_MAP_CACHE
protected static final String FLASH_POSTBACK_MAP_KEY
Constructor Detail |
---|
public MockFlash()
Method Detail |
---|
protected String _getNextToken()
public static javax.faces.context.Flash getCurrentInstance(javax.faces.context.ExternalContext context)
context
-
protected Map<String,Object> getCurrentRequestMap(javax.faces.context.FacesContext context)
context
-
protected Map<String,Object> getPostbackRequestMap(javax.faces.context.FacesContext context)
public void doPrePhaseActions(javax.faces.context.FacesContext facesContext)
doPrePhaseActions
in class javax.faces.context.Flash
public void doPostPhaseActions(javax.faces.context.FacesContext facesContext)
doPostPhaseActions
in class javax.faces.context.Flash
protected void saveMessages(javax.faces.context.FacesContext facesContext)
protected void restoreMessages(javax.faces.context.FacesContext facesContext)
public boolean isRedirect()
isRedirect
in class javax.faces.context.Flash
public void setRedirect(boolean redirect)
setRedirect
in class javax.faces.context.Flash
public void keep(String key)
keep
in class javax.faces.context.Flash
public void putNow(String key, Object value)
putNow
in class javax.faces.context.Flash
public boolean isKeepMessages()
isKeepMessages
in class javax.faces.context.Flash
public void setKeepMessages(boolean keepMessages)
setKeepMessages
in class javax.faces.context.Flash
public void clear()
public boolean containsKey(Object key)
public boolean containsValue(Object value)
public Set<Map.Entry<String,Object>> entrySet()
public Object get(Object key)
public boolean isEmpty()
public Set<String> keySet()
public Object put(String key, Object value)
public void putAll(Map<? extends String,? extends Object> m)
public Object remove(Object key)
public int size()
public Collection<Object> values()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |