Class ApplicationProperties


  • public class ApplicationProperties
    extends java.lang.Object
    A singleton helper implementation that loads a properties file and exposes some methods to retrieve type casted values from the file. This class will load the file specified in the 'application.configurationFile' property. When this property isn't found, it will try to load an 'application.properties' file in the root of the classpath. Example: -Dapplication.configurationFile=/home/user/custom.properties This will try to find the file '/home/user/custom.properties' on the filesystem.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean get​(java.lang.String key, boolean fallback)  
      int get​(java.lang.String key, int fallback)  
      java.lang.String get​(java.lang.String key, java.lang.String fallback)  
      static ApplicationProperties getInstance()  
      • Methods inherited from class java.lang.Object

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

      • get

        public java.lang.String get​(java.lang.String key,
                                    java.lang.String fallback)
      • get

        public boolean get​(java.lang.String key,
                           boolean fallback)
      • get

        public int get​(java.lang.String key,
                       int fallback)