removing obsolete validator class
This commit is contained in:
parent
d7209cf2d8
commit
1e2070299d
1 changed files with 0 additions and 37 deletions
|
@ -1,37 +0,0 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.edit.validator.impl;
|
|
||||||
|
|
||||||
import edu.cornell.mannlib.vedit.validator.ValidationObject;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
|
||||||
|
|
||||||
public class URIValidator {
|
|
||||||
|
|
||||||
private WebappDaoFactory wadf = null;
|
|
||||||
|
|
||||||
public URIValidator(WebappDaoFactory wadf) {
|
|
||||||
this.wadf = wadf;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ValidationObject validate (Object obj) throws IllegalArgumentException {
|
|
||||||
ValidationObject vo = new ValidationObject();
|
|
||||||
|
|
||||||
if (obj != null && obj instanceof String) {
|
|
||||||
String errMsg = wadf.checkURI((String)obj);
|
|
||||||
if (errMsg != null) {
|
|
||||||
vo.setValid(false);
|
|
||||||
vo.setMessage(errMsg);
|
|
||||||
} else {
|
|
||||||
vo.setValid(true);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
vo.setValid(false);
|
|
||||||
vo.setMessage("Please enter a URI");
|
|
||||||
}
|
|
||||||
|
|
||||||
vo.setValidatedObject(obj);
|
|
||||||
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue