Interface IRequestParamMap

  • All Superinterfaces:
    com.helger.commons.lang.IHasSize
    All Known Implementing Classes:
    RequestParamMap

    public interface IRequestParamMap
    extends com.helger.commons.lang.IHasSize
    A request parameter map. It handles complex request parameters and lets you iterate the structure.
    Author:
    Philip Helger
    • Method Detail

      • getBoolean

        default boolean getBoolean​(@Nonnull @Nonempty
                                   String sPath,
                                   boolean bDefault)
      • getDouble

        default double getDouble​(@Nonnull @Nonempty
                                 String sPath,
                                 double dDefault)
      • getInt

        default int getInt​(@Nonnull @Nonempty
                           String sPath,
                           int nDefault)
      • getLong

        default long getLong​(@Nonnull @Nonempty
                             String sPath,
                             long nDefault)
      • 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 be null.
        bDefaultValue - the default value to be returned, if no request attribute is present
        Returns:
        true if the checkbox is checked, false if it is not checked and the default value otherwise.
      • getMap

        @Nullable
        IRequestParamMap getMap​(@Nonnull @Nonempty
                                String... aPath)
        Get a nested map for the specified path.
        Parameters:
        aPath - The path to be resolved
        Returns:
        null if 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:
        true if such a key is contained, false if not
      • keySet

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsOrderedSet<String> keySet()
        Returns:
        A set of all contained key. Never null but maybe empty.
      • values

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsList<RequestParamMapItem> values()
        Returns:
        A collection of all values of this map. The type of the value is usually either String, file item (from upload) or Map from String to Object.
      • 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!
      • getAsValueTrimmedMap

        @Nonnull
        @ReturnsMutableCopy
        com.helger.commons.collection.impl.ICommonsOrderedMap<String,​String> getAsValueTrimmedMap()
        Returns:
        A key/value map, with enforced and trimmed values. If this map contains a nested map, the nested maps are ignored!