|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.oval.AbstractCheck
net.sf.oval.configuration.annotation.AbstractAnnotationCheck<AssertURL>
net.sf.oval.constraint.AssertURLCheck
public class AssertURLCheck
| Nested Class Summary | |
|---|---|
static class |
AssertURLCheck.URIScheme
http://en.wikipedia.org/wiki/URI_scheme |
| Constructor Summary | |
|---|---|
AssertURLCheck()
|
|
| Method Summary | |
|---|---|
void |
configure(AssertURL constraintAnnotation)
Configures the check based on the given constraint annotation. |
protected ConstraintTarget[] |
getAppliesToDefault()
|
AssertURLCheck.URIScheme[] |
getPermittedURISchemes()
Gets the allowed URL schemes. |
boolean |
isConnect()
Specifies if a connection to the URL should be attempted to verify its validity. |
boolean |
isSatisfied(Object validatedObject,
Object valueToValidate,
OValContext context,
Validator validator)
This method implements the validation logic |
void |
setConnect(boolean connect)
Specifies if a connection to the URL should be attempted to verify its validity. |
void |
setPermittedURISchemes(AssertURLCheck.URIScheme[] permittedURISchemes)
Specifies the allowed URL schemes. |
| Methods inherited from class net.sf.oval.AbstractCheck |
|---|
createMessageVariables, getAppliesTo, getContext, getErrorCode, getMessage, getMessageVariables, getProfiles, getSeverity, getTarget, getWhen, isActive, requireMessageVariablesRecreation, setAppliesTo, setContext, setErrorCode, setMessage, setProfiles, setSeverity, setTarget, setWhen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.oval.Check |
|---|
getAppliesTo, getContext, getErrorCode, getMessage, getMessageVariables, getProfiles, getSeverity, getTarget, getWhen, isActive, setAppliesTo, setContext, setErrorCode, setMessage, setProfiles, setSeverity, setTarget, setWhen |
| Constructor Detail |
|---|
public AssertURLCheck()
| Method Detail |
|---|
public void configure(AssertURL constraintAnnotation)
configure in interface AnnotationCheck<AssertURL>configure in class AbstractAnnotationCheck<AssertURL>constraintAnnotation - the constraint annotation to use for configurationprotected ConstraintTarget[] getAppliesToDefault()
getAppliesToDefault in class AbstractCheckpublic AssertURLCheck.URIScheme[] getPermittedURISchemes()
public boolean isConnect()
public boolean isSatisfied(Object validatedObject,
Object valueToValidate,
OValContext context,
Validator validator)
validatedObject - the object/bean to validate the value against, for static fields or methods this is the classvalueToValidate - the value to validate, may be null when validating pre conditions for static methodscontext - the validation context (e.g. a field, a constructor parameter or a method parameter)validator - the calling validator
public void setConnect(boolean connect)
connect - the connect to setpublic void setPermittedURISchemes(AssertURLCheck.URIScheme[] permittedURISchemes)
permittedURISchemes - the permittedURISchemes to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||