|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.workflow.base.BaseScope org.apache.commons.workflow.web.ServletRequestScope
public class ServletRequestScope
ServletRequestScope is a specialized Scope
implementation corresponding the the attributes of a specified
ServletRequest
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry |
Field Summary | |
---|---|
protected javax.servlet.ServletRequest |
servletRequest
The servlet request with which we are associated. |
Fields inherited from class org.apache.commons.workflow.base.BaseScope |
---|
map, support |
Constructor Summary | |
---|---|
ServletRequestScope()
Construct a new ServletRequestScope with no attached ServletRequest. |
|
ServletRequestScope(javax.servlet.ServletRequest servletRequest)
Construct a ServletRequestScope associated with the specified ServletRequest. |
Method Summary | |
---|---|
void |
clear()
Remove all beans from this Map and call scopeCleared() on
all registered |
boolean |
containsKey(Object key)
Return true if this map contains the specified key. |
boolean |
containsValue(Object value)
Return true if this map contains the specified value. |
Set |
entrySet()
Return a set view of the mappings contained in this map. |
boolean |
equals(Object object)
Compare the specified object with this map for equality. |
Object |
get(Object key)
Return the value to which this map maps the specified key. |
Object |
get(String key)
Return the value to which this map maps the specified key. |
javax.servlet.ServletRequest |
getServletRequest()
|
int |
hashCode()
Return the hash code value for this map. |
boolean |
isEmpty()
Return true if this map is empty. |
Set |
keySet()
Return a set view of the keys contained in this map. |
Object |
put(Object key,
Object bean)
Add or replace the bean associated with the specified key. |
Object |
put(String key,
Object bean)
Add the specified bean, associated with the specified key, to this scope and replace any previous bean associated with this key. |
void |
putAll(Map in)
Copy all of the mappings from the specified map into this map, firing appropriate beanAdded() and
beanReplaced() events along the way. |
Object |
remove(Object key)
Remove the bean associated with the specified key (if any), and return the old value if removed. |
Object |
remove(String key)
Remove the bean associated with the specified key (if any). |
void |
setServletRequest(javax.servlet.ServletRequest servletRequest)
|
int |
size()
Return the number of key-value mappings in this map. |
Collection |
values()
Return a Collection view of the values contained in this map. |
Methods inherited from class org.apache.commons.workflow.base.BaseScope |
---|
addScopeListener, removeScopeListener |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.servlet.ServletRequest servletRequest
Constructor Detail |
---|
public ServletRequestScope()
public ServletRequestScope(javax.servlet.ServletRequest servletRequest)
servletRequest
- The associated ServletRequestMethod Detail |
---|
public javax.servlet.ServletRequest getServletRequest()
public void setServletRequest(javax.servlet.ServletRequest servletRequest)
public void clear()
scopeCleared() on
all registered ScopeListeners
.
- Specified by:
clear
in interface Map
- Specified by:
clear
in interface Scope
- Overrides:
clear
in class BaseScope
public boolean containsKey(Object key)
true
if this map contains the specified key.
containsKey
in interface Map
containsKey
in class BaseScope
key
- Key to be looked uppublic boolean containsValue(Object value)
true
if this map contains the specified value.
containsValue
in interface Map
containsValue
in class BaseScope
value
- Value to be looked uppublic Set entrySet()
entrySet
in interface Map
entrySet
in class BaseScope
public boolean equals(Object object)
equals
in interface Map
equals
in class BaseScope
object
- Object to be comparedpublic Object get(Object key)
get
in interface Map
get
in class BaseScope
key
- Key to be looked uppublic Object get(String key)
get
in class BaseScope
key
- Key to be looked uppublic int hashCode()
hashCode
in interface Map
hashCode
in class BaseScope
public boolean isEmpty()
true
if this map is empty.
isEmpty
in interface Map
isEmpty
in class BaseScope
public Set keySet()
keySet
in interface Map
keySet
in class BaseScope
public Object put(Object key, Object bean)
put
in interface Map
put
in class BaseScope
key
- Key with which the new value should be associated
(cannot be null)bean
- Bean to be associated with this key (cannot be null)public Object put(String key, Object bean)
beanAdded()
on all registered
listeners after the add is done. If an old bean was replaced,
call beanReplaced()
(passing the old value in the event)
on all registered ScopeListeners
after the removal
is done. If a bean was replaced, the old value is also returned;
otherwise null
is returned.
put
in interface Scope
put
in class BaseScope
key
- Key with which the new value should be associated
(cannot be null)bean
- Bean to be associated with this key (cannot be null)
IllegalArgumentException
- if key
or
bean
is nullpublic void putAll(Map in)
beanAdded()
and
beanReplaced()
events along the way.
putAll
in interface Map
putAll
in class BaseScope
in
- Map whose contents are to be addedpublic Object remove(Object key)
remove
in interface Map
remove
in class BaseScope
key
- Key of the bean to remove (cannot be null)public Object remove(String key)
beanRemoved()
on all
registered ScopeListeners
after the removal is done.
Return the old value (if any); otherwise return null
.
remove
in interface Scope
remove
in class BaseScope
key
- Key of the bean to remove (cannot be null)
IllegalArgumentException
- if key
is nullpublic int size()
size
in interface Map
size
in class BaseScope
public Collection values()
values
in interface Map
values
in class BaseScope
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |