Package br.com.caelum.vraptor.http

Examples of br.com.caelum.vraptor.http.FormatResolver


      return view.cast(serialization);
    }

    if (view.isAssignableFrom(RepresentationResult.class)) {
      serialization = new XStreamXMLSerialization(response, xstreambuilder);
      return view.cast(new DefaultRepresentationResult(new FormatResolver() {
        @Override
        public String getAcceptFormat() {
          return "xml";
        }
      }, this, new MockInstanceImpl<Serialization>(this.serialization)));
View Full Code Here


      return view.cast(serialization);
    }

    if (view.isAssignableFrom(RepresentationResult.class)) {
      serialization = new XStreamXMLSerialization(response, xstreambuilder);
      return view.cast(new DefaultRepresentationResult(new FormatResolver() {
        @Override
        public String getAcceptFormat() {
          return "xml";
        }
      }, this, new MockInstanceImpl<Serialization>(this.serialization)));
View Full Code Here

      return view.cast(serialization);
    }
   
    if (view.isAssignableFrom(RepresentationResult.class)) {
      this.serialization = new XStreamXMLSerialization(response, extractor, initializer, builder);
      return view.cast(new DefaultRepresentationResult(new FormatResolver() {
        @Override
        public String getAcceptFormat() {
          return "xml";
        }
       
View Full Code Here

      return view.cast(serialization);
    }

    if (view.isAssignableFrom(RepresentationResult.class)) {
      serialization = new XStreamXMLSerialization(response, xstreambuilder, environment);
      return view.cast(new DefaultRepresentationResult(new FormatResolver() {
        @Override
        public String getAcceptFormat() {
          return "xml";
        }
      }, this, new MockInstanceImpl<>(this.serialization)));
View Full Code Here

  private final MethodInfo info;

    public VRaptor2PathResolver(Config config, HttpServletRequest request, MethodInfo info) {
        this.info = info;
    this.pattern = config.getViewPattern();
        this.vraptor3 = new DefaultPathResolver(new FormatResolver() {
      public String getAcceptFormat() {
        return "html";
      }
    });
    }
View Full Code Here

      return view.cast(serialization);
    }
   
    if (view.isAssignableFrom(RepresentationResult.class)) {
      this.serialization = new XStreamXMLSerialization(response, extractor, initializer, builder);
      return view.cast(new DefaultRepresentationResult(new FormatResolver() {
        public String getAcceptFormat() {
          return "xml";
        }
       
      }, this, Arrays.asList(this.serialization), null));
View Full Code Here

      return view.cast(serialization);
    }
   
    if (view.isAssignableFrom(RepresentationResult.class)) {
      this.serialization = new XStreamXMLSerialization(response, extractor, initializer, builder);
      return view.cast(new DefaultRepresentationResult(new FormatResolver() {
        public String getAcceptFormat() {
          return "xml";
        }
       
      }, this, Arrays.asList(this.serialization), null));
View Full Code Here

  private final MethodInfo info;

    public VRaptor2PathResolver(Config config, HttpServletRequest request, MethodInfo info) {
        this.info = info;
    this.pattern = config.getViewPattern();
        this.vraptor3 = new DefaultPathResolver(new FormatResolver() {
      public String getAcceptFormat() {
        return "html";
      }
    });
    }
View Full Code Here

    i18ned.setBundle(new SingletonResourceBundle("message", "Something else"));

    MockSerializationResult result = new MockSerializationResult(XStreamBuilderImpl.cleanInstance(new MessageConverter())) {
      @Override
      public <T extends View> T use(Class<T> view) {
        return view.cast(new DefaultRepresentationResult(new FormatResolver() {
          public String getAcceptFormat() {
            return "json";
          }
         
        }, this, Arrays.<Serialization>asList(super.use(JSONSerialization.class)), null));
View Full Code Here

      return view.cast(serialization);
    }

    if (view.isAssignableFrom(RepresentationResult.class)) {
      serialization = new XStreamXMLSerialization(response, xstreambuilder);
      return view.cast(new DefaultRepresentationResult(new FormatResolver() {
        @Override
        public String getAcceptFormat() {
          return "xml";
        }
      }, this, new MockInstanceImpl<Serialization>(this.serialization)));
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.http.FormatResolver

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.