org.appng.core.service

## Class PlatformProperties

- java.lang.Object
- - org.appng.core.service.PlatformProperties

- All Implemented Interfaces:
    Properties

      public class PlatformProperties
      extends Object
      implements Properties

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PlatformProperties` | `get(Environment env)`
    `static PlatformProperties` | `get(Properties platformConfig)`
    `File` | `getApplicationDir()`
    `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)`
    `InputStream` | `getCacheConfig()`
    `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.
    `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.
    `File` | `getRepositoryRootFolder()`
    `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.
    `File` | `getUploadDir()`
    `boolean` | `propertyExists(String name)` Checks whether the `Property` with the given name exists.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### get

          public static PlatformProperties get(Environment env)

    - #### get

          public static PlatformProperties get(Properties platformConfig)

    - #### getList

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

      Description copied from interface: `Properties`
      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.
      Specified by:
        `getList` in interface `Properties`
      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

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

      Description copied from interface: `Properties`
      Returns a `List` of `String`s which is parsed from the value of the `Property` with the given name (if present).
      Specified by:
        `getList` in interface `Properties`
      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

          public String getString(String name)

      Description copied from interface: `Properties`
      Returns the string-value of the given `Property`.
      Specified by:
        `getString` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        the string-value of the given `Property`, or `null` if no such property exists.

    - #### getString

          public String getString(String name,
                                  String defaultValue)

      Description copied from interface: `Properties`
      Returns the string-value of the given `Property` (if existing), or the default-value.
      Specified by:
        `getString` in interface `Properties`
      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

          public Boolean getBoolean(String name)

      Description copied from interface: `Properties`
      Returns a `Boolean` parsed from the given `Property` (if existing).
      Specified by:
        `getBoolean` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        a `Boolean`, or `null` if no such `Property` exists.

    - #### getBoolean

          public Boolean getBoolean(String name,
                                    Boolean defaultValue)

      Specified by:
        `getBoolean` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        a `Boolean`, or the default-value if no such `Property` exists.

    - #### getInteger

          public Integer getInteger(String name)

      Description copied from interface: `Properties`
      Returns an `Integer` parsed from the given `Property` (if existing).
      Specified by:
        `getInteger` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        an `Integer`, or `null` if no such `Property` exists.

    - #### getInteger

          public Integer getInteger(String name,
                                    Integer defaultValue)

      Description copied from interface: `Properties`
      Returns an `Integer` parsed from the given `Property` (if existing), or the default-value.
      Specified by:
        `getInteger` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        an `Integer`, or the default-value if no such `Property` exists.

    - #### getFloat

          public Float getFloat(String name)

      Description copied from interface: `Properties`
      Returns an `Float` parsed from the given `Property` (if existing).
      Specified by:
        `getFloat` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        an `Float`, or `null` if no such `Property` exists.

    - #### getFloat

          public Float getFloat(String name,
                                Float defaultValue)

      Description copied from interface: `Properties`
      Returns a `Float` parsed from the given `Property` (if existing), or the default-value.
      Specified by:
        `getFloat` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        an `Float`, or the default-value if no such `Property` exists.

    - #### getDouble

          public Double getDouble(String name)

      Description copied from interface: `Properties`
      Returns an `Double` parsed from the given `Property` (if existing).
      Specified by:
        `getDouble` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        an `Double`, or `null` if no such `Property` exists.

    - #### getDouble

          public Double getDouble(String name,
                                  Double defaultValue)

      Description copied from interface: `Properties`
      Returns a `Double` parsed from the given `Property` (if existing), or the default-value.
      Specified by:
        `getDouble` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
        `defaultValue` - the default-value
      Returns:
        a `Double`, or the default-value if no such `Property` exists.

    - #### getClob

          public String getClob(String name)

      Description copied from interface: `Properties`
      Returns the string-value of the given `Property`.
      Specified by:
        `getClob` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        the string-value of the given `Property`, or `null` if no such `Property` exists.

    - #### getClob

          public String getClob(String name,
                                String defaultValue)

      Description copied from interface: `Properties`
      Returns the string-value of the given `Property` (if existing), or the default-value.
      Specified by:
        `getClob` in interface `Properties`
      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

          public byte[] getBlob(String name)

      Description copied from interface: `Properties`
      Returns the byte-value of the given `Property`.
      Specified by:
        `getBlob` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        the byte-value of the given `Property`, or `null` if no such `Property` exists.

    - #### getPropertyNames

          public Set<String> getPropertyNames()

      Description copied from interface: `Properties`
      Returns all `Property` names.
      Specified by:
        `getPropertyNames` in interface `Properties`
      Returns:
        all `Property` names

    - #### propertyExists

          public boolean propertyExists(String name)

      Description copied from interface: `Properties`
      Checks whether the `Property` with the given name exists.
      Specified by:
        `propertyExists` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        `true` if the `Property` exists, `false` otherwise

    - #### getObject

          public Object getObject(String name)

      Description copied from interface: `Properties`
      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`)
      Specified by:
        `getObject` in interface `Properties`
      Parameters:
        `name` - the name of the property
      Returns:
        the object representation

    - #### getPlainProperties

          public Properties getPlainProperties()

      Description copied from interface: `Properties`
      Takes this `Properties` and transforms it into some (plain, old, uncool) `Properties`.
      Specified by:
        `getPlainProperties` in interface `Properties`
      Returns:
        some `Properties`

    - #### getProperties

          public Properties getProperties(String name)

      Description copied from interface: `Properties`
      Returns some `Properties` parsed from the given `Property` (if existing).
      Specified by:
        `getProperties` in interface `Properties`
      Parameters:
        `name` - the name of the `Property`
      Returns:
        some `Properties`, or `null` if no such `Property` exists.

    - #### getDescriptionFor

          public String getDescriptionFor(String name)

      Description copied from interface: `Properties`
      Returns the description for the `Property` with the given name, if any
      Specified by:
        `getDescriptionFor` in interface `Properties`
      Parameters:
        `name` - the name of the property
      Returns:
        the description, if any

    - #### getCacheConfig

          public InputStream getCacheConfig()
                                     throws IOException

      Throws:
        `IOException`

    - #### getUploadDir

          public File getUploadDir()

    - #### getApplicationDir

          public File getApplicationDir()

    - #### getRepositoryRootFolder

          public File getRepositoryRootFolder()

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