Class DefaultPropertyResolverRegistry

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean getBoolean​(java.lang.String key)
      Returns property's value as boolean.
      boolean getBoolean​(java.lang.String key, boolean defaultValue)
      Returns property's value as boolean.
      java.lang.Integer getCacheTimeoutInSeconds()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.5 - this method will be removed after removal of setProperties(Map).
      double getDouble​(java.lang.String key)
      Returns property's value as double.
      int getInteger​(java.lang.String key)
      Returns property's value as integer.
      protected java.lang.String getLocalPropertyFile()  
      protected java.lang.String getProjectPropertyFile()  
      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.
      void initProperties()  
      protected void initProperties​(java.lang.String filename)  
      void setCacheTimeoutInSeconds​(java.lang.Integer cacheTimeoutInSeconds)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.5 - this method will be removed after removal of setProperties(Map).
      void setLocalPropertyFile​(java.lang.String localPropertyFile)  
      void setProjectPropertyFile​(java.lang.String projectPropertyFile)  
      void setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.5 - properties are loaded from project and local files and should not be set manually
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultPropertyResolverRegistry

        public DefaultPropertyResolverRegistry()
    • Method Detail

      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Description copied from interface: CockpitProperties
        Returns property's value.
        Specified by:
        getProperty in interface CockpitProperties
        Parameters:
        key - key of the property to return.
        Returns:
        String value of the property stored under the key.
      • getBoolean

        public boolean getBoolean​(java.lang.String key)
        Description copied from interface: CockpitProperties
        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).
        Specified by:
        getBoolean in interface CockpitProperties
        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

        public boolean getBoolean​(java.lang.String key,
                                  boolean defaultValue)
        Description copied from interface: CockpitProperties
        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).
        Specified by:
        getBoolean in interface CockpitProperties
        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

        public int getInteger​(java.lang.String key)
        Description copied from interface: CockpitProperties
        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).
        Specified by:
        getInteger in interface CockpitProperties
        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

        public double getDouble​(java.lang.String key)
        Description copied from interface: CockpitProperties
        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).
        Specified by:
        getDouble in interface CockpitProperties
        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

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Description copied from interface: CockpitProperties
        Returns all stored properties. This method can be resource-consuming and should be use only when user needs access to all properties.
        Specified by:
        getProperties in interface CockpitProperties
        Returns:
        the map with all properties.
      • setProperties

        @Deprecated(since="6.5",
                    forRemoval=true)
        public void setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.5 - properties are loaded from project and local files and should not be set manually
      • initProperties

        public void initProperties()
      • initProperties

        protected void initProperties​(java.lang.String filename)
      • getLocalPropertyFile

        protected java.lang.String getLocalPropertyFile()
      • setLocalPropertyFile

        public void setLocalPropertyFile​(java.lang.String localPropertyFile)
      • getProjectPropertyFile

        protected java.lang.String getProjectPropertyFile()
      • setProjectPropertyFile

        public void setProjectPropertyFile​(java.lang.String projectPropertyFile)
      • getCacheTimeoutInSeconds

        @Deprecated(since="6.5",
                    forRemoval=true)
        public java.lang.Integer getCacheTimeoutInSeconds()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.5 - this method will be removed after removal of setProperties(Map).
      • setCacheTimeoutInSeconds

        @Deprecated(since="6.5",
                    forRemoval=true)
        public void setCacheTimeoutInSeconds​(java.lang.Integer cacheTimeoutInSeconds)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.5 - this method will be removed after removal of setProperties(Map).