org.appng.api.model

## Interface Properties

- All Known Implementing Classes:
    PersistentPropertyHolder, PlatformProperties, PropertyHolder

      public interface Properties

  Everywhere in appNG where something needs to be configurable, `Properties` come into operation. Based upon simple key-value-pairs, they offer the ability to provide default-values and type-conversion.
  Author:
    Matthias Müller
  See Also:
    `Property`, `Site.getProperties()`, `Application.getProperties()`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getBlob(String name)` Returns the byte-value of the given `Property`.
    `Boolean` | `getBoolean(String name)` Returns a `Boolean` parsed from the given `Property` (if existing).
    `Boolean` | `getBoolean(String name, Boolean defaultValue)`
    `String` | `getClob(String name)` Returns the string-value of the given `Property`.
    `String` | `getClob(String name, String defaultValue)` Returns the string-value of the given `Property` (if existing), or the default-value.
    `String` | `getDescriptionFor(String name)` Returns the description for the `Property` with the given name, if any
    `Double` | `getDouble(String name)` Returns an `Double` parsed from the given `Property` (if existing).
    `Double` | `getDouble(String name, Double defaultValue)` Returns a `Double` parsed from the given `Property` (if existing), or the default-value.
    `Float` | `getFloat(String name)` Returns an `Float` parsed from the given `Property` (if existing).
    `Float` | `getFloat(String name, Float defaultValue)` Returns a `Float` parsed from the given `Property` (if existing), or the default-value.
    `Integer` | `getInteger(String name)` Returns an `Integer` parsed from the given `Property` (if existing).
    `Integer` | `getInteger(String name, Integer defaultValue)` Returns an `Integer` parsed from the given `Property` (if existing), or the default-value.
    `List<String>` | `getList(String name, String delimiter)` Returns a `List` of `String`s which is parsed from the value of the `Property` with the given name (if present).
    `List<String>` | `getList(String name, String defaultValue, String delimiter)` Returns a `List` of `String`s which is parsed from the value of the `Property` with the given name (if present) or from the default-value.
    `default Object` | `getObject(String name)` Returns the object representation of the `Property` according to it's `Property.Type`: an `Integer` (for type `Property.Type.INT`) a `Double` (for type `Property.Type.DECIMAL`) a `Boolean` (for type `Property.Type.BOOLEAN`) a `String` (for types `Property.Type.TEXT`, `Property.Type.PASSWORD` and `Property.Type.MULTILINE`)
    `Properties` | `getPlainProperties()` Takes this `Properties` and transforms it into some (plain, old, uncool) `Properties`.
    `Properties` | `getProperties(String name)` Returns some `Properties` parsed from the given `Property` (if existing).
    `Set<String>` | `getPropertyNames()` Returns all `Property` names.
    `String` | `getString(String name)` Returns the string-value of the given `Property`.
    `String` | `getString(String name, String defaultValue)` Returns the string-value of the given `Property` (if existing), or the default-value.
    `boolean` | `propertyExists(String name)` Checks whether the `Property` with the given name exists.

- - ### Method Detail

    - #### getList

          List<String> getList(String name,
                               String defaultValue,
                               String delimiter)

      Returns a `List` of `String`s which is parsed from the value of the `Property` with the given name (if present) or from the default-value.
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-string to parse the list from
        `delimiter` - the delimiter to split the (default-)value by
      Returns:
        a (possibly empty) `List`, never `null`

    - #### getList

          List<String> getList(String name,
                               String delimiter)

      Returns a `List` of `String`s which is parsed from the value of the `Property` with the given name (if present).
      Parameters:
        `name` - the name of the `Property`
        `delimiter` - the delimiter to split the value by
      Returns:
        `List` of `String`s which is parsed from the value of the `Property` with the given name (if present)

    - #### getString

          String getString(String name)

      Returns the string-value of the given `Property`.
      Parameters:
        `name` - the name of the `Property`
      Returns:
        the string-value of the given `Property`, or `null` if no such property exists.

    - #### getString

          String getString(String name,
                           String defaultValue)

      Returns the string-value of the given `Property` (if existing), or the default-value.
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        the string-value of the given `Property` (if existing), or the default-value

    - #### getBoolean

          Boolean getBoolean(String name)

      Returns a `Boolean` parsed from the given `Property` (if existing).
      Parameters:
        `name` - the name of the `Property`
      Returns:
        a `Boolean`, or `null` if no such `Property` exists.

    - #### getBoolean

          Boolean getBoolean(String name,
                             Boolean defaultValue)

      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        a `Boolean`, or the default-value if no such `Property` exists.

    - #### getInteger

          Integer getInteger(String name)

      Returns an `Integer` parsed from the given `Property` (if existing).
      Parameters:
        `name` - the name of the `Property`
      Returns:
        an `Integer`, or `null` if no such `Property` exists.

    - #### getInteger

          Integer getInteger(String name,
                             Integer defaultValue)

      Returns an `Integer` parsed from the given `Property` (if existing), or the default-value.
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        an `Integer`, or the default-value if no such `Property` exists.

    - #### getFloat

          Float getFloat(String name)

      Returns an `Float` parsed from the given `Property` (if existing).
      Parameters:
        `name` - the name of the `Property`
      Returns:
        an `Float`, or `null` if no such `Property` exists.

    - #### getFloat

          Float getFloat(String name,
                         Float defaultValue)

      Returns a `Float` parsed from the given `Property` (if existing), or the default-value.
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        an `Float`, or the default-value if no such `Property` exists.

    - #### getDouble

          Double getDouble(String name)

      Returns an `Double` parsed from the given `Property` (if existing).
      Parameters:
        `name` - the name of the `Property`
      Returns:
        an `Double`, or `null` if no such `Property` exists.

    - #### getDouble

          Double getDouble(String name,
                           Double defaultValue)

      Returns a `Double` parsed from the given `Property` (if existing), or the default-value.
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        a `Double`, or the default-value if no such `Property` exists.

    - #### getClob

          String getClob(String name)

      Returns the string-value of the given `Property`.
      Parameters:
        `name` - the name of the `Property`
      Returns:
        the string-value of the given `Property`, or `null` if no such `Property` exists.

    - #### getClob

          String getClob(String name,
                         String defaultValue)

      Returns the string-value of the given `Property` (if existing), or the default-value.
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        the string-value of the given `Property` (if existing), or the default-value

    - #### getBlob

          byte[] getBlob(String name)

      Returns the byte-value of the given `Property`.
      Parameters:
        `name` - the name of the `Property`
      Returns:
        the byte-value of the given `Property`, or `null` if no such `Property` exists.

    - #### getPropertyNames

          Set<String> getPropertyNames()

      Returns all `Property` names.
      Returns:
        all `Property` names

    - #### propertyExists

          boolean propertyExists(String name)

      Checks whether the `Property` with the given name exists.
      Parameters:
        `name` - the name of the `Property`
      Returns:
        `true` if the `Property` exists, `false` otherwise

    - #### getPlainProperties

          Properties getPlainProperties()

      Takes this `Properties` and transforms it into some (plain, old, uncool) `Properties`.
      Returns:
        some `Properties`

    - #### getProperties

          Properties getProperties(String name)

      Returns some `Properties` parsed from the given `Property` (if existing).
      Parameters:
        `name` - the name of the `Property`
      Returns:
        some `Properties`, or `null` if no such `Property` exists.

    - #### getDescriptionFor

          String getDescriptionFor(String name)

      Returns the description for the `Property` with the given name, if any
      Parameters:
        `name` - the name of the property
      Returns:
        the description, if any

    - #### getObject

          default Object getObject(String name)

      Returns the object representation of the `Property` according to it's `Property.Type`:
      - an `Integer` (for type `Property.Type.INT`)
      - a `Double` (for type `Property.Type.DECIMAL`)
      - a `Boolean` (for type `Property.Type.BOOLEAN`)
      - a `String` (for types `Property.Type.TEXT`, `Property.Type.PASSWORD` and `Property.Type.MULTILINE`)
      Parameters:
        `name` - the name of the property
      Returns:
        the object representation

Copyright © 2011–2023 aiticon GmbH. All rights reserved.