| java.lang.Object org.ofbiz.base.util.FlexibleServletAccessor
FlexibleServletAccessor | public class FlexibleServletAccessor (Code) | | 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.
author: David E. Jones version: $Revision: 1.2 $ since: 2.1 |
Inner Class :protected static class AttributeAccessor | |
Method Summary | |
public boolean | equals(Object obj) | public Object | get(ServletRequest request, Map expandContext) | public Object | get(HttpSession session, Map expandContext) | public int | hashCode() | protected void | init(String name) | public boolean | isEmpty() | public void | put(ServletRequest request, Object value, Map 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. | public void | put(HttpSession session, Object value, Map 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. | public Object | remove(ServletRequest request, Map expandContext) | public Object | remove(HttpSession session, Map expandContext) | public String | toString() To be used for a string representation of the accessor, returns the original name. |
empty | protected boolean empty(Code) | | |
needsExpand | protected boolean needsExpand(Code) | | |
FlexibleServletAccessor | public FlexibleServletAccessor(String name)(Code) | | |
FlexibleServletAccessor | public FlexibleServletAccessor(String name, String defaultName)(Code) | | |
equals | public boolean equals(Object obj)(Code) | | The equals and hashCode methods are imnplemented just case this object is ever accidently used as a Map key
Parameters: obj - |
get | public Object get(ServletRequest request, Map expandContext)(Code) | | Based on name get from ServletRequest or from List in ServletRequest
Parameters: request - request to get the value from Parameters: expandContext - the context to use for name expansion the object corresponding to this getter class |
get | public Object get(HttpSession session, Map expandContext)(Code) | | Based on name get from HttpSession or from List in HttpSession
Parameters: session - Parameters: expandContext - |
hashCode | public int hashCode()(Code) | | The equals and hashCode methods are imnplemented just case this object is ever accidently used as a Map key *
|
isEmpty | public boolean isEmpty()(Code) | | |
put | public void put(ServletRequest request, Object value, Map expandContext)(Code) | | 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.
If a "+" (plus sign) is included inside the square brackets before the index
number the value will inserted/added at that point instead of set at the point.
Parameters: request - Parameters: value - Parameters: expandContext - |
put | public void put(HttpSession session, Object value, Map expandContext)(Code) | | 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.
If a "+" (plus sign) is included inside the square brackets before the index
number the value will inserted/added at that point instead of set at the point.
Parameters: session - Parameters: value - Parameters: expandContext - |
remove | public Object remove(ServletRequest request, Map expandContext)(Code) | | Based on name remove from ServletRequest or from List in ServletRequest
Parameters: request - Parameters: expandContext - |
remove | public Object remove(HttpSession session, Map expandContext)(Code) | | Based on name remove from HttpSession or from List in HttpSession
Parameters: session - Parameters: expandContext - |
toString | public String toString()(Code) | | To be used for a string representation of the accessor, returns the original name.
|
|
|