org.bsf.listOfValues.util
Class LovUtil
java.lang.Object
org.bsf.listOfValues.util.LovUtil
- public class LovUtil
- extends java.lang.Object
This utility class provides some utility methods that can be applied to
the LOV (transformation of lov in a string and reverse...).
- See Also:
LovValue
,
LovServiceBean
Method Summary |
static java.lang.String |
lovToString(java.util.List p_lov,
java.util.List p_metaDatas)
Used to transform a Lov into a String. |
static java.lang.String |
replaceToken(java.lang.String p_sourceString,
java.lang.String p_stringToUse)
Replaces, in the given source string, the '#' token by the given string
to use. |
static java.util.List |
stringToSortedLov(java.lang.String p_stringLov)
Makes a LOV of a given String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATA_SEPARATOR
private static final java.lang.String DATA_SEPARATOR
- See Also:
- Constant Field Values
LINE_SEPARATOR
private static final java.lang.String LINE_SEPARATOR
- See Also:
- Constant Field Values
TOKEN_TO_REPLACE
private static final java.lang.String TOKEN_TO_REPLACE
- See Also:
- Constant Field Values
LovUtil
public LovUtil()
lovToString
public static java.lang.String lovToString(java.util.List p_lov,
java.util.List p_metaDatas)
- Used to transform a Lov into a String.
- Parameters:
p_lov
- The LOV per itself.p_metaDatas
- The metadata for the given LOV.
- Throws:
java.lang.IllegalArgumentException
- if any parameter is null.- See Also:
stringToSortedLov(java.lang.String)
stringToSortedLov
public static java.util.List stringToSortedLov(java.lang.String p_stringLov)
- Makes a LOV of a given String.
- Parameters:
p_stringLov
- The String to build the LOV from.
- Returns:
- The LOV corresponding to the given String.
- Throws:
java.lang.IllegalArgumentException
- if the given String is null.- See Also:
lovToString(java.util.List, java.util.List)
replaceToken
public static java.lang.String replaceToken(java.lang.String p_sourceString,
java.lang.String p_stringToUse)
- Replaces, in the given source string, the '#' token by the given string
to use. The TOKEN_TO_REPLACE should only found once in each source string
(you have to pay attention, all tokens will be replaced by the same
string...).
- Parameters:
p_sourceString
- The String to use as the source.p_stringToUse
- The String to use as replacement for the '#' token(s)
- Returns:
- A string taken from the source string with the given replacment
string in place of the '#' token(s). Null if the source string is null.