use of org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation in project ovirt-engine by oVirt.
the class VolumeModel method validate.
public boolean validate() {
if (!validateBrickCount()) {
setMessage(VolumeBrickModel.getValidationFailedMsg(getTypeList().getSelectedItem(), true));
return false;
}
getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(50), new AsciiNameValidation() });
setMessage(null);
boolean validTransportTypes = true;
if (!getTcpTransportType().getEntity() && !getRdmaTransportType().getEntity()) {
validTransportTypes = false;
setMessage(ConstantsManager.getInstance().getConstants().volumeTransportTypesValidationMsg());
}
return getName().getIsValid() && validTransportTypes;
}
use of org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation 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.NotEmptyValidation in project ovirt-engine by oVirt.
the class GlusterVolumeGeoRepCreateModel method validate.
public boolean validate() {
getSlaveVolumes().validateSelectedItem(new IValidation[] { new NotEmptyValidation(), new LengthValidation(128) });
getSlaveHosts().validateSelectedItem(new IValidation[] { new NotEmptyValidation(), new LengthValidation(128) });
return getSlaveVolumes().getIsValid() && getSlaveHosts().getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation 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();
}
use of org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation in project ovirt-engine by oVirt.
the class CpuQosParametersModel method validate.
@Override
public boolean validate() {
if (!getIsAvailable()) {
return true;
}
getCpuLimit().validateEntity(new IValidation[] { new NotEmptyValidation(), new IntegerValidation(0, (Integer) AsyncDataProvider.getInstance().getConfigValuePreConverted(ConfigValues.MaxCpuLimitQosValue)) });
setIsValid(getCpuLimit().getIsValid());
return getIsValid();
}
Aggregations