Package org.apache.empire.jsf2.utils
Class ParameterMap
java.lang.Object
org.apache.empire.jsf2.utils.ParameterMap
This class manages request parameters in a way that they cannot be analyzed and modified by the user
- Author:
- doebele
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidclear(PageDefinition page, DBRowSet rowset) protected StringencodeAndStore(String typeName, String objectKey, Object item, boolean useCache) encodes the objectKey and stores the item in the parameter mapencodeString(String valueAsString) encodeStringWithCache(String valueAsString) <T extends ParameterObject>
TReturns the ParameterObject for the given encoded idObject[]Returns a class key from an encoded idObject[]Returns a record key for a given RowSet from an encoded idObject[]getKey(PageDefinition page, DBRowSet rowset, String id) Returns an record key for a given page and rowsetprotected StringgetRowSetTypeName(DBRowSet rowset) gets a unique name for a given rowsetPuts a key for a given class into the parameter mapputs a key of a particular type into the parameter mapPuts a RowSet key into the parameter mapput(PageDefinition page, DBRowSet rowset, Object[] key) Generates an idParam which is only valid for the given page.put(ParameterObject paramObject) Puts an object into the paramter map that implements the ParameterObject interfaceput(ParameterObject paramObject, boolean useCache) Puts an object into the paramter map that implements the ParameterObject interfaceprotected voidputs an object into the parameter map
-
Field Details
-
codeMap
-
typeMap
-
-
Constructor Details
-
ParameterMap
public ParameterMap()
-
-
Method Details
-
encodeString
-
encodeStringWithCache
-
getRowSetTypeName
gets a unique name for a given rowset- Parameters:
rowset- the rowset- Returns:
- a unique name for the given rowset
-
putValue
puts an object into the parameter map- Parameters:
typeName- the type nameencodedId- the iditem- the object
-
encodeAndStore
encodes the objectKey and stores the item in the parameter map- Parameters:
typeName- the type nameobjectKey- the object keyitem- the objectuseCache- flag whether to cache the objectKey- Returns:
- the encoded identifier
-
put
puts a key of a particular type into the parameter map- Parameters:
type- the type namekey- the key stringvalue- the valueuseCache- true if the keys should be cached- Returns:
- the encoded key
-
get
-
clear
-
put
Puts an object into the paramter map that implements the ParameterObject interface- Parameters:
paramObject- the param objectuseCache- flag whether to cache the objectKey- Returns:
- the encoded object
-
put
Puts an object into the paramter map that implements the ParameterObject interface- Parameters:
paramObject- the param object- Returns:
- the encoded object
-
get
Returns the ParameterObject for the given encoded id- Type Parameters:
T- the parameter type- Parameters:
paramType- the param type classid- the item id- Returns:
- the object
-
clear
-
put
Puts a RowSet key into the parameter map- Parameters:
rowset- the rowsetkey- the record key- Returns:
- the encoded key
-
getKey
Returns a record key for a given RowSet from an encoded id- Parameters:
rowset- the RowSet for which to get the keyid- the encoded id- Returns:
- the record key
-
clear
-
put
Puts a key for a given class into the parameter map- Parameters:
c- the classkey- the key for this class- Returns:
- the encoded key
-
getKey
Returns a class key from an encoded id- Parameters:
c- the class for which to retrieve the keyid- the encoded id- Returns:
- the class key
-
put
Generates an idParam which is only valid for the given page.- Parameters:
page- the target pagerowset- the rowsetkey- the key- Returns:
- the encoded object
-
getKey
Returns an record key for a given page and rowset- Parameters:
page- the pagerowset- the rowsetid- the object id- Returns:
- the object key
-
clear
-