Package org.jpos.core

Class Environment

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.Map<java.lang.String,​java.lang.String> notMap  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump​(java.io.PrintStream p, java.lang.String indent)  
      static void flat​(java.util.Properties properties, java.lang.String prefix, java.util.Map<java.lang.String,​java.lang.Object> c, boolean dereference)  
      static java.lang.String get​(java.lang.String p)  
      static java.lang.String get​(java.lang.String p, java.lang.String def)  
      java.lang.String getEnvDir()  
      static Environment getEnvironment()  
      java.lang.String getErrorString()  
      java.lang.String getName()  
      java.lang.String getProperty​(java.lang.String s)
      If property name has the pattern ${propname}, this method will Attempt to get it from an operating system environment variable called 'propname' If not present, it will try to pick it from the Java system.property If not present either, it will try the target environment (either .yml or .cfg Otherwise it returns null The special pattern $env{propname} would just try to pick it from the OS environment.
      java.lang.String getProperty​(java.lang.String p, java.lang.String def)  
      static Environment reload()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • notMap

        protected static java.util.Map<java.lang.String,​java.lang.String> notMap
    • Method Detail

      • getName

        public java.lang.String getName()
      • getEnvDir

        public java.lang.String getEnvDir()
      • reload

        public static Environment reload()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • get

        public static java.lang.String get​(java.lang.String p)
      • get

        public static java.lang.String get​(java.lang.String p,
                                           java.lang.String def)
      • getProperty

        public java.lang.String getProperty​(java.lang.String p,
                                            java.lang.String def)
      • getProperty

        public java.lang.String getProperty​(java.lang.String s)
        If property name has the pattern ${propname}, this method will
        • Attempt to get it from an operating system environment variable called 'propname'
        • If not present, it will try to pick it from the Java system.property
        • If not present either, it will try the target environment (either .yml or .cfg
        • Otherwise it returns null
        The special pattern $env{propname} would just try to pick it from the OS environment. $sys{propname} will just try to get it from a System.property and $verb{propname} will return a verbatim copy of the value.
        Parameters:
        s - property name
        Returns:
        property value
      • flat

        public static void flat​(java.util.Properties properties,
                                java.lang.String prefix,
                                java.util.Map<java.lang.String,​java.lang.Object> c,
                                boolean dereference)
      • dump

        public void dump​(java.io.PrintStream p,
                         java.lang.String indent)
        Specified by:
        dump in interface Loggeable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object