use of org.ovirt.engine.ui.uicommonweb.validation.LongValidation in project ovirt-engine by oVirt.
the class EditQuotaClusterModel method validate.
public boolean validate() {
IntegerValidation intValidation = new IntegerValidation();
intValidation.setMinimum(1);
LongValidation longValidation = new LongValidation();
longValidation.setMinimum(1);
getSpecificMemValue().setIsValid(true);
getSpecificCpuValue().setIsValid(true);
if (getSpecificMem().getEntity()) {
getSpecificMemValue().validateEntity(new IValidation[] { longValidation, new NotEmptyValidation() });
}
if (getSpecificCpu().getEntity()) {
getSpecificCpuValue().validateEntity(new IValidation[] { intValidation, new NotEmptyValidation() });
}
return getSpecificMemValue().getIsValid() && getSpecificCpuValue().getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LongValidation in project ovirt-engine by oVirt.
the class EditQuotaStorageModel method validate.
public boolean validate() {
LongValidation longValidation = new LongValidation(1, 65535);
getSpecificStorageValue().setIsValid(true);
if (getSpecificStorage().getEntity()) {
getSpecificStorageValue().validateEntity(new IValidation[] { longValidation, new NotEmptyValidation() });
}
return getSpecificStorageValue().getIsValid();
}
Aggregations