Class Parameters

java.lang.Object
com.ibm.security.access.httpclient.Parameters

public class Parameters extends Object
This class stores the parameters for a HTTP request.
  • Field Details

  • Constructor Details

    • Parameters

      public Parameters()
    • Parameters

      public Parameters(Map<String,List<String>> initValues)
  • Method Details

    • addParameter

      public boolean addParameter(String name, List values)
      Add a parameter
      Parameters:
      name - Parameter name
      values - A List(String) of parameter values
      Returns:
      True if successful. False otherwise.
    • addParameter

      public boolean addParameter(String name, String value)
      Add a parameter
      Parameters:
      name - Parameter name
      value - Parameter value
      Returns:
      True if successful. False otherwise.
    • addParameter

      public boolean addParameter(String name, Parameters value)
      Add a nested parameter.
      Parameters:
      name - Parameter name
      value - Parameter value
      Returns:
      True if successful. False otherwise.
    • addArrayObject

      public boolean addArrayObject(Object value)
      Add an object to an array. Eg: [Object1, Object2, Object3] Note: If this method is called then only objects added by this method will be used. All other properties are ignored.
      Parameters:
      value - Object value
      Returns:
      True if successful. False otherwise.
    • addData

      public boolean addData(String value)
      Add full request parameter data as a JSON data string. If this method is used to add data, all other data that is added will be ignored. Note: This method is not supported for nested Parameters.
      Parameters:
      value - The JSON data string.
      Returns:
      True if successful. False otherwise.
    • getParameterNames

      public String[] getParameterNames()
      Get all the parameter names. Returns null if there are no parameters.
      Returns:
      Parameter names. Null if no parameters.
    • getParameters

      public Map getParameters()
      Get all the parameters
      Returns:
      A Map(String,List(String)) of all parameters
    • getParameter

      public String[] getParameter(String name)
      Get the parameter values with the specified name. Returns null if no such parameter name or name was null/empty string.
      Parameters:
      name - The parameter name
      Returns:
      A List(String) of values associated with that parameter name. Null if no such parameter name exists or name was null/empty string.
    • setUrlEncode

      public void setUrlEncode(boolean value)
    • getUrlEncode

      public boolean getUrlEncode()