Package com.atlassian.bamboo.collections
Class SimpleActionParametersMap
-
- All Implemented Interfaces:
ActionParametersMap,Map<String,Object>
- Direct Known Subclasses:
ActionParametersMapImpl
public class SimpleActionParametersMap extends com.google.common.collect.ForwardingMap<String,Object> implements ActionParametersMap
-
-
Constructor Summary
Constructors Constructor Description SimpleActionParametersMap(Map<String,?> parameters)Deprecated.since 6.0 useSimpleActionParametersMap(HttpParameters)SimpleActionParametersMap(org.apache.struts2.dispatcher.HttpParameters parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()protected Map<String,Object>delegate()voiddetachFromActionContext()After you call this, changes will no longer propagate to the ActionContext.booleangetBoolean(@Nullable String key)Returns a boolean value from the map of parameters.doublegetDouble(@Nullable String key, double defaultValue)Retrieve Double value from the map of parameters.@NotNull Map<String,File>getFiles()Returns map of Files uploaded to this form.intgetInt(@Nullable String key, int defaultValue)Retrieve Integer value from the map of parameters.longgetLong(@Nullable String key, long defaultValue)Retrieve Long value from the map of parameters.Map<String,Object>getParameters()Returns internal map of parameters.@Nullable StringgetString(@Nullable String key)Returns a String value from the map of parameters.@NotNull StringgetString(@Nullable String key, @NotNull String defaultString)Returns a String value from the map of parmeters.@Nullable String[]getStringArray(@Nullable String key)Returns a String[] value from the map of parameters.Objectput(@NotNull String key, @NotNull Object value)voidputAll(Map<? extends String,?> map)Objectremove(Object object)-
Methods inherited from class com.google.common.collect.ForwardingMap
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
-
-
-
Constructor Detail
-
SimpleActionParametersMap
public SimpleActionParametersMap(org.apache.struts2.dispatcher.HttpParameters parameters)
-
SimpleActionParametersMap
@Deprecated public SimpleActionParametersMap(Map<String,?> parameters)
Deprecated.since 6.0 useSimpleActionParametersMap(HttpParameters)
-
-
Method Detail
-
getString
@NotNull public @NotNull String getString(@Nullable @Nullable String key, @NotNull @NotNull String defaultString)
Description copied from interface:ActionParametersMapReturns a String value from the map of parmeters. If the key does not exist in the map or the value is null then the defaultString is returned.- Specified by:
getStringin interfaceActionParametersMap- Parameters:
key- Key of value to be searched in the mapdefaultString- the default string to return if the property does not exist in the map- Returns:
- String value of object found or defaultString if not found
-
getString
@Nullable public @Nullable String getString(@Nullable @Nullable String key)
Description copied from interface:ActionParametersMapReturns a String value from the map of parameters. If the key does not exist in the map, then null is returned.- Specified by:
getStringin interfaceActionParametersMap- Parameters:
key- Key of value to be searched in the map- Returns:
- String value of object found or null if not found
-
getStringArray
@Nullable public @Nullable String[] getStringArray(@Nullable @Nullable String key)
Description copied from interface:ActionParametersMapReturns a String[] value from the map of parameters. If the key does not exist in the map, then null is returned.- Specified by:
getStringArrayin interfaceActionParametersMap- Parameters:
key- Key of value to be searched in the map- Returns:
- String[] value of object found or null if not found
-
getDouble
public double getDouble(@Nullable @Nullable String key, double defaultValue)Description copied from interface:ActionParametersMapRetrieve Double value from the map of parameters. If the key does not exist in the map, or is not convertible to Double then default value is returned.- Specified by:
getDoublein interfaceActionParametersMap- Parameters:
key- Key of value to be searched in the mapdefaultValue- Default value to be returned if key not found or not convertible to Double- Returns:
- Value of object found or defaultValue if not convertible to Double or not found
-
getInt
public int getInt(@Nullable @Nullable String key, int defaultValue)Description copied from interface:ActionParametersMapRetrieve Integer value from the map of parameters. If the key does not exist in the map, or is not convertible to Integer then default value is returned.- Specified by:
getIntin interfaceActionParametersMap- Parameters:
key- Key of value to be searched in the mapdefaultValue- Default value to be returned if key not found or not convertible to Integer- Returns:
- Value of object found or defaultValue if not convertible to Integer or not found
-
getLong
public long getLong(@Nullable @Nullable String key, long defaultValue)Description copied from interface:ActionParametersMapRetrieve Long value from the map of parameters. If the key does not exist in the map, or is not convertible to Long then default value is returned.- Specified by:
getLongin interfaceActionParametersMap- Parameters:
key- Key of value to be searched in the mapdefaultValue- Default value to be returned if key not found or not convertible to Long- Returns:
- Value of object found or defaultValue if not convertible to Long or not found
-
getBoolean
public boolean getBoolean(@Nullable @Nullable String key)Description copied from interface:ActionParametersMapReturns a boolean value from the map of parameters. If it does not exist in the map, then false is returned- Specified by:
getBooleanin interfaceActionParametersMap- Parameters:
key- Key of value to be searched in the map- Returns:
- True if the value converted to true or false otherwise
-
getFiles
@NotNull public @NotNull Map<String,File> getFiles()
Description copied from interface:ActionParametersMapReturns map of Files uploaded to this form.- Specified by:
getFilesin interfaceActionParametersMap- Returns:
- Map of Files uploaded to this form
-
getParameters
public Map<String,Object> getParameters()
Description copied from interface:ActionParametersMapReturns internal map of parameters.- Specified by:
getParametersin interfaceActionParametersMap- Returns:
- Parameters map
-
clear
public void clear()
-
detachFromActionContext
public void detachFromActionContext()
After you call this, changes will no longer propagate to the ActionContext.
-
-