Package org.jboss.seam.rest.templating

Examples of org.jboss.seam.rest.templating.ModelWrapper


        model.getData().put(annotation.responseName(), o);

        try {
            OutputStreamWriter writer = new OutputStreamWriter(os);
            template.process(new ModelWrapper(model.getData(), manager), writer);
            writer.flush();
        } catch (TemplateException e) {
            throw new RuntimeException("Unable to write FreeMarker response.", e);
        }
    }
View Full Code Here


        Velocity.init(properties);
    }

    public void writeTo(Object o, ResponseTemplate annotation, Annotation[] annotations, MediaType mediaType,
            MultivaluedMap<String, Object> httpHeaders, OutputStream os) throws IOException {
        ModelWrapper model = new ModelWrapper(this.model.getData(), manager);
        model.put(annotation.responseName(), o);

        Template template = null;
        template = Velocity.getTemplate(annotation.value());

        OutputStreamWriter writer = new OutputStreamWriter(os);
View Full Code Here

TOP

Related Classes of org.jboss.seam.rest.templating.ModelWrapper

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.