|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsc.utils.FrenchFilters
public final class FrenchFilters
Manage all common string manipulation for french
| Field Summary | |
|---|---|
static String[] |
BAD_SEPARATOR_FOR_EMAIL
Bad word separators chars for emails |
static String[] |
BAD_SEPARATOR_FOR_PHONE
Chars to replace in telephone numbers |
static String[] |
GOOD_SEPARATOR_FOR_EMAIL
Good words separators for emails |
static String[] |
GOOD_SEPARATOR_FOR_PHONE
Chars of remplactement for telephone numbers |
| Constructor Summary | |
|---|---|
FrenchFilters()
|
|
| Method Summary | |
|---|---|
static boolean |
containsInTab(String[] array,
String name)
Deprecated. because the method is in Java |
static String |
filterAlpha(String value)
Filter all alphanumeric characters. |
static String |
filterDate(String value,
String format)
Converts Date into timestamp string. |
static String |
filterFirstName(String name)
Deprecated. Use filterGivenName(String) instead. |
static String |
filterGivenName(String oldValue)
Filter a string to match a givenName |
static String |
filterLastName(String name)
Filter a string to match a last name |
static String |
filterLengthString(String sn,
int length)
|
static String |
filterName(String aString)
Remove trailing and starting spaces and replace remaining spaces and dots by dashes |
static String |
filterNomPatronymique(String name)
Deprecated. |
static String |
filterNumber(String value)
Filters numerical identifier. |
static String |
filterPhone(String phone2parse)
Transform a telephone number in the international display |
static String |
filterPhones(String phone2parse)
Deprecated. |
static String |
filterPrenomEtatCivil(String name)
Deprecated. Use filterGivenName(String) instead. |
static String |
filterRegexp(String src,
String[] srcRegexp,
String[] destRegexp)
Filter the string src by removing the chars in srcRegexp by the ones in destRegexp |
static String |
filterShortUid(String sn)
Returns the uid on 8 chars and well formatted |
static String |
filterSn(String sn)
Format a sn |
static String |
filterString(String aString)
Deprecated. because it is a simple wrapper for a Java method |
static String |
filterStringRegExp(String value,
String regexp)
|
static String |
filterUid(String sn)
Returns the uid on 14 chars and well formatted |
static String |
generatePwd()
Generate a 8 chars long password |
static String |
removeBadChars(String src)
Normalize accents and cedillas |
static String |
toUpperCaseAllBeginningNames(String string)
Uppercased all the words of a string |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String[] BAD_SEPARATOR_FOR_EMAIL
public static final String[] GOOD_SEPARATOR_FOR_EMAIL
public static final String[] BAD_SEPARATOR_FOR_PHONE
public static final String[] GOOD_SEPARATOR_FOR_PHONE
| Constructor Detail |
|---|
public FrenchFilters()
| Method Detail |
|---|
@Deprecated
public static boolean containsInTab(String[] array,
String name)
array - the arrayname - the string
public static String removeBadChars(String src)
src - Source string
public static String filterRegexp(String src,
String[] srcRegexp,
String[] destRegexp)
src - srcRegexp - destRegexp -
public static String filterPhone(String phone2parse)
phone2parse -
@Deprecated public static String filterPhones(String phone2parse)
public static String toUpperCaseAllBeginningNames(String string)
string -
public static String filterSn(String sn)
throws CharacterUnacceptedException
sn -
CharacterUnacceptedException - thrown if an rejected character
is encountered during analysis
public static String filterLengthString(String sn,
int length)
public static String filterUid(String sn)
sn - the last name to filter
public static String filterShortUid(String sn)
sn - the last name to filter
public static String filterStringRegExp(String value,
String regexp)
throws CharacterUnacceptedException
CharacterUnacceptedException
public static String filterLastName(String name)
throws CharacterUnacceptedException
name - the last name to filter
CharacterUnacceptedException - thrown if an rejected character
is encountered during analysis
@Deprecated
public static String filterNomPatronymique(String name)
throws CharacterUnacceptedException
CharacterUnacceptedException
public static String filterFirstName(String name)
throws CharacterUnacceptedException
filterGivenName(String) instead.
name - the first name to filter
CharacterUnacceptedException - thrown if an rejected character
is encountered during analysis
@Deprecated
public static String filterPrenomEtatCivil(String name)
throws CharacterUnacceptedException
filterGivenName(String) instead.
name - the first name to filter
CharacterUnacceptedException - thrown if an rejected character
is encountered during analysis
public static String filterGivenName(String oldValue)
throws CharacterUnacceptedException
oldValue - the value to filter
CharacterUnacceptedException - thrown if an rejected character
is encountered during analysis
public static String filterAlpha(String value)
throws CharacterUnacceptedException
value - the original value
CharacterUnacceptedException - thrown if an rejected character
is encountered during analysispublic static String generatePwd()
public static String filterName(String aString)
aString - the string to filter
@Deprecated public static String filterString(String aString)
aString - the string to filter
public static String filterNumber(String value)
throws CharacterUnacceptedException
value - the string
CharacterUnacceptedException - launch if and only if the argument
is not a numerical identifier
public static String filterDate(String value,
String format)
throws CharacterUnacceptedException
value - A string representation fo a dateformat - The format of Date with representation used by
SimpleDateFormat
CharacterUnacceptedException - thrown if an rejected character
is encountered during analysis
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||