use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class BookmarkModel method validate.
public boolean validate() {
LengthValidation tempVar = new LengthValidation();
tempVar.setMaxLength(40);
getName().validateEntity(new IValidation[] { new NotEmptyValidation(), tempVar });
LengthValidation tempVar2 = new LengthValidation();
tempVar2.setMaxLength(300);
getSearchString().validateEntity(new IValidation[] { new NotEmptyValidation(), tempVar2 });
return getName().getIsValid() && getSearchString().getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class GlusterStorageModel method validate.
@Override
public boolean validate() {
getGlusterVolumes().validateSelectedItem(new IValidation[] { new NotEmptyValidation(), new LengthValidation(128) });
getVfsType().validateEntity(new IValidation[] { new NotEmptyValidation(), new AsciiNameValidation() });
if (getLinkGlusterVolume().getEntity()) {
return getGlusterVolumes().getIsValid() && getVfsType().getIsValid();
} else {
return super.validate();
}
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class ProviderModel method validateConnectionSettings.
private boolean validateConnectionSettings() {
getUsername().validateEntity(new IValidation[] { new NotEmptyValidation() });
getPassword().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(200) });
if (getType().getSelectedItem().isTenantRequired()) {
getTenantName().validateEntity(new IValidation[] { new NotEmptyValidation() });
}
getAuthUrl().validateEntity(new IValidation[] { new NotEmptyValidation(), new UrlValidation(Uri.SCHEME_HTTP, Uri.SCHEME_HTTPS) });
getUrl().validateEntity(new IValidation[] { new NotEmptyValidation(), new UrlValidation(Uri.SCHEME_HTTP, Uri.SCHEME_HTTPS) });
return (getUrl().getEntity() == null || getUrl().getIsValid() || getUrl().getEntity().isEmpty()) && getUsername().getIsValid() && getPassword().getIsValid() && getTenantName().getIsValid() && getAuthUrl().getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class VmwarePropertiesModel method validate.
public boolean validate() {
if (!getIsAvailable()) {
setIsValid(true);
} else {
getvCenter().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() });
getEsx().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() });
vmwareDatacenter.validateEntity(new IValidation[] { new NotEmptyValidation() });
setIsValid(getvCenter().getIsValid() && getEsx().getIsValid() && getVmwareDatacenter().getIsValid());
}
return getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.LengthValidation in project ovirt-engine by oVirt.
the class KVMPropertiesModel method validate.
public boolean validate() {
if (!getIsAvailable()) {
setIsValid(true);
} else {
getUrl().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255) });
setIsValid(getUrl().getIsValid());
}
return getIsValid();
}
Aggregations