Search in sources :

Example 1 with InterfaceMappingsValidation

use of org.ovirt.engine.ui.uicommonweb.validation.InterfaceMappingsValidation 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();
}
Also used : InterfaceMappingsValidation(org.ovirt.engine.ui.uicommonweb.validation.InterfaceMappingsValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) HostAddressValidation(org.ovirt.engine.ui.uicommonweb.validation.HostAddressValidation) IntegerValidation(org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation)

Aggregations

HostAddressValidation (org.ovirt.engine.ui.uicommonweb.validation.HostAddressValidation)1 IntegerValidation (org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation)1 InterfaceMappingsValidation (org.ovirt.engine.ui.uicommonweb.validation.InterfaceMappingsValidation)1 NotEmptyValidation (org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)1