public class Deserializer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXO_CONTAINER_PROP_NAME
The name of the variable to use to get the current container name as a suffix
if the current container is a portal container, the value of the variable
will be "-${portal-container-name}", it will be an empty String otherwise
|
static String |
PORTAL_CONTAINER_VARIABLE_PREFIX
The prefix of the name of all the variables tied to the current portal container
|
| Constructor and Description |
|---|
Deserializer() |
| Modifier and Type | Method and Description |
|---|---|
static String |
cleanString(String s)
This methods will remove useless characters from the given
String and return the result |
static Boolean |
resolveBoolean(String s)
Resolve a boolean value with the following algorithm:
Resolve any system property in the input value
If the input value is null then the returned value is null
If the value is equals to the string litteral true ignoring the case then true is returned
If the value is equals to the string litteral false ignoring the case then false is returned
Otherwise an
IllegalArgumentException is thrown
|
static Double |
resolveDouble(String s)
Resolve a double value with the following algorithm:
Resolve any system property in the input value
Attempt to parse the value using the
Double.parseDouble(String) method and returns its value.
If the parsing fails then throws an IllegalArgumentException
|
static Integer |
resolveInteger(String s)
Resolve an integer value with the following algorithm:
Resolve any system property in the input value
Attempt to parse the value using the
Integer.parseInt(String) method and returns its value.
If the parsing fails then throws an IllegalArgumentException
|
static Long |
resolveLong(String s)
Resolve a long value with the following algorithm:
Resolve any system property in the input value
Attempt to parse the value using the
Long.parseLong(String) method and returns its value.
If the parsing fails then throws an IllegalArgumentException
|
static String |
resolveNClean(String s)
This method will first resolves the variables then it will clean the results
|
static String |
resolveString(String s)
Resolve a string value.
|
static String |
resolveVariables(String input)
Resolve the variables of type ${my.var} for the current context which is composed
of the system properties and the portal container settings
|
static String |
resolveVariables(String input,
Map<String,Object> props)
Resolve the variables of type ${my.var} for the current context which is composed
of the system properties, the portal container settings and the given settings
|
public static final String EXO_CONTAINER_PROP_NAME
public static final String PORTAL_CONTAINER_VARIABLE_PREFIX
public static String resolveString(String s)
s - the input valuepublic static Boolean resolveBoolean(String s) throws IllegalArgumentException
IllegalArgumentException is throwns - the input valueIllegalArgumentException - if the argument is not correctpublic static Integer resolveInteger(String s) throws IllegalArgumentException
Integer.parseInt(String) method and returns its value.IllegalArgumentExceptions - the input valueIllegalArgumentException - if the argument is not correctpublic static Long resolveLong(String s) throws IllegalArgumentException
Long.parseLong(String) method and returns its value.IllegalArgumentExceptions - the input valueIllegalArgumentException - if the argument is not correctpublic static Double resolveDouble(String s) throws IllegalArgumentException
Double.parseDouble(String) method and returns its value.IllegalArgumentExceptions - the input valueIllegalArgumentException - if the argument is not correctpublic static String resolveVariables(String input)
input - the input valuepublic static String resolveVariables(String input, Map<String,Object> props)
input - the input valueprops - a set of parameters to add for the variable resolutionpublic static String cleanString(String s)
String and return the results - the input valuenull if the input value is null, s.trim()
otherwiseCopyright © 2021 eXo Platform SAS. All Rights Reserved.