Package nzilbb.labbcat.server.api
Class RequestParameters
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- nzilbb.labbcat.server.api.RequestParameters
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
public class RequestParameters extends HashMap<String,Object>
A map of request parameter names to their values. Each name can correspond to multiple values, and values can be either Strings or Files.- Author:
- Robert Fromont robert@fromont.net.nz
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description RequestParameters()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile(String key)
Gets the named item as a list of files.Vector<File>
getFiles(String key)
Gets the named item as a list of files.String
getString(String key)
Gets the named item as a string.String[]
getStrings(String key)
Gets all parameters with the given name.-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Method Detail
-
getString
public String getString(String key)
Gets the named item as a string.- Parameters:
key
- The parameter name.- Returns:
- The item as a String.
-
getStrings
public String[] getStrings(String key)
Gets all parameters with the given name.- Parameters:
key
- The parameter name.- Returns:
- All parameter String values, or an empty array if there are none.
-
getFile
public File getFile(String key)
Gets the named item as a list of files.- Parameters:
key
- The parameter name.- Returns:
- A list of FileItems.
-
-