|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfh.global.util.formatting.HTTPInputValidation
public class HTTPInputValidation
| Constructor Summary | |
|---|---|
HTTPInputValidation()
|
|
| Method Summary | |
|---|---|
static boolean |
formatBoolean(java.lang.String input,
boolean defaultValue,
java.lang.String trueValue,
java.lang.String falseValue)
This method takes in a string and tries to convert it to a boolean value, if the input string is equal to the trueValue string then true is returned, if the input string is equal to the falseValue string then false if returned, in all other cases the default value will be returned. |
static int |
formatInt(java.lang.String input,
int defaultValue)
This method takes in a string and formats it into a number, if the string is null or not a valid number then the default value is returned. |
static java.lang.String |
formatParamNoQuote(java.lang.String input)
This method takes in an input as a string, if null it returns a new string which is blank. |
static java.lang.String |
formatParamYesQuote(java.lang.String input)
This method will format a string so it can safley be put in an SQL statement, but it will preserve the quotes that are used in it |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTTPInputValidation()
| Method Detail |
|---|
public static java.lang.String formatParamNoQuote(java.lang.String input)
input - The input string to validate
public static int formatInt(java.lang.String input,
int defaultValue)
input - The string value to be formatted as an intdefaultValue - The value that should be returned if the string is null or not numeric
public static boolean formatBoolean(java.lang.String input,
boolean defaultValue,
java.lang.String trueValue,
java.lang.String falseValue)
input - The input string to convert to booleandefaultValue - The default value to return if the input can not be determinedtrueValue - The value that the input must equal for true to be returnedfalseValue - The value that the input must equal for false to be returned
public static java.lang.String formatParamYesQuote(java.lang.String input)
input - The input to parse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||