Class PropertiesWrapper

    • Method Detail

      • get

        public String get​(String key)
        Get a property with no default value.
      • get

        public String get​(String key,
                          String defaultValue)
        Get a property with a default value.

        This performs a search using the prefix and server name (if supplied) to search for the property value in order based on:

        
           prefix.serverName.key
           prefix.key
           key
         

      • getDouble

        public double getDouble​(String key,
                                double defaultValue)
        Return a double property value.
      • getInt

        public int getInt​(String key,
                          int defaultValue)
        Return an int property value.
      • getLong

        public long getLong​(String key,
                            long defaultValue)
        Return a long property value.
      • getBoolean

        public boolean getBoolean​(String key,
                                  boolean defaultValue)
        Return a boolean property value.
      • getEnum

        public <T extends Enum<T>> T getEnum​(Class<T> enumType,
                                             String key,
                                             T defaultValue)
        Return a Enum property value.
      • createInstance

        public <T> T createInstance​(Class<T> pluginType,
                                    String key,
                                    T instance)
        Return the instance to use (can be null) for the given plugin.
        Parameters:
        pluginType - the type of plugin
        key - properties key
        instance - existing instance
      • createInstance

        public <T> T createInstance​(Class<T> pluginType,
                                    String classname)
        Return the instance to use (can be null) for the given plugin.
        Parameters:
        pluginType - the type of plugin
        classname - the implementation class as per properties