Search in sources :

Example 1 with IValidation

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

the class ClusterModel method validate.

public boolean validate() {
    validateName();
    getDataCenter().validateSelectedItem(new IValidation[] { new NotEmptyValidation() });
    getCustomPropertySheet().setIsValid(getCustomPropertySheet().validate());
    setValidTab(TabName.CLUSTER_POLICY_TAB, getCustomPropertySheet().getIsValid());
    final IValidation[] versionValidations = new IValidation[] { new NotEmptyValidation() };
    getVersion().validateSelectedItem(versionValidations);
    getManagementNetwork().validateSelectedItem(new IValidation[] { new NotEmptyValidation() });
    getRngHwrngSourceRequired().setIsValid(true);
    boolean validService = true;
    if (getEnableOvirtService().getIsAvailable() && getEnableGlusterService().getIsAvailable()) {
        validService = getEnableOvirtService().getEntity() || getEnableGlusterService().getEntity();
    }
    getGlusterHostAddress().validateEntity(new IValidation[] { new NotEmptyValidation() });
    getGlusterHostPassword().validateEntity(new IValidation[] { new NotEmptyValidation() });
    if (!validService) {
        setMessage(ConstantsManager.getInstance().getConstants().clusterServiceValidationMsg());
    } else if (getIsImportGlusterConfiguration().getEntity() && getGlusterHostAddress().getIsValid() && getGlusterHostPassword().getIsValid() && !isFingerprintVerified()) {
        setMessage(ConstantsManager.getInstance().getConstants().fingerprintNotVerified());
    } else {
        setMessage(null);
    }
    if (getSpiceProxyEnabled().getEntity()) {
        getSpiceProxy().validateEntity(new IValidation[] { new HostWithProtocolAndPortAddressValidation() });
    } else {
        getSpiceProxy().setIsValid(true);
    }
    setValidTab(TabName.CONSOLE_TAB, getSpiceProxy().getIsValid());
    if (getSerialNumberPolicy().getSelectedSerialNumberPolicy() == SerialNumberPolicy.CUSTOM) {
        getSerialNumberPolicy().getCustomSerialNumber().validateEntity(new IValidation[] { new NotEmptyValidation() });
    } else {
        getSerialNumberPolicy().getCustomSerialNumber().setIsValid(true);
    }
    getMacPoolModel().validate();
    boolean generalTabValid = getName().getIsValid() && getDataCenter().getIsValid() && getCPU().getIsValid() && getManagementNetwork().getIsValid() && getVersion().getIsValid() && validService && getGlusterHostAddress().getIsValid() && getRngHwrngSourceRequired().getIsValid() && getGlusterHostPassword().getIsValid() && (!getIsImportGlusterConfiguration().getEntity() || (getGlusterHostAddress().getIsValid() && getGlusterHostPassword().getIsValid() && getSerialNumberPolicy().getCustomSerialNumber().getIsValid() && isFingerprintVerified()));
    setValidTab(TabName.GENERAL_TAB, generalTabValid);
    if (getVersion().getSelectedItem() != null) {
        if (AsyncDataProvider.getInstance().isMigrationPoliciesSupported(getVersion().getSelectedItem()) && MigrationBandwidthLimitType.CUSTOM.equals(getMigrationBandwidthLimitType().getSelectedItem())) {
            getCustomMigrationNetworkBandwidth().validateEntity(new IValidation[] { new NotNullIntegerValidation(0, Integer.MAX_VALUE) });
        } else {
            getCustomMigrationNetworkBandwidth().setIsValid(true);
        }
    }
    final boolean migrationTabValid = getMigrationBandwidthLimitType().getIsValid() && getCustomMigrationNetworkBandwidth().getIsValid();
    setValidTab(TabName.MIGRATION_TAB, migrationTabValid);
    boolean macPoolTabValid = getMacPoolModel().getIsValid();
    setValidTab(TabName.MAC_POOL_TAB, macPoolTabValid);
    ValidationCompleteEvent.fire(getEventBus(), this);
    return generalTabValid && macPoolTabValid && getCustomPropertySheet().getIsValid() && getSpiceProxy().getIsValid() && migrationTabValid;
}
Also used : IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) HostWithProtocolAndPortAddressValidation(org.ovirt.engine.ui.uicommonweb.validation.HostWithProtocolAndPortAddressValidation) NotNullIntegerValidation(org.ovirt.engine.ui.uicommonweb.validation.NotNullIntegerValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)

