All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fastchar.core.FastTemplates Maven / Gradle / Ivy

There is a newer version: 2.2.2
Show newest version
package com.fastchar.core;

import com.fastchar.extend.freemarker.FastFreemarkerEngine;
import com.fastchar.extend.thymeleaf.FastThymeleafEngine;
import com.fastchar.extend.velocity.FastVelocityEngine;

import java.util.HashMap;
import java.util.Map;

public final class FastTemplates {

    private final Map finalContext = new HashMap<>();

    FastTemplates() {
    }

    public FastFreemarkerEngine getFreemarker() {
        return  FastChar.getOverrides().singleInstance(FastFreemarkerEngine.class);
    }

    public FastThymeleafEngine getThymeleaf() {
       return  FastChar.getOverrides().singleInstance(FastThymeleafEngine.class);
    }

    public FastVelocityEngine getVelocity() {
        return FastChar.getOverrides().singleInstance(FastVelocityEngine.class);
    }

    public FastTemplates put(String key, Object value) {
        finalContext.put(key, value);
        return this;
    }

    public Map getFinalContext() {
        return finalContext;
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy