use of org.ovirt.engine.ui.uicommonweb.validation.BrickMountPointValidation 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;
}
Aggregations