|
eXo Kernel :: Container 2.4.13-GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.container.xml.Deserializer
public class Deserializer
A deserializer used by JIBX that resolve system properties to allow runtime configuration.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
Deserializer()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EXO_CONTAINER_PROP_NAME
public static final String PORTAL_CONTAINER_VARIABLE_PREFIX
| Constructor Detail |
|---|
public Deserializer()
| Method Detail |
|---|
public static String resolveString(String s)
s - the input value
public static Boolean resolveBoolean(String s)
throws IllegalArgumentException
IllegalArgumentException is thrown
s - the input value
IllegalArgumentException - if the argument is not correct
public static Integer resolveInteger(String s)
throws IllegalArgumentException
Integer.parseInt(String) method and returns its value.IllegalArgumentException
s - the input value
IllegalArgumentException - if the argument is not correct
public static Long resolveLong(String s)
throws IllegalArgumentException
Long.parseLong(String) method and returns its value.IllegalArgumentException
s - the input value
IllegalArgumentException - if the argument is not correct
public static Double resolveDouble(String s)
throws IllegalArgumentException
Double.parseDouble(String) method and returns its value.IllegalArgumentException
s - the input value
IllegalArgumentException - if the argument is not correctpublic static String resolveVariables(String input)
input - the input value
public static String resolveVariables(String input,
Map<String,Object> props)
input - the input valueprops - a set of parameters to add for the variable resolution
public static String cleanString(String s)
String and return the result
s - the input value
null if the input value is null, s.trim()
otherwisepublic static String resolveNClean(String s)
s - the input value
|
eXo Kernel :: Container 2.4.13-GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||