Package org.simpleframework.http
Interface Form
-
- All Superinterfaces:
java.util.Map<java.lang.String,java.lang.String>
,Query
public interface Form extends Query
TheForm
interface is used to represent the details submitted with a request. Typically this will be parameters given by a HTML form, however a form can also contain parts. Each part can represent either a file or a parameter. All parts can be acquired asPart
objects from thisForm
.- Author:
- Niall Gallagher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Part
getPart(java.lang.String name)
This method is used to acquire aPart
from the form using a known name for the part.java.util.List<Part>
getParts()
This method provides all parts for thisForm
.-
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
-
Methods inherited from interface org.simpleframework.http.Query
getAll, getBoolean, getFloat, getInteger, toString
-
-
-
-
Method Detail
-
getPart
Part getPart(java.lang.String name)
This method is used to acquire aPart
from the form using a known name for the part. This is typically used when there is a file upload with a multipart POST request. All parts that are not files are added to the query values as strings so that they can be used in a convenient way.- Parameters:
name
- this is the name of the part to acquire- Returns:
- the named part or null if the part does not exist
-
getParts
java.util.List<Part> getParts()
This method provides all parts for thisForm
. The parts for a form can contain text parameters or files. Each file part can contain headers, which take the form of HTTP headers to describe the payload. Typically headers describe the content.- Returns:
- this returns a list of parts for this form
-
-