Example 2 with IValidation

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

the class VmInitModel method validate.

public boolean validate() {
    getHostname().setIsValid(true);
    getWindowsHostname().setIsValid(true);
    getSysprepAdminPassword().setIsValid(true);
    getSysprepAdminPasswordVerification().setIsValid(true);
    getCloudInitRootPassword().setIsValid(true);
    getCloudInitRootPasswordVerification().setIsValid(true);
    if (this.isWindowsOS) {
        if (getSysprepPasswordEnabled()) {
            getSysprepAdminPassword().validateEntity(new IValidation[] { new NotEmptyValidation(), new MatchFieldsValidator(getSysprepAdminPassword().getEntity(), getSysprepAdminPasswordVerification().getEntity()) });
        }
    } else {
        if (getRootPasswordEnabled()) {
            getCloudInitRootPassword().validateEntity(new IValidation[] { new NotEmptyValidation(), new MatchFieldsValidator(getCloudInitRootPassword().getEntity(), getCloudInitRootPasswordVerification().getEntity()) });
        }
    }
    if (getHostnameEnabled()) {
        if (this.isWindowsOS) {
            getWindowsHostname().validateEntity(new IValidation[] { new HostnameValidation(), new LengthValidation(AsyncDataProvider.getInstance().getMaxVmNameLengthSysprep()) });
        } else {
            getHostname().validateEntity(new IValidation[] { new HostnameValidation(), new LengthValidation(AsyncDataProvider.getInstance().getMaxVmNameLength()) });
        }
    }
    getSysprepDomain().setIsValid(true);
    if (getDomainEnabled()) {
        getSysprepDomain().setIsValid(new HostAddressValidation().validate(getSysprepDomain().getSelectedItem()).getSuccess());
    }
    getAuthorizedKeys().setIsValid(true);
    getTimeZoneList().setIsValid(true);
    if (getTimeZoneEnabled().getEntity()) {
        getTimeZoneList().validateSelectedItem(new IValidation[] { new NotEmptyValidation() });
    }
    boolean networkIsValid = true;
    getNetworkList().setIsValid(true);
    getNetworkIpAddress().setIsValid(true);
    getNetworkNetmask().setIsValid(true);
    getNetworkGateway().setIsValid(true);
    getNetworkIpv6Address().setIsValid(true);
    getNetworkIpv6Prefix().setIsValid(true);
    getNetworkIpv6Gateway().setIsValid(true);
    boolean dnsIsValid = true;
    getDnsServers().setIsValid(true);
    getDnsSearchDomains().setIsValid(true);
    if (getNetworkEnabled().getEntity()) {
        saveNetworkFields();
        for (Map.Entry<String, VmInitNetwork> entry : networkMap.entrySet()) {
            String name = entry.getKey();
            VmInitNetwork vmInitNetwork = entry.getValue();
            if (vmInitNetwork.getBootProtocol() == Ipv4BootProtocol.STATIC_IP) {
                if (!validateHidden(getNetworkList(), name, null, new IValidation[] { new VmInitNetworkNameValidation(), new NotEmptyValidation() }) || !validateHidden(getNetworkIpAddress(), vmInitNetwork.getIp(), null, new IValidation[] { new Ipv4AddressValidation() }) || !validateHidden(getNetworkNetmask(), vmInitNetwork.getNetmask(), null, new IValidation[] { new SubnetMaskValidation() }) || !validateHidden(getNetworkGateway(), vmInitNetwork.getGateway(), null, new IValidation[] { new Ipv4AddressValidation(true) })) {
                    getNetworkList().setSelectedItem(name);
                    networkIsValid = false;
                    break;
                }
            }
            if (vmInitNetwork.getIpv6BootProtocol() == Ipv6BootProtocol.STATIC_IP) {
                if (!validateHidden(getNetworkList(), name, null, new IValidation[] { new VmInitNetworkNameValidation(), new NotEmptyValidation() }) || !validateHidden(getNetworkIpv6Address(), vmInitNetwork.getIpv6Address(), null, new IValidation[] { new Ipv6AddressValidation() }) || !validateHidden(getNetworkIpv6Prefix(), vmInitNetwork.getIpv6Prefix(), null, new IValidation[] { new IntegerValidation(0, 128) }) || !validateHidden(getNetworkIpv6Gateway(), vmInitNetwork.getIpv6Gateway(), null, new IValidation[] { new Ipv6AddressValidation(true) })) {
                    getNetworkList().setSelectedItem(name);
                    networkIsValid = false;
                    break;
                }
            }
        }
        if (!networkMap.isEmpty()) {
            if (getDnsServers().getEntity() != null) {
                for (String server : tokenizeString(getDnsServers().getEntity())) {
                    if (!validateHidden(getDnsServers(), server, dnsServerListMessage, new IValidation[] { new IpAddressValidation() })) {
                        dnsIsValid = false;
                        break;
                    }
                }
            }
            if (getDnsSearchDomains().getEntity() != null) {
                for (String domain : tokenizeString(getDnsSearchDomains().getEntity())) {
                    if (!validateHidden(getDnsSearchDomains(), domain, null, new IValidation[] { new HostnameValidation() })) {
                        dnsIsValid = false;
                        break;
                    }
                }
            }
        }
    }
    return getHostname().getIsValid() && getWindowsHostname().getIsValid() && getSysprepDomain().getIsValid() && getAuthorizedKeys().getIsValid() && getTimeZoneList().getIsValid() && getCloudInitRootPassword().getIsValid() && getSysprepAdminPassword().getIsValid() && networkIsValid && dnsIsValid;
}
Also used : Ipv6AddressValidation(org.ovirt.engine.ui.uicommonweb.validation.Ipv6AddressValidation) HostnameValidation(org.ovirt.engine.ui.uicommonweb.validation.HostnameValidation) VmInitNetwork(org.ovirt.engine.core.common.businessentities.VmInitNetwork) Ipv4AddressValidation(org.ovirt.engine.ui.uicommonweb.validation.Ipv4AddressValidation) VmInitNetworkNameValidation(org.ovirt.engine.ui.uicommonweb.validation.VmInitNetworkNameValidation) IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) IpAddressValidation(org.ovirt.engine.ui.uicommonweb.validation.IpAddressValidation) MatchFieldsValidator(org.ovirt.engine.ui.uicommonweb.validation.MatchFieldsValidator) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) HostAddressValidation(org.ovirt.engine.ui.uicommonweb.validation.HostAddressValidation) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation) SubnetMaskValidation(org.ovirt.engine.ui.uicommonweb.validation.SubnetMaskValidation) Map(java.util.Map) TreeMap(java.util.TreeMap) SortedMap(java.util.SortedMap) IntegerValidation(org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation)

