public class RequestBeanStore extends AttributeBeanStore
A BeanStore that uses a HTTP request as backing storage.
This class is not threadsafe
Constructor and Description |
---|
RequestBeanStore(javax.servlet.ServletRequest request,
NamingScheme namingScheme) |
Modifier and Type | Method and Description |
---|---|
boolean |
attach()
Attach the bean store, any updates from now on will be written through to
the underlying store.
|
boolean |
detach()
Detach the bean store, causing updates to longer be written through to the
underlying store.
|
protected Object |
getAttribute(String key)
Gets an attribute from the underlying storage
|
protected Collection<String> |
getAttributeNames()
Gets an enumeration of the attribute names present in the underlying
storage
|
boolean |
isAttached()
Return true if the bean store is attached
|
protected void |
removeAttribute(String key)
Removes an attribute from the underlying storage
|
protected void |
setAttribute(String key,
Object instance)
Sets an instance under a key in the underlying storage
|
clear, contains, get, getNamingScheme, getPrefixedAttributeNames, iterator, put
public RequestBeanStore(javax.servlet.ServletRequest request, NamingScheme namingScheme)
protected Object getAttribute(String key)
AttributeBeanStore
getAttribute
in class AttributeBeanStore
key
- The (prefixed) id of the attributeprotected void removeAttribute(String key)
AttributeBeanStore
removeAttribute
in class AttributeBeanStore
key
- The (prefixed) id of the attribute to removeprotected Collection<String> getAttributeNames()
AttributeBeanStore
getAttributeNames
in class AttributeBeanStore
protected void setAttribute(String key, Object instance)
AttributeBeanStore
setAttribute
in class AttributeBeanStore
key
- The (prefixed) id of the attribute to setinstance
- The instancepublic boolean attach()
AttributeBeanStore
Attach the bean store, any updates from now on will be written through to the underlying store.
When the bean store is attached, the detached state is assumed to be authoritative if there are any conflicts.
attach
in interface BoundBeanStore
attach
in class AttributeBeanStore
public boolean detach()
AttributeBeanStore
detach
in interface BoundBeanStore
detach
in class AttributeBeanStore
public boolean isAttached()
BoundBeanStore
isAttached
in interface BoundBeanStore
isAttached
in class AttributeBeanStore
Copyright © 2012 Seam Framework. All Rights Reserved.