Package backtype.storm

Examples of backtype.storm.ConfigValidation$FieldValidator


        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidator(field, "minLength", "5");

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here


        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidator(field, "foo-bar-baz", null);

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        FieldValidatorSource source = mockFieldValidatorSource();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        FieldComponent instance = mockFieldComponent();
        Location l = mockLocation();
        FieldValidator validator = mockFieldValidator();

        String expression = "required,minLength=5";

        train_getComponent(component, instance);
View Full Code Here

            int equalsx = constraint.indexOf('=');

            String validatorType = equalsx > 0 ? constraint.substring(0, equalsx) : constraint;
            String constraintValue = equalsx > 0 ? constraint.substring(equalsx + 1) : null;

            FieldValidator validator = fieldValidatorSource.createValidator(
                    field,
                    validatorType,
                    constraintValue,
                    overrideId,
                    overrideMessages,
View Full Code Here

        };
    }

    public FieldValidator defaultValidator(String parameterName, ComponentResources resources)
    {
        FieldValidator result = fieldValidatorDefaultSource.createDefaultValidator(resources, parameterName);

        return result == null ? NOOP_VALIDATOR : result;
    }
View Full Code Here

        FieldValidatorSource source = mockFieldValidatorSource();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        FieldComponent instance = mockFieldComponent();
        Location l = mockLocation();
        FieldValidator validator = mockFieldValidator();

        String expression = "required,minLength=5";

        train_getComponent(component, instance);
View Full Code Here

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(globalMessages, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidator(field, "required", null);

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(null, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidator(field, "required", null);

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(null, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidator(field, "required", null);

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(globalMessages, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidators(field, "minlength");

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

TOP

Related Classes of backtype.storm.ConfigValidation$FieldValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.