use of org.ovirt.engine.ui.uicommonweb.validation.HostAddressValidation in project ovirt-engine by oVirt.
the class NeutronAgentModel method validate.
public boolean validate() {
if (getIsAvailable()) {
getPluginType().validateSelectedItem(new IValidation[] { pluginValidator });
getBrokerType().validateSelectedItem(new IValidation[] { new NotEmptyValidation() });
getInterfaceMappings().validateEntity(new IValidation[] { new InterfaceMappingsValidation() });
getMessagingServer().validateEntity(new IValidation[] { new HostAddressValidation(true, true) });
getMessagingServerPort().validateEntity(new IValidation[] { new IntegerValidation(BusinessEntitiesDefinitions.NETWORK_MIN_LEGAL_PORT, BusinessEntitiesDefinitions.NETWORK_MAX_LEGAL_PORT) });
setIsValid(getPluginType().getIsValid() && getInterfaceMappings().getIsValid() && getMessagingServer().getIsValid() && getMessagingServerPort().getIsValid() && getBrokerType().getIsValid());
}
return getIsValid();
}
use of org.ovirt.engine.ui.uicommonweb.validation.HostAddressValidation 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();
}
Aggregations