org.apache.myfaces.view
Class ViewScopeProxyMap
java.lang.Object
org.apache.myfaces.view.ViewScopeProxyMap
- All Implemented Interfaces:
- Map<String,Object>, StateHolder
public class ViewScopeProxyMap
- extends Object
- implements Map<String,Object>, StateHolder
This wrapper has these objectives:
- Isolate the part that needs to be saved with the view (viewScopeId) from
the part that should remain into session (bean map). This class will be
serialized when UIViewRoot.saveState() is called.
- Decouple the way how the view scope map is stored. For example, in
CDI view scope a session scope bean is used, and in default view scope
the same session map is used but using a prefix.
- Author:
- Leonardo Uribe
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ViewScopeProxyMap
public ViewScopeProxyMap()
getViewScopeId
public String getViewScopeId()
forceCreateWrappedMap
public void forceCreateWrappedMap(FacesContext facesContext)
getWrapped
public Map<String,Object> getWrapped()
size
public int size()
- Specified by:
size
in interface Map<String,Object>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<String,Object>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<String,Object>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map<String,Object>
get
public Object get(Object key)
- Specified by:
get
in interface Map<String,Object>
put
public Object put(String key,
Object value)
- Specified by:
put
in interface Map<String,Object>
remove
public Object remove(Object key)
- Specified by:
remove
in interface Map<String,Object>
putAll
public void putAll(Map<? extends String,? extends Object> m)
- Specified by:
putAll
in interface Map<String,Object>
clear
public void clear()
- Specified by:
clear
in interface Map<String,Object>
keySet
public Set<String> keySet()
- Specified by:
keySet
in interface Map<String,Object>
values
public Collection<Object> values()
- Specified by:
values
in interface Map<String,Object>
entrySet
public Set<Map.Entry<String,Object>> entrySet()
- Specified by:
entrySet
in interface Map<String,Object>
restoreState
public void restoreState(FacesContext context,
Object state)
- Specified by:
restoreState
in interface StateHolder
saveState
public Object saveState(FacesContext context)
- Specified by:
saveState
in interface StateHolder
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interface StateHolder
setTransient
public void setTransient(boolean newTransientValue)
- Specified by:
setTransient
in interface StateHolder
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.