|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ofbiz.base.util.collections.FlexibleServletAccessor<T>
public class FlexibleServletAccessor<T>
Used to flexibly access Map values, supporting the "." (dot) syntax for accessing sub-map values and the "[]" (square bracket) syntax for accessing list elements. See individual Map operations for more information.
Nested Class Summary | |
---|---|
protected static class |
FlexibleServletAccessor.AttributeAccessor<T>
|
Field Summary | |
---|---|
protected java.lang.String |
attributeName
|
protected boolean |
empty
|
protected FlexibleMapAccessor<T> |
fma
|
protected java.lang.String |
name
|
protected boolean |
needsExpand
|
Constructor Summary | |
---|---|
FlexibleServletAccessor(java.lang.String name)
|
|
FlexibleServletAccessor(java.lang.String name,
java.lang.String defaultName)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
The equals and hashCode methods are imnplemented just case this object is ever accidently used as a Map key |
T |
get(HttpSession session,
java.util.Map<java.lang.String,java.lang.Object> expandContext)
Based on name get from HttpSession or from List in HttpSession |
T |
get(ServletRequest request,
java.util.Map<java.lang.String,java.lang.Object> expandContext)
Based on name get from ServletRequest or from List in ServletRequest |
int |
hashCode()
The equals and hashCode methods are imnplemented just case this object is ever accidently used as a Map key * |
protected void |
init(java.lang.String name)
|
boolean |
isEmpty()
|
void |
put(HttpSession session,
T value,
java.util.Map<java.lang.String,java.lang.Object> expandContext)
Based on name put in HttpSession or from List in HttpSession; If the brackets for a list are empty the value will be appended to the list, otherwise the value will be set in the position of the number in the brackets. |
void |
put(ServletRequest request,
T value,
java.util.Map<java.lang.String,java.lang.Object> expandContext)
Based on name put in ServletRequest or from List in ServletRequest; If the brackets for a list are empty the value will be appended to the list, otherwise the value will be set in the position of the number in the brackets. |
T |
remove(HttpSession session,
java.util.Map<java.lang.String,java.lang.Object> expandContext)
Based on name remove from HttpSession or from List in HttpSession |
T |
remove(ServletRequest request,
java.util.Map<java.lang.String,java.lang.Object> expandContext)
Based on name remove from ServletRequest or from List in ServletRequest |
java.lang.String |
toString()
To be used for a string representation of the accessor, returns the original name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.lang.String attributeName
protected FlexibleMapAccessor<T> fma
protected boolean needsExpand
protected boolean empty
Constructor Detail |
---|
public FlexibleServletAccessor(java.lang.String name)
public FlexibleServletAccessor(java.lang.String name, java.lang.String defaultName)
Method Detail |
---|
protected void init(java.lang.String name)
public boolean isEmpty()
public T get(ServletRequest request, java.util.Map<java.lang.String,java.lang.Object> expandContext)
request
- request to get the value fromexpandContext
- the context to use for name expansion
public T get(HttpSession session, java.util.Map<java.lang.String,java.lang.Object> expandContext)
session
- expandContext
-
public void put(ServletRequest request, T value, java.util.Map<java.lang.String,java.lang.Object> expandContext)
request
- value
- expandContext
- public void put(HttpSession session, T value, java.util.Map<java.lang.String,java.lang.Object> expandContext)
session
- value
- expandContext
- public T remove(ServletRequest request, java.util.Map<java.lang.String,java.lang.Object> expandContext)
request
- expandContext
-
public T remove(HttpSession session, java.util.Map<java.lang.String,java.lang.Object> expandContext)
session
- expandContext
-
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
-
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |