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<>(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() {
        public String getAcceptFormat() {
          return "xml";
        }
       
      }, this, Arrays.asList(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() {
        public String getAcceptFormat() {
          return "xml";
        }
       
      }, this, Arrays.asList(this.serialization), null));
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

    GsonSerializerBuilder gsonBuilder = new GsonBuilderWrapper(new MockInstanceImpl<>(gsonSerializers), new MockInstanceImpl<>(gsonDeserializers), new Serializee());
    MockSerializationResult result = new MockSerializationResult(null, null, gsonBuilder) {
      @Override
      public <T extends View> T use(Class<T> view) {
        return view.cast(new DefaultRepresentationResult(new FormatResolver() {
          @Override
          public String getAcceptFormat() {
            return "json";
          }
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.