public class Parameters extends Object
An object of type Parameters contains a number og request parameters that are sent by the client but whose names may not be known by the programmer at compile time. If a web method declares an argument of type Parameters all request parameters that are not matched by the preceding arguments on the list of formal method parameters are represented using this parameters object.
A Parameters object contains the values for each of these parameters as either TextField
objects or FileField
objects depending on the type sent from the client. A file can
thus be received by the program by simply reading the input stream from such a file field.
Constructor and Description |
---|
Parameters(LinkedHashMap<String,List<FormField>> parameters)
Constructs a new parameters object.
|
Modifier and Type | Method and Description |
---|---|
FormField |
getField(String name)
Returns the
FormField object for the given parameter name. |
List<FormField> |
getList(String name)
Returns list of
FormField objects for the given parameter name. |
Map<String,List<FormField>> |
getMap()
Returns the parameter map.
|
String |
getValue(String name)
Returns the string value for the given parameter name.
|
public Parameters(LinkedHashMap<String,List<FormField>> parameters)
public FormField getField(String name)
FormField
object for the given parameter name.
Returns null if there is no such parameter.public List<FormField> getList(String name)
FormField
objects for the given parameter name.
Returns an empty list if there are no such parameters.Copyright © 2008-2012 Anders Møller & Mathias Schwarz.