001package io.jstach.opt.dropwizard;
002
003import java.nio.charset.StandardCharsets;
004
005import io.dropwizard.views.common.View;
006
007/**
008 * Default view implementation.
009 *
010 * @author agentgt
011 *
012 */
013public class DefaultJStachioView extends View implements JStachioView {
014
015        private final Object model;
016
017        /**
018         * Creates a view from the given model
019         * @param model jstache annotated model
020         */
021        public DefaultJStachioView(Object model) {
022                super("JSTACHIO", StandardCharsets.UTF_8);
023                this.model = model;
024        }
025
026        @Override
027        public Object model() {
028                return model;
029        }
030
031}