Package com.helger.servlet.request
Interface IRequestParamMap
-
- All Superinterfaces:
com.helger.commons.lang.IHasSize
- All Known Implementing Classes:
RequestParamMap
public interface IRequestParamMap extends com.helger.commons.lang.IHasSizeA request parameter map. It handles complex request parameters and lets you iterate the structure.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancontains(String... aPath)booleancontainsKey(String sKey)Check if this map, contains the passed key.com.helger.commons.collection.impl.ICommonsOrderedMap<String,RequestParamMapItem>getAsObjectMap()com.helger.commons.collection.impl.ICommonsOrderedMap<String,String>getAsValueMap()com.helger.commons.collection.impl.ICommonsOrderedMap<String,String>getAsValueTrimmedMap()default BigDecimalgetBigDecimal(String... aPath)default BigIntegergetBigInteger(String... aPath)default booleangetBoolean(String sPath, boolean bDefault)default doublegetDouble(String sPath, double dDefault)default intgetInt(String sPath, int nDefault)default longgetLong(String sPath, long nDefault)IRequestParamMapgetMap(String... aPath)Get a nested map for the specified path.RequestParamMapItemgetObject(String... aPath)default StringgetString(String... aPath)default StringgetStringTrimmed(String... aPath)com.helger.commons.collection.impl.ICommonsOrderedMap<String,String>getValueMap(String... aPath)com.helger.commons.collection.impl.ICommonsOrderedMap<String,String>getValueTrimmedMap(String... aPath)default booleanisCheckBoxChecked(String sFieldName, boolean bDefaultValue)Get the value of the checkbox of the request parameter with the given name.com.helger.commons.collection.impl.ICommonsOrderedSet<String>keySet()com.helger.commons.collection.impl.ICommonsList<RequestParamMapItem>values()
-
-
-
Method Detail
-
getObject
@Nullable RequestParamMapItem getObject(@Nonnull @Nonempty String... aPath)
-
getBigInteger
@Nullable default BigInteger getBigInteger(@Nonnull @Nonempty String... aPath)
-
getBigDecimal
@Nullable default BigDecimal getBigDecimal(@Nonnull @Nonempty String... aPath)
-
isCheckBoxChecked
default boolean isCheckBoxChecked(@Nullable String sFieldName, boolean bDefaultValue)
Get the value of the checkbox of the request parameter with the given name. Ripped from IRequestParamContainer....- Parameters:
sFieldName- Request parameter name. May benull.bDefaultValue- the default value to be returned, if no request attribute is present- Returns:
trueif the checkbox is checked,falseif it is not checked and the default value otherwise.
-
getValueMap
@Nullable com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getValueMap(@Nonnull @Nonempty String... aPath)
-
getValueTrimmedMap
@Nullable com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getValueTrimmedMap(@Nonnull @Nonempty String... aPath)
-
getMap
@Nullable IRequestParamMap getMap(@Nonnull @Nonempty String... aPath)
Get a nested map for the specified path.- Parameters:
aPath- The path to be resolved- Returns:
nullif the path could not be resolved.
-
containsKey
boolean containsKey(@Nullable String sKey)
Check if this map, contains the passed key. This will be true both for nested maps as well as for values.- Parameters:
sKey- The key to check.- Returns:
trueif such a key is contained,falseif not
-
keySet
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedSet<String> keySet()
- Returns:
- A set of all contained key. Never
nullbut maybe empty.
-
values
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsList<RequestParamMapItem> values()
-
getAsObjectMap
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedMap<String,RequestParamMapItem> getAsObjectMap()
- Returns:
- A copy of the contained map. For the value types see
values()
-
getAsValueMap
@Nonnull @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getAsValueMap()
- Returns:
- A key/value map, with enforced values. If this map contains a nested map, the nested maps are ignored!
-
-