Search in sources :

Example 1 with AsciiOrNoneValidation

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

the class ProfileBaseModel method validate.

public boolean validate() {
    getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new SpecialAsciiI18NOrNoneValidation() });
    getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() });
    return getName().getIsValid();
}
Also used : AsciiOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) SpecialAsciiI18NOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.SpecialAsciiI18NOrNoneValidation)

Example 2 with AsciiOrNoneValidation

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

the class SharedMacPoolModel method validate.

@Override
public boolean validate() {
    super.validate();
    getName().validateEntity(new IValidation[] { new NotEmptyValidation() });
    getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() });
    setIsValid(getIsValid() && getName().getIsValid());
    return getIsValid();
}
Also used : AsciiOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)

Example 3 with AsciiOrNoneValidation

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

the class QosModel method validate.

public boolean validate() {
    getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new AsciiNameValidation() });
    getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() });
    getQosParametersModel().validate();
    setIsValid(getName().getIsValid() && getDescription().getIsValid() && getQosParametersModel().getIsValid());
    return getIsValid();
}
Also used : AsciiOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) AsciiNameValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation)

Example 4 with AsciiOrNoneValidation

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

the class NewClusterPolicyModel method validate.

private boolean validate() {
    getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(50), new AsciiNameValidation() });
    getDescription().validateEntity(new IValidation[] { new LengthValidation(400), new AsciiOrNoneValidation() });
    return getName().getIsValid() && getDescription().getIsValid() && getCustomPropertySheet().validate();
}
Also used : AsciiOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) AsciiNameValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation)

Example 5 with AsciiOrNoneValidation

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

the class AffinityGroupModel method validate.

protected boolean validate() {
    getName().validateEntity(new IValidation[] { new NotEmptyValidation(), new LengthValidation(255), new I18NNameValidation() });
    getDescription().validateEntity(new IValidation[] { new AsciiOrNoneValidation() });
    return getName().getIsValid() && getDescription().getIsValid();
}
Also used : AsciiOrNoneValidation(org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation) I18NNameValidation(org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation)

Aggregations

AsciiOrNoneValidation (org.ovirt.engine.ui.uicommonweb.validation.AsciiOrNoneValidation)6 NotEmptyValidation (org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation)6 AsciiNameValidation (org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation)3 LengthValidation (org.ovirt.engine.ui.uicommonweb.validation.LengthValidation)3 SpecialAsciiI18NOrNoneValidation (org.ovirt.engine.ui.uicommonweb.validation.SpecialAsciiI18NOrNoneValidation)2 I18NNameValidation (org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation)1