Class ParameterOrigin

java.lang.Object
com.invirgance.convirgance.web.origin.ParameterOrigin
All Implemented Interfaces:
Origin

@Wiring public class ParameterOrigin extends Object implements 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 Details

    • ParameterOrigin

      public ParameterOrigin()
  • Method Details

    • getName

      public String getName()
      The name of the parameter.
      Returns:
      The current name.
    • setName

      public void setName(String name)
      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 with setName(java.lang.String).
      Specified by:
      getOrigin in interface Origin
      Parameters:
      request - The HttpRequest containing the parameter value
      parameters - Required by the Origin interface but not used in this implementation
      Returns:
      A ByteArraySource containing the parameter value's bytes