use of org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation in project ovirt-engine by oVirt.
the class CreateBrickModel method validate.
public boolean validate() {
getLvName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(50), new AsciiNameValidation() });
if (!getLvName().getIsValid()) {
return false;
}
getMountPoint().validateEntity(new IValidation[] { new NotEmptyValidation(), new BrickMountPointValidation() });
if (!getMountPoint().getIsValid()) {
return false;
}
IntegerValidation noOfPhysicalDiscsValidation = new IntegerValidation();
noOfPhysicalDiscsValidation.setMinimum(1);
getNoOfPhysicalDisksInRaidVolume().validateEntity(new IValidation[] { new NotEmptyValidation(), noOfPhysicalDiscsValidation });
if (!getNoOfPhysicalDisksInRaidVolume().getIsValid()) {
return false;
}
IntegerValidation stripSizeValidation = new IntegerValidation();
stripSizeValidation.setMinimum(1);
getStripeSize().validateEntity(new IValidation[] { new NotEmptyValidation(), stripSizeValidation });
if (!getStripeSize().getIsValid()) {
return false;
}
return true;
}
use of org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation in project ovirt-engine by oVirt.
the class NetworkQoSModel method validate.
@Override
public boolean validate() {
super.validate();
getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new AsciiNameValidation() });
setIsValid(getIsValid() && getName().getIsValid());
return getIsValid();
}
Aggregations