Class PropertyConfiguration


  • public class PropertyConfiguration
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyConfiguration​(java.lang.String classpathName)
      loads a properties file from classpath
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.String propertyKey)  
      boolean getBooleanProperty​(java.lang.String propertyKey)  
      <T extends java.lang.Enum<T>>
      T
      getEnumProperty​(java.lang.String propertyKey, java.lang.Class<T> enumType)
      assembles mandatory enum property from properties bag
      java.lang.String getStringProperty​(java.lang.String propertyKey)
      gets mandatory String property from properties bag
      • Methods inherited from class java.lang.Object

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

      • PropertyConfiguration

        public PropertyConfiguration​(java.lang.String classpathName)
        loads a properties file from classpath
        Parameters:
        classpathName - classpath resource name, ex. "resources/config.properties"
    • Method Detail

      • getEnumProperty

        public <T extends java.lang.Enum<T>> T getEnumProperty​(java.lang.String propertyKey,
                                                               java.lang.Class<T> enumType)
        assembles mandatory enum property from properties bag
        Throws:
        JaversException - UNDEFINED_PROPERTY
        JaversException - MALFORMED_PROPERTY
      • contains

        public boolean contains​(java.lang.String propertyKey)
      • getStringProperty

        public java.lang.String getStringProperty​(java.lang.String propertyKey)
        gets mandatory String property from properties bag
        Throws:
        JaversException - UNDEFINED_PROPERTY
      • getBooleanProperty

        public boolean getBooleanProperty​(java.lang.String propertyKey)
        Throws:
        JaversException - UNDEFINED_PROPERTY