Package org.vraptor.validator

Examples of org.vraptor.validator.BasicValidationErrors


            String[] names = provider.parameterNamesFor(method.getMethod());
            for (String path : validate.params()) {
                try {
                    Object[] paramValues = parameters.getParameters();
                    Object object = paramFor(names, path, paramValues);
                    BasicValidationErrors newErrors = new BasicValidationErrors();
                    HibernateLogicMethod.validateParam(locator, request, bundle, newErrors, object, path);
                    for (org.vraptor.i18n.ValidationMessage msg : newErrors) {
                        if (msg instanceof FixedMessage) {
                            FixedMessage m = (FixedMessage) msg;
                            String content = bundle.getString(m.getKey());
View Full Code Here


            if (validationMethod != null) {
                List<Message> convertionErrors = new ArrayList<Message>();
                ResourceBundle bundle = localization.getBundle();
                Object[] parameters = provider.getParametersFor(method, convertionErrors, bundle);
                Object[] validationParameters = new Object[parameters.length + 1];
                BasicValidationErrors newErrors = new BasicValidationErrors();
                validationParameters[0] = newErrors;
                System.arraycopy(parameters, 0, validationParameters, 1, parameters.length);
                try {
                    validationMethod.invoke(resourceInstance, validationParameters);
                } catch (IllegalArgumentException e) {
View Full Code Here

    if (validationMethod == null) {
      return;
    }
    List<Message> convertionErrors = new ArrayList<Message>();
    Object[] parameters = provider.getParametersFor(method, convertionErrors, localization.getBundle());
    BasicValidationErrors newErrors = new BasicValidationErrors();
    Object[] validationParameters = createValidatonParameters(newErrors, parameters);
    new Mirror().on(resourceInstance).invoke().method(validationMethod).withArgs(validationParameters);
    addConvertionErrors(convertionErrors);
    convertErrors(newErrors);
  }
View Full Code Here

            String[] names = provider.parameterNamesFor(method.getMethod());
            for (String path : validate.params()) {
                try {
                    Object[] paramValues = parameters.getParameters();
                    Object object = paramFor(names, path, paramValues);
                    BasicValidationErrors newErrors = new BasicValidationErrors();
                    HibernateLogicMethod.validateParam(locator, request, bundle, newErrors, object, path);
                    for (org.vraptor.i18n.ValidationMessage msg : newErrors) {
                        if (msg instanceof FixedMessage) {
                            FixedMessage m = (FixedMessage) msg;
                            String content = bundle.getString(m.getKey());
View Full Code Here

            if (validationMethod != null) {
                List<Message> convertionErrors = new ArrayList<Message>();
                ResourceBundle bundle = localization.getBundle();
                Object[] parameters = provider.getParametersFor(method, convertionErrors, bundle);
                Object[] validationParameters = new Object[parameters.length + 1];
                BasicValidationErrors newErrors = new BasicValidationErrors();
                validationParameters[0] = newErrors;
                System.arraycopy(parameters, 0, validationParameters, 1, parameters.length);
                try {
                    validationMethod.invoke(resourceInstance, validationParameters);
                } catch (IllegalArgumentException e) {
View Full Code Here

            String[] names = provider.parameterNamesFor(method.getMethod());
            for (String path : validate.params()) {
                try {
                    Object[] paramValues = parameters.getParameters();
                    Object object = paramFor(names, path, paramValues);
                    BasicValidationErrors newErrors = new BasicValidationErrors();
                    HibernateLogicMethod.validateParam(locator, request, bundle, newErrors, object, path);
                    for (org.vraptor.i18n.ValidationMessage msg : newErrors) {
                        if (msg instanceof FixedMessage) {
                            FixedMessage m = (FixedMessage) msg;
                            String content = bundle.getString(m.getKey());
View Full Code Here

TOP

Related Classes of org.vraptor.validator.BasicValidationErrors

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.