public static String getSettingForApp ( App app , String key , String defaultValue ) { if ( app != null ) { Map < String , Object > settings = app . getSettings ( ) ; if ( settings . containsKey ( key ) ) { return String . valueOf ( settings . getOrDefault ( key , defaultValue ) ) ; } else if ( app . isRootApp ( ) ) { return Config . getConfigParam ( key , defaultValue ) ; } } return defaultValue ; }
Returns the value of the app setting read from from app . settings or from the config file if app is root .