|
Esri Geoportal Server 1.2.9
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.gpt.framework.util.Val
public class Val
Provides basic validation and conversion support.
Method Summary | |
---|---|
static boolean |
chkBool(String s,
boolean defaultVal)
Converts a string to a boolean value. |
static double |
chkDbl(String s,
double defaultVal)
Converts a string to a double value. |
static boolean |
chkEmail(String s)
Check a string to see if it matches an email address. |
static int |
chkInt(String s,
int defaultVal)
Converts a string to an int value. |
static long |
chkLong(String s,
long defaultVal)
Converts a string to a long value. |
static String |
chkStr(String s)
Check a string value. |
static String |
chkStr(String s,
int maxLength)
Check a string value and ensures that it does not exceed a maximum length. |
static String |
chkStr(String s,
String defaultVal)
Check a string value. |
static String |
chkUrl(String url)
Checks a string if it's a alid URL. |
static String |
escapeSingleQuotes(String s)
Escapes single and quotes within a string. |
static String |
escapeStrForJson(String text)
Escapes arbitrary text into a JSON escaped string. |
static String |
escapeStrForLDAPSearch(String text)
Escapes arbitrary text into a ldap escaped string. |
static String |
escapeXml(String s)
Escapes special xml characters within a string. |
static String |
escapeXmlForBrowser(String s)
Escapes special xml characters within a string. |
static boolean |
isUrl(String url)
Checks if URL is a valid URL. |
static String |
join(String[] valArr,
String delimiter)
|
static String |
removeBOM(String s)
Removes a windows byte order mark if present. |
static String |
stripControls(String input)
Removes all unprintable characters from a string and replaces with a space for use in an HTTP header |
static String |
stripHttpProtocol(String url)
|
static String |
stripHttpProtocol(String url,
String replacement)
|
static String[] |
tokenize(String tokens,
String delimiter)
Tokenizes a delimited string into a string array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean chkBool(String s, boolean defaultVal)
s
- the string to convertdefaultVal
- the default value to return if the string is invalid
public static double chkDbl(String s, double defaultVal)
s
- the string to convertdefaultVal
- the default value to return if the string is invalid
public static boolean chkEmail(String s)
s
- the string to check
public static String chkUrl(String url)
url
- string to check
public static boolean isUrl(String url)
url
- URL
true
if this is valid URLpublic static int chkInt(String s, int defaultVal)
s
- the string to convertdefaultVal
- the default value to return if the string is invalid
public static long chkLong(String s, long defaultVal)
s
- the string to convertdefaultVal
- the default value to return if the string is invalid
public static String chkStr(String s)
s
- the string to check
public static String chkStr(String s, String defaultVal)
s
- the string to checkdefaultVal
- the default value to return if the string is null or
empty
public static String chkStr(String s, int maxLength)
s
- the string to checkmaxLength
- the maximum length for the string
public static String escapeSingleQuotes(String s)
s
- the string to escape
public static String escapeXml(String s)
s
- the string to escape
public static String escapeXmlForBrowser(String s)
s
- the string to escape
public static String escapeStrForJson(String text)
text
- text to escape
public static String escapeStrForLDAPSearch(String text)
text
- text to escape
public static String removeBOM(String s)
s
- the string to check
public static String[] tokenize(String tokens, String delimiter)
tokens
- the delimited string to tokenizedelimiter
- the delimiter
public static String join(String[] valArr, String delimiter)
public static String stripControls(String input)
input
-
public static String stripHttpProtocol(String url, String replacement)
public static String stripHttpProtocol(String url)
|
Esri Geoportal Server 1.2.9
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |