Interface Configuration

All Known Implementing Classes:
SimpleConfiguration, SubConfiguration

public interface Configuration
CardAgents relies on a Configuration object to provide runtime configuration parameters such as merchant number, etc.
Since:
jPOS 1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String propertyName)
    Returns the value of a configuration property.
    get(String propertyName, String defaultValue)
    Returns the value of a configuration property, or a default.
    getAll(String propertyName)
    Returns all property values with the given name.
    boolean
    getBoolean(String propertyName)
    Returns the value of a configuration property as a boolean.
    boolean
    getBoolean(String propertyName, boolean defaultValue)
    Returns the value of a configuration property as a boolean, or a default.
    boolean[]
    getBooleans(String propertyName)
    Returns all values of a configuration property as a boolean array.
    double
    getDouble(String propertyName)
    Returns the value of a configuration property as a double.
    double
    getDouble(String propertyName, double defaultValue)
    Returns the value of a configuration property as a double, or a default.
    double[]
    getDoubles(String propertyName)
    Returns all values of a configuration property as a double array.
    int
    getInt(String propertyName)
    Returns the value of a configuration property as an int.
    int
    getInt(String propertyName, int defaultValue)
    Returns the value of a configuration property as an int, or a default.
    int[]
    getInts(String propertyName)
    Returns all values of a configuration property as an int array.
    long
    getLong(String propertyName)
    Returns the value of a configuration property as a long.
    long
    getLong(String propertyName, long defaultValue)
    Returns the value of a configuration property as a long, or a default.
    long[]
    getLongs(String propertyName)
    Returns all values of a configuration property as a long array.
    Returns the set of all property names in this configuration.
    void
    put(String name, Object value)
    Stores a property value.
  • Method Details

    • get

      String get(String propertyName)
      Returns the value of a configuration property.
      Parameters:
      propertyName - the property name
      Returns:
      the property value, or an empty string if not found
    • getAll

      String[] getAll(String propertyName)
      Returns all property values with the given name.
      Parameters:
      propertyName - the property name
      Returns:
      all matching values, or a zero-length array
    • getInts

      int[] getInts(String propertyName)
      Returns all values of a configuration property as an int array.
      Parameters:
      propertyName - the property name
      Returns:
      all values as int array
    • getLongs

      long[] getLongs(String propertyName)
      Returns all values of a configuration property as a long array.
      Parameters:
      propertyName - the property name
      Returns:
      all values as long array
    • getDoubles

      double[] getDoubles(String propertyName)
      Returns all values of a configuration property as a double array.
      Parameters:
      propertyName - the property name
      Returns:
      all values as double array
    • getBooleans

      boolean[] getBooleans(String propertyName)
      Returns all values of a configuration property as a boolean array.
      Parameters:
      propertyName - the property name
      Returns:
      all values as boolean array
    • get

      String get(String propertyName, String defaultValue)
      Returns the value of a configuration property, or a default.
      Parameters:
      propertyName - the property name
      defaultValue - value to return if not found
      Returns:
      the property value or defaultValue
    • getInt

      int getInt(String propertyName)
      Returns the value of a configuration property as an int.
      Parameters:
      propertyName - the property name
      Returns:
      the value as an int, or 0 if not found
    • getInt

      int getInt(String propertyName, int defaultValue)
      Returns the value of a configuration property as an int, or a default.
      Parameters:
      propertyName - the property name
      defaultValue - default if not found
      Returns:
      the value as an int
    • getLong

      long getLong(String propertyName)
      Returns the value of a configuration property as a long.
      Parameters:
      propertyName - the property name
      Returns:
      the value as a long, or 0 if not found
    • getLong

      long getLong(String propertyName, long defaultValue)
      Returns the value of a configuration property as a long, or a default.
      Parameters:
      propertyName - the property name
      defaultValue - default if not found
      Returns:
      the value as a long
    • getDouble

      double getDouble(String propertyName)
      Returns the value of a configuration property as a double.
      Parameters:
      propertyName - the property name
      Returns:
      the value as a double, or 0.0 if not found
    • getDouble

      double getDouble(String propertyName, double defaultValue)
      Returns the value of a configuration property as a double, or a default.
      Parameters:
      propertyName - the property name
      defaultValue - default if not found
      Returns:
      the value as a double
    • getBoolean

      boolean getBoolean(String propertyName)
      Returns the value of a configuration property as a boolean.
      Parameters:
      propertyName - the property name
      Returns:
      the value as a boolean, or false if not found
    • getBoolean

      boolean getBoolean(String propertyName, boolean defaultValue)
      Returns the value of a configuration property as a boolean, or a default.
      Parameters:
      propertyName - the property name
      defaultValue - default if not found
      Returns:
      the value as a boolean
    • put

      void put(String name, Object value)
      Stores a property value.
      Parameters:
      name - the property name
      value - the value (typically a String or String[])
    • keySet

      Returns the set of all property names in this configuration.
      Returns:
      the property name set