@Test public void testViolatedConstraintsForTextProviderAction() throws Exception { HibernateValidatorInterceptor testInterceptor = new HibernateValidatorInterceptor(); ValidationAwareAndTextProviderTestAction testAction = new ValidationAwareAndTextProviderTestAction(); ActionInvocation testInvocation = getTestInvocationForMethod("validatedMethod", testAction); assertEquals("input", testInterceptor.intercept(testInvocation)); assertTrue(testAction.hasErrors()); }
@SuppressWarnings("PMD.SignatureDeclareThrowsException") @Override public String intercept(ActionInvocation invocation) throws Exception { Object actionObject = invocation.getAction(); if (checkSkipValidation(actionObject, invocation.getProxy().getMethod())) { return invocation.invoke(); } ValidationAware action = (ValidationAware) actionObject; validate(action); if (action.hasErrors()) { return Action.INPUT; } else { return invocation.invoke(); } }
HibernateValidatorInterceptor extends AbstractInterceptor { @SuppressWarnings("PMD.SignatureDeclareThrowsException") @Override public String intercept(ActionInvocation invocation) throws Exception { Object actionObject = invocation.getAction(); if (checkSkipValidation(actionObject, invocation.getProxy().getMethod())) { return invocation.invoke(); } ValidationAware action = (ValidationAware) actionObject; validate(action); if (action.hasErrors()) { return Action.INPUT; } else { return invocation.invoke(); } } }
HibernateValidatorInterceptor extends AbstractInterceptor { @SuppressWarnings("PMD.SignatureDeclareThrowsException") @Override public String intercept(ActionInvocation invocation) throws Exception { Object actionObject = invocation.getAction(); if (checkSkipValidation(actionObject, invocation.getProxy().getMethod())) { return invocation.invoke(); } ValidationAware action = (ValidationAware) actionObject; validate(action); if (action.hasErrors()) { return Action.INPUT; } else { return invocation.invoke(); } } HibernateValidatorInterceptor(); }
HibernateValidatorInterceptor extends AbstractInterceptor { @SuppressWarnings("PMD.SignatureDeclareThrowsException") @Override public String intercept(ActionInvocation invocation) throws Exception { Object actionObject = invocation.getAction(); if (checkSkipValidation(actionObject, invocation.getProxy().getMethod())) { return invocation.invoke(); } ValidationAware action = (ValidationAware) actionObject; validate(action); if (action.hasErrors()) { return Action.INPUT; } else { return invocation.invoke(); } } HibernateValidatorInterceptor(); String getExcludeMethods(); void setExcludeMethods(String excludeMethods); @SuppressWarnings("PMD.SignatureDeclareThrowsException") @Override String intercept(ActionInvocation invocation); }
HibernateValidatorInterceptor extends AbstractInterceptor { @SuppressWarnings("PMD.SignatureDeclareThrowsException") @Override public String intercept(ActionInvocation invocation) throws Exception { Object actionObject = invocation.getAction(); if (checkSkipValidation(actionObject, invocation.getProxy().getMethod())) { return invocation.invoke(); } ValidationAware action = (ValidationAware) actionObject; validate(action); if (action.hasErrors()) { return Action.INPUT; } else { return invocation.invoke(); } } HibernateValidatorInterceptor(); String getExcludeMethods(); void setExcludeMethods(String excludeMethods); @SuppressWarnings("PMD.SignatureDeclareThrowsException") @Override String intercept(ActionInvocation invocation);  }