Interface CockpitProperties

  • All Known Implementing Classes:
    DefaultPropertyResolverRegistry

    public interface CockpitProperties
    Provides methods to read cockpit configuration properties.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean getBoolean​(java.lang.String key)
      Returns property's value as boolean.
      default boolean getBoolean​(java.lang.String key, boolean defaultValue)
      Returns property's value as boolean.
      double getDouble​(java.lang.String key)
      Returns property's value as double.
      int getInteger​(java.lang.String key)
      Returns property's value as integer.
      java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Returns all stored properties.
      java.lang.String getProperty​(java.lang.String key)
      Returns property's value.
    • Method Detail

      • getProperty

        java.lang.String getProperty​(java.lang.String key)
        Returns property's value.
        Parameters:
        key - key of the property to return.
        Returns:
        String value of the property stored under the key.
      • getBoolean

        boolean getBoolean​(java.lang.String key)
        Returns property's value as boolean. If the type of the value is known it is recommended to use this dedicated method rather than parsing the value inline while caching may be enabled (implementation dependent).
        Parameters:
        key - key of the property to return.
        Returns:
        boolean value stored under the given key, default to null if the value is not provided or cannot be interpreted.
      • getBoolean

        default boolean getBoolean​(java.lang.String key,
                                   boolean defaultValue)
        Returns property's value as boolean. If the type of the value is known it is recommended to use this dedicated method rather than parsing the value inline while caching may be enabled (implementation dependent).
        Parameters:
        key - key of the property to return.
        defaultValue - value to be returned if properties contains value for provided key
        Returns:
        boolean value stored under the given key or {code}defaultValue{code} if the value is not provided or cannot be interpreted.
      • getInteger

        int getInteger​(java.lang.String key)
        Returns property's value as integer. If the type of the value is known it is recommended to use this dedicated method rather than parsing the value inline while caching may be enabled (implementation dependent).
        Parameters:
        key - key of the property to return.
        Returns:
        boolean value stored under the given key, default to null if the value is not provided or cannot be interpreted.
      • getDouble

        double getDouble​(java.lang.String key)
        Returns property's value as double. If the type of the value is known it is recommended to use this dedicated method rather than parsing the value inline while caching may be enabled (implementation dependent).
        Parameters:
        key - key of the property to return.
        Returns:
        boolean value stored under the given key, default to null if the value is not provided or cannot be interpreted.
      • getProperties

        java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Returns all stored properties. This method can be resource-consuming and should be use only when user needs access to all properties.
        Returns:
        the map with all properties.