Interface PropertyMap

  • All Superinterfaces:
    Map<String,​Object>
    All Known Implementing Classes:
    MutablePropertyMap

    public interface PropertyMap
    extends Map<String,​Object>
    Extension of a String -> Object map which provides some useful methods for retrieving values of specific types.
    • Method Detail

      • getProperty

        String getProperty​(String key)
        Gets the String property for the given key. This method may be used to retrieve properties of type "string" or "password".
        Parameters:
        key - key of the desired property
        Returns:
        String property value or null if not found.
      • getProperty

        String getProperty​(String key,
                           String defaultValue)
        Gets the String property for the given key, returning the defaultValue if the located property value is blank (null or all characters are whitespace). This method may be used to retrieve properties of type "string" or "password".
        Parameters:
        key - key of the desired property
        defaultValue - value to return if property value is blank
        Returns:
        String property value or defaultValue if not found.
      • getBooleanProperty

        Boolean getBooleanProperty​(String key)
        Gets the Boolean property for the given key. This method may be used to retrieve properties of type "boolean".
        Parameters:
        key - key of the desired property
        Returns:
        Boolean property value or null if not found.
      • getBooleanProperty

        Boolean getBooleanProperty​(String key,
                                   Boolean defaultValue)
        Gets the Boolean property for the given key, returning the defaultValue if the located property value null. This method may be used to retrieve properties of type "boolean".
        Parameters:
        key - key of the desired property
        defaultValue - value to return if property value is null
        Returns:
        Boolean property value or defaultValue if not found.
      • getLongProperty

        Long getLongProperty​(String key)
        Gets the Long property for the given key. This method may be used to retrieve properties of type "integer".
        Parameters:
        key - key of the desired property
        Returns:
        Long property value or null if not found.
      • getLongProperty

        Long getLongProperty​(String key,
                             Long defaultValue)
        Gets the Long property for the given key, returning the defaultValue if the located property value null. This method may be used to retrieve properties of type "integer".
        Parameters:
        key - key of the desired property
        defaultValue - value to return if property value is null
        Returns:
        Long property value or defaultValue if not found.
      • getPrivateKeyStoreProperty

        PrivateKeyStore getPrivateKeyStoreProperty​(String key)
        Gets the KeyStore property for the given key. This method may be used to retrieve properties of type PrivateKeyStore. The PrivateKeyStore contains a java KeyStore containing a single private key and the keystore password.
        Parameters:
        key - key of the desired property
        Returns:
        PrivateKeyStore property value or null if not found.
      • getPublicKeyStoreProperty

        PublicKeyStore getPublicKeyStoreProperty​(String key)
        Gets the KeyStore property for the given key. This method may be used to retrieve properties of type PublicKeyStore. The PublicKeyStore contains a java KeyStore containing a single public key.
        Parameters:
        key - key of the desired property
        Returns:
        PublicKeyStore property value or null if not found.
      • getOAuth2Context

        OAuth2Context getOAuth2Context​(String key)
        Gets the OAuth2Context property for the given key. This method may be used to retrieve properties of type OAuth2Context. The OAuth2Context contains OAuth 2 configuration.
        Parameters:
        key - key of the desired property
        Returns:
        OAuth2Context property value or null if not found.
      • getCustomProperties

        Map<String,​String> getCustomProperties​(String key)
        Gets the key/value pairs as a map for custom property type fields. This method may be used to retrieve the keys and values for properties of type "customproperties". If the property is not found for a given key an empty map will be returned.
        Parameters:
        key - key of the desired property
        Returns:
        An immutable Map where the map entry key is a custom property key as a string and the map entry value is a string representing the value, decrypted when necessary.
        Throws:
        IllegalArgumentException - if the key provided is not a "customproperties" field type.