Package fr.paris.lutece.util.env
Class EnvUtil
- java.lang.Object
-
- fr.paris.lutece.util.env.EnvUtil
-
public final class EnvUtil extends java.lang.ObjectEnvUtil
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPREFIX_ENV
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringevaluate(java.lang.String strSource)Evaluate a string that may contain a reference to an environement variable enclosed by ${...}static java.lang.Stringevaluate(java.lang.String strSource, java.lang.String strEnvPrefix)Evaluate a string that may contain a reference to an environement variable enclosed by ${...}.
-
-
-
Field Detail
-
PREFIX_ENV
public static final java.lang.String PREFIX_ENV
- See Also:
- Constant Field Values
-
-
Method Detail
-
evaluate
public static java.lang.String evaluate(java.lang.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 java.lang.String evaluate(java.lang.String strSource, java.lang.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.
-
-