Search in sources :

Example 1 with NameAndOptionalDomainValidation

use of org.ovirt.engine.ui.uicommonweb.validation.NameAndOptionalDomainValidation in project ovirt-engine by oVirt.

the class ImportVmsModel method validateVmwareConfiguration.

private boolean validateVmwareConfiguration() {
    getvCenter().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() });
    getEsx().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new HostAddressValidation() });
    getVmwareDatacenter().validateEntity(new IValidation[] { new NotEmptyValidation() });
    getUsername().validateEntity(new IValidation[] { new NotEmptyValidation(), new NameAndOptionalDomainValidation() });
    getPassword().validateEntity(new IValidation[] { new NotEmptyValidation() });
    return getvCenter().getIsValid() && getEsx().getIsValid() && getVmwareDatacenter().getIsValid() && getUsername().getIsValid() && getPassword().getIsValid();
}
Also used : NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) HostAddressValidation(org.ovirt.engine.ui.uicommonweb.validation.HostAddressValidation) NameAndOptionalDomainValidation(org.ovirt.engine.ui.uicommonweb.validation.NameAndOptionalDomainValidation) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation)

Aggregations

HostAddressValidation (org.ovirt.engine.ui.uicommonweb.validation.HostAddressValidation)1 LengthValidation (org.ovirt.engine.ui.uicommonweb.validation.LengthValidation)1 NameAndOptionalDomainValidation (org.ovirt.engine.ui.uicommonweb.validation.NameAndOptionalDomainValidation)1 NotEmptyValidation (org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)1