|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gammastream.validity.GSVStringMethods
public class GSVStringMethods
This class provides a set of predefined rules for performing
validation on Strings
. These rules are part of
the default set of 'QuickRules'.
Field Summary | |
---|---|
static java.lang.String |
EQUAL
For programatic purposes, we include this constant which is used for the compareTo method. |
static java.lang.String |
GREATER_EQUAL
For programatic purposes, we include this constant which is used for the compareTo method. |
static java.lang.String |
GREATER_THAN
For programatic purposes, we include this constant which is used for the compareTo method. |
static java.lang.String |
LESS_EQUAL
For programatic purposes, we include this constant which is used for the compareTo method. |
static java.lang.String |
LESS_THAN
For programatic purposes, we include this constant which is used for the compareTo method. |
static java.lang.String |
NOT_EQUAL
For programatic purposes, we include this constant which is used for the compareTo method. |
Constructor Summary | |
---|---|
GSVStringMethods()
|
Method Summary | |
---|---|
static boolean |
compareTo(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Performs a string comparision using the specified params dictionary. |
static boolean |
contains(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Verifies that the attribute contains the specified string. |
static boolean |
endsWith(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Verifies that the attribute ends with the specified string. |
static boolean |
isAlphabetic(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Verifies that the attribute contains only alphabetic characters. |
static boolean |
isAlphaNumeric(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Verifies that the attribute contains only letters or numbers. |
static boolean |
isStringEmpty(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Determines whether the specified attribute is empty. |
static boolean |
isValidEmailAddress(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Verifies the attribute is a valid email address. |
static boolean |
isValidURL(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Verifies the attribute is a valid url. |
static boolean |
length(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Determines whether the specified string is of a specified length. |
static boolean |
maxLength(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Determines whether the specified string is of a specified length. |
static boolean |
minLength(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Determines whether the specified string is of a specified length. |
static boolean |
startsWith(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
Verifies that the attribute starts with the specified string. |
static boolean |
stripHTML(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
One of the many 'mutators' which never fail, unless of course, an exception is thrown. |
static boolean |
toLowerCase(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
One of the many 'mutators' which never fail, unless of course, an exception is thrown. |
static boolean |
toUpperCase(java.lang.Object object,
java.lang.Object attribute,
java.lang.String key,
com.webobjects.foundation.NSDictionary params)
One of the many 'mutators' which never fail, unless of course, an exception is thrown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EQUAL
compareTo
method.
public static final java.lang.String NOT_EQUAL
compareTo
method.
public static final java.lang.String GREATER_THAN
compareTo
method.
public static final java.lang.String GREATER_EQUAL
compareTo
method.
public static final java.lang.String LESS_THAN
compareTo
method.
public static final java.lang.String LESS_EQUAL
compareTo
method.
Constructor Detail |
---|
public GSVStringMethods()
Method Detail |
---|
public static final boolean isStringEmpty(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
true
if the attribute only contains spaces, CRs, NLs, etc.)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the string is empty; otherwise, false
public static final boolean toUpperCase(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
String
to all upper case characters.
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
public static final boolean toLowerCase(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
String
to all lower case characters.
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
public static final boolean length(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the comparison succeeds; otherwise, false
public static final boolean minLength(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the comparison succeeds; otherwise, false
public static final boolean maxLength(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the comparison succeeds; otherwise, false
public static final boolean contains(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the attribute contains the specified string; otherwise, false
public static final boolean endsWith(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the attribute ends with the specified string; otherwise, false
public static final boolean startsWith(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the attribute starts with the specified string; otherwise, false
public static final boolean isAlphabetic(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the string only contains alphabetic characters; otherwise, false
public static final boolean isAlphaNumeric(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the string only contains letters or numbers; otherwise, false
public static final boolean stripHTML(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
String
.
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
public static final boolean compareTo(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
String
to compare the attribute to.
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the comparision succeeds; otherwise, false
public static final boolean isValidURL(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the url is valid; otherwise, false
public static final boolean isValidEmailAddress(java.lang.Object object, java.lang.Object attribute, java.lang.String key, com.webobjects.foundation.NSDictionary params)
object
- The object whose attribute is being validated.attribute
- The attribute being validated.key
- The key used to access the attribute.params
- The param dictionary which must contain the above mentioned key-value pairs.
true
if the address is valid; otherwise, false
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |