Package br.com.caelum.vraptor

Examples of br.com.caelum.vraptor.VRaptorException


    Iterator<Route> matches = Iterators.filter(routes.iterator(), canHandle(type, method));
    if (matches.hasNext()) {
      try {
        return matches.next().urlFor(type, method, params);
      } catch (Exception e) {
        throw new VRaptorException("The selected route is invalid for redirection: " + type.getName() + "."
            + method.getName(), e);
      }
    }
    throw new RouteNotFoundException("The selected route is invalid for redirection: " + type.getName() + "."
        + method.getName());
View Full Code Here


        }
    }

    public void register(Class<? extends Converter<?>> converterClass) {
        if (!converterClass.isAnnotationPresent(Convert.class)) {
            throw new VRaptorException("The converter type " + converterClass.getName()
                    + " should have the Convert annotation");
        }
    classes.addFirst(converterClass);
    }
View Full Code Here

    classes.addFirst(converterClass);
    }

    public <T> Converter<T> to(Class<T> clazz) {
        if (!existsFor(clazz)) {
      throw new VRaptorException("Unable to find converter for " + clazz.getName());
    }
        return (Converter<T>) container.instanceFor(findConverterType(clazz));
    }
View Full Code Here

    return found != null && TwoWayConverter.class.isAssignableFrom(found);
  }

  public TwoWayConverter<?> twoWayConverterFor(Class<?> type) {
    if (!existsTwoWayFor(type)) {
      throw new VRaptorException("Unable to find two way converter for " + type.getName());
    }
        return (TwoWayConverter<?>) container.instanceFor(findConverterType(type));
  }
View Full Code Here

  public void handle(Class<?> type) {
    if (Interceptor.class.isAssignableFrom(type)) {
    registerInterceptor(type);
  } else {
    throw new VRaptorException("Annotation " + Intercepts.class + " found in " + type
      + ", but it is neither an Interceptor nor an InterceptorSequence.");
  }
  }
View Full Code Here

    }
  }

  public void register(Class<? extends Converter<?>> converterClass) {
    if (!converterClass.isAnnotationPresent(Convert.class)) {
      throw new VRaptorException("The converter type " + converterClass.getName()
        + " should have the Convert annotation");
    }
    classes.addFirst(converterClass);
  }
View Full Code Here

    classes.addFirst(converterClass);
  }

  public <T> Converter<T> to(Class<T> clazz) {
    if (!existsFor(clazz)) {
      throw new VRaptorException("Unable to find converter for " + clazz.getName());
    }
    return (Converter<T>) container.instanceFor(findConverterType(clazz));
  }
View Full Code Here

    return found != null && TwoWayConverter.class.isAssignableFrom(found);
  }

  public TwoWayConverter<?> twoWayConverterFor(Class<?> type) {
    if (!existsTwoWayFor(type)) {
      throw new VRaptorException("Unable to find two way converter for " + type.getName());
    }
    return (TwoWayConverter<?>) container.instanceFor(findConverterType(type));
  }
View Full Code Here

        }
    }

    public void register(Class<? extends Converter<?>> converterClass) {
        if (!converterClass.isAnnotationPresent(Convert.class)) {
            throw new VRaptorException("The converter type " + converterClass.getName()
                    + " should have the Convert annotation");
        }
    classes.addFirst(converterClass);
    }
View Full Code Here

    classes.addFirst(converterClass);
    }

    public Converter<?> to(Class<?> clazz) {
        if (!existsFor(clazz)) {
      throw new VRaptorException("Unable to find converter for " + clazz.getName());
    }
        return container.instanceFor(findConverterType(clazz));
    }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.VRaptorException

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.