Example 3 with IValidation

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

the class StorageListModel method storageNameValidation.

public void storageNameValidation() {
    StorageModel model = (StorageModel) getWindow();
    String name = model.getName().getEntity();
    model.getName().setIsValid(true);
    AsyncDataProvider.getInstance().isStorageDomainNameUnique(new AsyncQuery<>(isNameUnique -> {
        final StorageModel storageModel = (StorageModel) getWindow();
        String name1 = storageModel.getName().getEntity();
        String tempVar = storageModel.getOriginalName();
        // $NON-NLS-1$
        String originalName = (tempVar != null) ? tempVar : "";
        if (!isNameUnique && name1.compareToIgnoreCase(originalName) != 0) {
            storageModel.getName().getInvalidityReasons().add(ConstantsManager.getInstance().getConstants().nameMustBeUniqueInvalidReason());
            storageModel.getName().setIsValid(false);
            postStorageNameValidation();
        } else {
            AsyncDataProvider.getInstance().getStorageDomainMaxNameLength(new AsyncQuery<>(nameMaxLength -> {
                RegexValidation tempVar2 = new RegexValidation();
                // $NON-NLS-1$ //$NON-NLS-2$
                tempVar2.setExpression("^[A-Za-z0-9_-]{1," + nameMaxLength + "}$");
                tempVar2.setMessage(ConstantsManager.getInstance().getMessages().nameCanContainOnlyMsg(nameMaxLength));
                storageModel.getName().validateEntity(new IValidation[] { new NotEmptyValidation(), tempVar2 });
                postStorageNameValidation();
            }));
        }
    }), name);
}
Also used : SearchType(org.ovirt.engine.core.common.interfaces.SearchType) Arrays(java.util.Arrays) FrontendActionAsyncResult(org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult) SearchObjects(org.ovirt.engine.core.searchbackend.SearchObjects) RegexValidation(org.ovirt.engine.ui.uicommonweb.validation.RegexValidation) Inject(com.google.inject.Inject) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) ApplicationMode(org.ovirt.engine.core.common.mode.ApplicationMode) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ExtendSANStorageDomainParameters(org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters) DiskProfileListModel(org.ovirt.engine.ui.uicommonweb.models.profiles.DiskProfileListModel) ActionType(org.ovirt.engine.core.common.action.ActionType) GlusterBrickEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity) NfsVersion(org.ovirt.engine.core.common.businessentities.NfsVersion) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) HasEntity(org.ovirt.engine.ui.uicommonweb.models.HasEntity) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) AttachStorageDomainToPoolParameters(org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters) StorageType(org.ovirt.engine.core.common.businessentities.storage.StorageType) SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) ReduceSANStorageDomainDevicesCommandParameters(org.ovirt.engine.core.common.action.ReduceSANStorageDomainDevicesCommandParameters) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) Set(java.util.Set) AddSANStorageDomainParameters(org.ovirt.engine.core.common.action.AddSANStorageDomainParameters) StorageDomainSharedStatus(org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus) StringHelper(org.ovirt.engine.core.compat.StringHelper) List(java.util.List) Cloner(org.ovirt.engine.ui.uicommonweb.Cloner) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) QueryType(org.ovirt.engine.core.common.queries.QueryType) PermissionListModel(org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel) ITaskTarget(org.ovirt.engine.ui.uicompat.ITaskTarget) Guid(org.ovirt.engine.core.compat.Guid) IFrontendActionAsyncCallback(org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback) TaskContext(org.ovirt.engine.ui.uicompat.TaskContext) StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) Task(org.ovirt.engine.ui.uicompat.Task) StorageDomainStatus(org.ovirt.engine.core.common.businessentities.StorageDomainStatus) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel) GetDeviceListQueryParameters(org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Frontend(org.ovirt.engine.ui.frontend.Frontend) StorageDomainStatic(org.ovirt.engine.core.common.businessentities.StorageDomainStatic) LinkedList(java.util.LinkedList) Model(org.ovirt.engine.ui.uicommonweb.models.Model) RemoveStorageDomainParameters(org.ovirt.engine.core.common.action.RemoveStorageDomainParameters) StorageDomainManagementParameter(org.ovirt.engine.core.common.action.StorageDomainManagementParameter) Linq(org.ovirt.engine.ui.uicommonweb.Linq) SearchStringMapping(org.ovirt.engine.ui.uicommonweb.models.SearchStringMapping) IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) ListWithSimpleDetailsModel(org.ovirt.engine.ui.uicommonweb.models.ListWithSimpleDetailsModel) StorageServerConnectionParametersBase(org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase) StorageDomainType(org.ovirt.engine.core.common.businessentities.StorageDomainType) WebAdminApplicationPlaces(org.ovirt.engine.ui.uicommonweb.place.WebAdminApplicationPlaces) VDS(org.ovirt.engine.core.common.businessentities.VDS) StorageDomainParametersBase(org.ovirt.engine.core.common.action.StorageDomainParametersBase) PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs) LUNs(org.ovirt.engine.core.common.businessentities.storage.LUNs) RegexValidation(org.ovirt.engine.ui.uicommonweb.validation.RegexValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)

