Package com.helger.web.scope
Interface IRequestParamContainer
-
- All Superinterfaces:
com.helger.commons.collection.attr.IAttributeContainer<String,Object>,com.helger.commons.collection.attr.IAttributeContainerAny<String>,com.helger.commons.lang.ICloneable<com.helger.commons.collection.impl.ICommonsMap<String,Object>>,com.helger.commons.collection.impl.ICommonsMap<String,Object>,com.helger.commons.traits.IGetterByKeyTrait<String>,Map<String,Object>
- All Known Implementing Classes:
RequestWebScope.ParamContainer
public interface IRequestParamContainer extends com.helger.commons.collection.attr.IAttributeContainerAny<String>
A special request parameter container with support for file items etc. By default onlyStringandString[]entries are present. If the request was parsed as a multipart request, it may also containerIFileItemorIFileItem[]entries.- Author:
- Philip Helger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.helger.commons.collection.attr.IAttributeContainer
com.helger.commons.collection.attr.IAttributeContainer.IAfterSetValueCallback<KEYTYPE extends Object,VALUETYPE extends Object>, com.helger.commons.collection.attr.IAttributeContainer.IBeforeSetValueCallback<KEYTYPE extends Object,VALUETYPE extends Object>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default com.helger.commons.collection.impl.ICommonsMap<String,IFileItem>getAllUploadedFileItems()default com.helger.commons.collection.impl.ICommonsMap<String,IFileItem[]>getAllUploadedFileItemsComplete()default com.helger.commons.collection.impl.ICommonsList<IFileItem>getAllUploadedFileItemValues()default IFileItemgetAsFileItem(String sAttrName)Get the request attribute denoted by the specified attribute name as an uploaded file item.default StringgetAsStringTrimmed(String sFieldName)Same asgetAsStringbut with a trimmed return value.default StringgetAsStringTrimmed(String sFieldName, String sDefault)Same asgetAsStringbut with a trimmed return value.default booleanhasCheckBoxValue(String sFieldName, String sFieldValue, boolean bDefaultValue)default booleanisCheckBoxChecked(String sFieldName, boolean bDefaultValue)Get the value of the checkbox of the request parameter with the given name.-
Methods inherited from interface com.helger.commons.collection.attr.IAttributeContainer
afterSetValueCallbacks, beforeSetValueCallbacks, getAsBoolean, getAsDouble, getAsFloat, getAsInt, getAsLong, getValue, putAllIn, putIn
-
Methods inherited from interface com.helger.commons.collection.attr.IAttributeContainerAny
getAndSetFlag, getClone, putIn, putIn, putIn, putIn, putIn, putIn
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsMap
addAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfEntrySet, copyOfKeySet, copyOfKeySet, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, createInstance, findFirstEntry, findFirstKey, findFirstValue, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getAsUnmodifiable, getFirstEntry, getFirstEntry, getFirstKey, getFirstKey, getFirstValue, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, put, putAll, putAll, putAllMapped, putAllMapped, putAllMapped, putIf, putIfNotNull, removeAll, removeIf, removeIfKey, removeIfValue, removeObject, setAll
-
Methods inherited from interface com.helger.commons.traits.IGetterByKeyTrait
containsNonNullValue, containsNullValue, getAsBigDecimal, getAsBigDecimal, getAsBigInteger, getAsBigInteger, getAsBoolean, getAsBooleanObj, getAsByte, getAsByte, getAsByteArray, getAsByteObj, getAsChar, getAsChar, getAsCharArray, getAsCharArray, getAsCharObj, getAsDouble, getAsDoubleObj, getAsFloat, getAsFloatObj, getAsInt, getAsIntObj, getAsLocalDate, getAsLocalDate, getAsLocalDate, getAsLocalDateTime, getAsLocalDateTime, getAsLocalDateTime, getAsLocalTime, getAsLocalTime, getAsLocalTime, getAsLong, getAsLongObj, getAsShort, getAsShort, getAsShortObj, getAsSqlBlob, getAsSqlClob, getAsSqlDate, getAsSqlNClob, getAsSqlRowId, getAsSqlTime, getAsSqlTimestamp, getAsString, getAsString, getAsStringList, getAsStringList, getAsStringSet, getAsStringSet, getCastedValue, getCastedValue, getCastedValue, getCastedValue, getConvertedValue, getConvertedValue, getSafeCastedValue, getSafeCastedValue, getValueClass, hasStringValue, hasStringValue, onSafeCastError
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
getAllUploadedFileItems
@Nonnull default com.helger.commons.collection.impl.ICommonsMap<String,IFileItem> getAllUploadedFileItems()
-
getAllUploadedFileItemsComplete
@Nonnull default com.helger.commons.collection.impl.ICommonsMap<String,IFileItem[]> getAllUploadedFileItemsComplete()
- Returns:
- A non-
nullbut maybe empty map with all containedIFileItemobjects from file uploads. The key of the map is the field name.
-
getAllUploadedFileItemValues
@Nonnull default com.helger.commons.collection.impl.ICommonsList<IFileItem> getAllUploadedFileItemValues()
- Returns:
- A non-
nullbut maybe empty list of allIFileItemobjects in the request. In comparison togetAllUploadedFileItems()this method also returns the content ofIFileItemarrays.
-
getAsFileItem
@Nullable default IFileItem getAsFileItem(@Nullable String sAttrName)
Get the request attribute denoted by the specified attribute name as an uploaded file item. In case the specified parameter is present but not a file item, the method returnsnull.- Parameters:
sAttrName- The attribute name to resolved. May benull.- Returns:
nullif no such attribute is present, or if the attribute is not a file item.
-
isCheckBoxChecked
default boolean isCheckBoxChecked(@Nullable String sFieldName, boolean bDefaultValue)
Get the value of the checkbox of the request parameter with the given name.- 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.
-
hasCheckBoxValue
default boolean hasCheckBoxValue(@Nonnull @Nonempty String sFieldName, @Nonnull String sFieldValue, boolean bDefaultValue)
-
getAsStringTrimmed
@Nullable default String getAsStringTrimmed(@Nullable String sFieldName)
Same asgetAsStringbut with a trimmed return value.- Parameters:
sFieldName- The field name to query. May benull.- Returns:
nullif no such parameter name is present.- Since:
- 9.0.2
-
getAsStringTrimmed
@Nullable default String getAsStringTrimmed(@Nullable String sFieldName, @Nullable String sDefault)
Same asgetAsStringbut with a trimmed return value.- Parameters:
sFieldName- The field name to query. May benull.sDefault- The value to be returned if the retrieved value isnull.- Returns:
nullif no such parameter name is present.- Since:
- 9.0.2
-
-