private static void prepareMode ( Mode providedMode ) { final String applicationMode = System . getProperty ( Key . APPLICATION_MODE . toString ( ) ) ; if ( StringUtils . isNotBlank ( applicationMode ) ) { switch ( applicationMode . toLowerCase ( Locale . ENGLISH ) ) { case "dev" : mode = Mode . DEV ; break ; case "test" : mode = Mode . TEST ; break ; default : mode = Mode . PROD ; break ; } } else { mode = providedMode ; } }
Sets the mode the application is running in