Class ParameterOrigin
java.lang.Object
com.invirgance.convirgance.web.origin.ParameterOrigin
- All Implemented Interfaces:
Origin
Origin implementation that extracts data from a specific HTTP request
parameter.
Use this origin when you need to: - Process data submitted in a specific request parameter - Handle form field submissions containing structured data - Extract and process URL-encoded parameter values
- Author:
- jbanes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()The name of the parameter.com.invirgance.convirgance.source.SourcegetOrigin(HttpRequest request, com.invirgance.convirgance.json.JSONObject parameters) Gets the value of the parameter assigned withsetName(java.lang.String).voidSets the name of the parameter to retrieve.
-
Constructor Details
-
ParameterOrigin
public ParameterOrigin()
-
-
Method Details
-
getName
The name of the parameter.- Returns:
- The current name.
-
setName
Sets the name of the parameter to retrieve.- Parameters:
name- The parameter names
-
getOrigin
public com.invirgance.convirgance.source.Source getOrigin(HttpRequest request, com.invirgance.convirgance.json.JSONObject parameters) Gets the value of the parameter assigned withsetName(java.lang.String).- Specified by:
getOriginin interfaceOrigin- Parameters:
request- TheHttpRequestcontaining the parameter valueparameters- Required by the Origin interface but not used in this implementation- Returns:
- A ByteArraySource containing the parameter value's bytes
-