Package fr.paris.lutece.util.env
Class EnvUtil
- java.lang.Object
-
- fr.paris.lutece.util.env.EnvUtil
-
public final class EnvUtil extends Object
EnvUtil
-
-
Field Summary
Fields Modifier and Type Field Description static StringPREFIX_ENV
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringevaluate(String strSource)Evaluate a string that may contain a reference to an environement variable enclosed by ${...}static Stringevaluate(String strSource, String strEnvPrefix)Evaluate a string that may contain a reference to an environement variable enclosed by ${...}.
-
-
-
Field Detail
-
PREFIX_ENV
public static final String PREFIX_ENV
- See Also:
- Constant Field Values
-
-
Method Detail
-
evaluate
public static String evaluate(String strSource)
Evaluate a string that may contain a reference to an environement variable enclosed by ${...}- Parameters:
strSource- The source string- Returns:
- The source string or the env variable's value if found.
-
evaluate
public static String evaluate(String strSource, String strEnvPrefix)
Evaluate a string that may contain a reference to an environement variable enclosed by ${...}. If the environement variable has a suffix _FILE the evaluation will take the content of the file as value.- Parameters:
strSource- The source stringstrEnvPrefix- A prefix of the environment- Returns:
- The source string or the env variable's value if found.
-
-