class FreemarkerRequestUtil {

    public static ServletContextHashModel getServletContextHashModel(
            Environment env) {
        try {
            return (ServletContextHashModel) env.getDataModel().get(
                    FreemarkerServlet.KEY_APPLICATION);
        } catch (TemplateModelException e) {
            throw new NotAvailableFreemarkerServletException(
                    "Exception got when obtaining the application hash model",
                    e);
        }
    }

    private  FreemarkerRequestUtil();

}