Class ExpectedBodyField

java.lang.Object
com.pixelservices.flash.components.http.expected.ExpectedBodyField

public class ExpectedBodyField extends Object
The ExpectedBodyField lets you assume the existence of a field in the request body and work with it
  • Constructor Details

    • ExpectedBodyField

      public ExpectedBodyField(String fieldName, RequestHandler requestHandler)
      Constructor for ExpectedBodyField
      Parameters:
      fieldName - The name of the field to be retrieved from the request
      requestHandler - The RequestHandler object
    • ExpectedBodyField

      public ExpectedBodyField(String fieldName, String description, RequestHandler requestHandler)
      Constructor for ExpectedBodyField
      Parameters:
      fieldName - The name of the field to be retrieved from the request
      description - The description of the field
      requestHandler - The RequestHandler object
  • Method Details

    • getFieldValue

      public Object getFieldValue()
      Get the field value
      Returns:
      The field value
    • getString

      public String getString()
      Get the field value as a String
      Returns:
      The field value as a String
    • getInt

      public Integer getInt()
      Get the field value as an Integer
      Returns:
      The field value as an Integer
    • getBoolean

      public Boolean getBoolean()
      Get the field value as a Boolean
      Returns:
      The field value as a Boolean
    • getLong

      public Long getLong()
      Get the field value as a Long
      Returns:
      The field value as a Long
    • getDouble

      public Double getDouble()
      Get the field value as a Double
      Returns:
      The field value as a Double
    • getFloat

      public Float getFloat()
      Get the field value as a Float
      Returns:
      The field value as a Float
    • getByte

      public Byte getByte()
      Get the field value as a Byte
      Returns:
      The field value as a Byte
    • getShort

      public Short getShort()
      Get the field value as a Short
      Returns:
      The field value as a Short
    • getChar

      public char getChar()
      Get the field value as a char
      Returns:
      The field value as a char
    • getJSONObject

      public org.json.JSONObject getJSONObject()
      Get the field value as a JSONObject
      Returns:
      The field value as a JSONObject
    • getDescription

      public String getDescription()
      Get description of the field
      Returns:
      The description of the field