xiaoyong931011
2022-07-07 795084c308a27601e3a50280f9c0919adf87e32a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.xcong.farmer.cms.core.template;
 
import com.xcong.farmer.cms.core.node.Template;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
 
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
 
public class TemplateLoader {
 
    private Configuration cfg;
    private Map<String, Object> systemData;
 
    public TemplateLoader() {}
 
    public TemplateLoader(Configuration cfg) {
        this.cfg = cfg;
    }
 
    public Template template(File file) {
        Template template = new Template(file, this.systemData);
        template.parser();
        return template;
    }
 
    public void data(Map<String, Object> systemData) {
        this.systemData = systemData;
    }
 
}