use of org.structr.common.error.NullPropertyToken in project structr by structr.
the class ValidatedNode method nonEmpty.
protected boolean nonEmpty(Property<String> property, ErrorBuffer errorBuffer) {
String value = getProperty(property);
boolean valid = true;
if (value == null) {
errorBuffer.add(new NullPropertyToken(getClass().getSimpleName(), property));
valid = false;
} else if (value.isEmpty()) {
errorBuffer.add(new EmptyPropertyToken(getClass().getSimpleName(), property));
valid = false;
}
return valid;
}
Aggregations