| java.lang.Object com.noelios.restlet.util.FormUtils
FormUtils | public class FormUtils (Code) | | Representation of a Web form containing submitted parameters.
author: Jerome Louvel (contact@noelios.com) |
Method Summary | |
public static Parameter | create(CharSequence name, CharSequence value, CharacterSet characterSet) Creates a parameter.
Parameters: name - The parameter name buffer. Parameters: value - The parameter value buffer (can be null). Parameters: characterSet - The supported character encoding. | public static Parameter | getFirstParameter(Logger logger, String query, String name, CharacterSet characterSet) Reads the first parameter with the given name.
Parameters: logger - The logger. Parameters: query - The query string. Parameters: name - The parameter name to match. Parameters: characterSet - The supported character encoding. | public static Parameter | getFirstParameter(Logger logger, Representation post, String name) Reads the first parameter with the given name.
Parameters: logger - The logger. Parameters: post - The web form representation. Parameters: name - The parameter name to match. | public static Object | getParameter(Logger logger, String query, String name, CharacterSet characterSet) Reads the parameters with the given name. If multiple values are
found, a list is returned created.
Parameters: logger - The logger. Parameters: query - The query string. Parameters: name - The parameter name to match. Parameters: characterSet - The supported character encoding. | public static Object | getParameter(Logger logger, Representation form, String name) Reads the parameters with the given name. If multiple values are
found, a list is returned created.
Parameters: logger - The logger. Parameters: form - The web form representation. Parameters: name - The parameter name to match. | public static void | getParameters(Logger logger, String query, Map<String, Object> parameters, CharacterSet characterSet) Reads the parameters whose name is a key in the given map. If a
matching parameter is found, its value is put in the map. If
multiple values are found, a list is created and set in the map. | public static void | getParameters(Logger logger, Representation post, Map<String, Object> parameters) Reads the parameters whose name is a key in the given map. If a
matching parameter is found, its value is put in the map. If
multiple values are found, a list is created and set in the map. | public static void | parsePost(Logger logger, Form form, Representation post) Parses a post into a given form. | public static void | parseQuery(Logger logger, Form form, String query, CharacterSet characterSet) Parses a query into a given form. |
getFirstParameter | public static Parameter getFirstParameter(Logger logger, String query, String name, CharacterSet characterSet) throws IOException(Code) | | Reads the first parameter with the given name.
Parameters: logger - The logger. Parameters: query - The query string. Parameters: name - The parameter name to match. Parameters: characterSet - The supported character encoding. The parameter. throws: IOException - |
getFirstParameter | public static Parameter getFirstParameter(Logger logger, Representation post, String name) throws IOException(Code) | | Reads the first parameter with the given name.
Parameters: logger - The logger. Parameters: post - The web form representation. Parameters: name - The parameter name to match. The parameter. throws: IOException - |
getParameter | public static Object getParameter(Logger logger, String query, String name, CharacterSet characterSet) throws IOException(Code) | | Reads the parameters with the given name. If multiple values are
found, a list is returned created.
Parameters: logger - The logger. Parameters: query - The query string. Parameters: name - The parameter name to match. Parameters: characterSet - The supported character encoding. The parameter value or list of values. |
getParameter | public static Object getParameter(Logger logger, Representation form, String name) throws IOException(Code) | | Reads the parameters with the given name. If multiple values are
found, a list is returned created.
Parameters: logger - The logger. Parameters: form - The web form representation. Parameters: name - The parameter name to match. The parameter value or list of values. |
getParameters | public static void getParameters(Logger logger, String query, Map<String, Object> parameters, CharacterSet characterSet) throws IOException(Code) | | Reads the parameters whose name is a key in the given map. If a
matching parameter is found, its value is put in the map. If
multiple values are found, a list is created and set in the map.
Parameters: logger - The logger. Parameters: query - The query string. Parameters: parameters - The parameters map controlling the reading. Parameters: characterSet - The supported character encoding. |
getParameters | public static void getParameters(Logger logger, Representation post, Map<String, Object> parameters) throws IOException(Code) | | Reads the parameters whose name is a key in the given map. If a
matching parameter is found, its value is put in the map. If
multiple values are found, a list is created and set in the map.
Parameters: logger - The logger. Parameters: post - The web form representation. Parameters: parameters - The parameters map controlling the reading. |
parsePost | public static void parsePost(Logger logger, Form form, Representation post)(Code) | | Parses a post into a given form.
Parameters: logger - The logger. Parameters: form - The target form. Parameters: post - The posted form. |
parseQuery | public static void parseQuery(Logger logger, Form form, String query, CharacterSet characterSet)(Code) | | Parses a query into a given form.
Parameters: logger - The logger. Parameters: form - The target form. Parameters: query - Query string. Parameters: characterSet - The supported character encoding. |
|
|