Example 4 with IValidation

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

the class DataCenterGuideModel method onAddStorage.

public void onAddStorage() {
    StorageModel model = (StorageModel) getWindow();
    String storageName = model.getName().getEntity();
    AsyncDataProvider.getInstance().isStorageDomainNameUnique(new AsyncQuery<>(isNameUnique -> {
        StorageModel storageModel = (StorageModel) getWindow();
        String name = storageModel.getName().getEntity();
        String tempVar = storageModel.getOriginalName();
        // $NON-NLS-1$
        String originalName = (tempVar != null) ? tempVar : "";
        if (!isNameUnique && name.compareToIgnoreCase(originalName) != 0) {
            storageModel.getName().getInvalidityReasons().add(ConstantsManager.getInstance().getConstants().nameMustBeUniqueInvalidReason());
            storageModel.getName().setIsValid(false);
        }
        AsyncDataProvider.getInstance().getStorageDomainMaxNameLength(new AsyncQuery<>(nameMaxLength -> {
            StorageModel storageModel1 = (StorageModel) getWindow();
            RegexValidation tempVar2 = new RegexValidation();
            // $NON-NLS-1$ //$NON-NLS-2$
            tempVar2.setExpression("^[A-Za-z0-9_-]{1," + nameMaxLength + "}$");
            tempVar2.setMessage(ConstantsManager.getInstance().getMessages().nameCanContainOnlyMsg(nameMaxLength));
            storageModel1.getName().validateEntity(new IValidation[] { new NotEmptyValidation(), tempVar2 });
            postOnAddStorage();
        }));
    }), storageName);
}
Also used : SearchType(org.ovirt.engine.core.common.interfaces.SearchType) Arrays(java.util.Arrays) RegexValidation(org.ovirt.engine.ui.uicommonweb.validation.RegexValidation) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) NewHostModel(org.ovirt.engine.ui.uicommonweb.models.hosts.NewHostModel) GuideModel(org.ovirt.engine.ui.uicommonweb.models.GuideModel) IFrontendMultipleActionAsyncCallback(org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ActionType(org.ovirt.engine.core.common.action.ActionType) ManagementNetworkOnClusterOperationParameters(org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters) PosixStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) NewEditStorageModelBehavior(org.ovirt.engine.ui.uicommonweb.models.storage.NewEditStorageModelBehavior) AttachStorageDomainToPoolParameters(org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters) VdsActionParameters(org.ovirt.engine.core.common.action.VdsActionParameters) StorageType(org.ovirt.engine.core.common.businessentities.storage.StorageType) SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) ListModel(org.ovirt.engine.ui.uicommonweb.models.ListModel) Set(java.util.Set) AddSANStorageDomainParameters(org.ovirt.engine.core.common.action.AddSANStorageDomainParameters) StorageDomainSharedStatus(org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus) Collectors(java.util.stream.Collectors) MoveHost(org.ovirt.engine.ui.uicommonweb.models.hosts.MoveHost) List(java.util.List) VDSStatus(org.ovirt.engine.core.common.businessentities.VDSStatus) Cluster(org.ovirt.engine.core.common.businessentities.Cluster) IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) StorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel) AddVdsActionParameters(org.ovirt.engine.core.common.action.hostdeploy.AddVdsActionParameters) ClusterModel(org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) QueryType(org.ovirt.engine.core.common.queries.QueryType) HostModel(org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel) ITaskTarget(org.ovirt.engine.ui.uicompat.ITaskTarget) Guid(org.ovirt.engine.core.compat.Guid) IFrontendActionAsyncCallback(org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback) TaskContext(org.ovirt.engine.ui.uicompat.TaskContext) StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) FrontendMultipleActionAsyncResult(org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult) Task(org.ovirt.engine.ui.uicompat.Task) NfsStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel) StorageDomainStatus(org.ovirt.engine.core.common.businessentities.StorageDomainStatus) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel) GetDeviceListQueryParameters(org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Frontend(org.ovirt.engine.ui.frontend.Frontend) StorageDomainStatic(org.ovirt.engine.core.common.businessentities.StorageDomainStatic) ChangeVDSClusterParameters(org.ovirt.engine.core.common.action.ChangeVDSClusterParameters) ClusterListModel(org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel) Model(org.ovirt.engine.ui.uicommonweb.models.Model) StoragePoolStatus(org.ovirt.engine.core.common.businessentities.StoragePoolStatus) MoveHostData(org.ovirt.engine.ui.uicommonweb.models.hosts.MoveHostData) SanStorageModelBase(org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase) StorageDomainManagementParameter(org.ovirt.engine.core.common.action.StorageDomainManagementParameter) Linq(org.ovirt.engine.ui.uicommonweb.Linq) IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) ApproveVdsParameters(org.ovirt.engine.core.common.action.hostdeploy.ApproveVdsParameters) LocalStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel) StorageServerConnectionParametersBase(org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase) StorageDomainType(org.ovirt.engine.core.common.businessentities.StorageDomainType) Collections(java.util.Collections) VDS(org.ovirt.engine.core.common.businessentities.VDS) LunModel(org.ovirt.engine.ui.uicommonweb.models.storage.LunModel) Timer(com.google.gwt.user.client.Timer) LUNs(org.ovirt.engine.core.common.businessentities.storage.LUNs) RegexValidation(org.ovirt.engine.ui.uicommonweb.validation.RegexValidation) PosixStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel) IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) StorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel) NfsStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel) LocalStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)

Example 5 with IValidation

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

the class SharedHostNetworkQosParametersModel method getOutLinkshareValidations.

@Override
protected Collection<IValidation> getOutLinkshareValidations() {
    Collection<IValidation> validations = super.getOutLinkshareValidations();
    validations.add(new NotEmptyValidation());
    return validations;
}
Also used : IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)

Aggregations

IValidation (org.ovirt.engine.ui.uicommonweb.validation.IValidation)8 NotEmptyValidation (org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)7 ArrayList (java.util.ArrayList)4 IntegerValidation (org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation)3 RegexValidation (org.ovirt.engine.ui.uicommonweb.validation.RegexValidation)3 Arrays (java.util.Arrays)2 HashSet (java.util.HashSet)2 List (java.util.List)2 Set (java.util.Set)2 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)2 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)2 ActionType (org.ovirt.engine.core.common.action.ActionType)2 AddSANStorageDomainParameters (org.ovirt.engine.core.common.action.AddSANStorageDomainParameters)2 AttachStorageDomainToPoolParameters (org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters)2 StorageDomainManagementParameter (org.ovirt.engine.core.common.action.StorageDomainManagementParameter)2 StorageServerConnectionParametersBase (org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase)2 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)2 StorageDomainSharedStatus (org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus)2 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)2 StorageDomainStatus (org.ovirt.engine.core.common.businessentities.StorageDomainStatus)2