1
14
15 package com.liferay.portal.freemarker;
16
17 import com.liferay.portal.kernel.freemarker.FreeMarkerContext;
18
19 import java.util.Map;
20 import java.util.concurrent.ConcurrentHashMap;
21
22
27 public class FreeMarkerContextImpl implements FreeMarkerContext {
28
29 public FreeMarkerContextImpl() {
30 _context = new ConcurrentHashMap<String, Object>();
31 }
32
33 public FreeMarkerContextImpl(Map<String, Object> context) {
34 _context = new ConcurrentHashMap<String, Object>();
35
36 _context.putAll(context);
37 }
38
39 public Object get(String key) {
40 return _context.get(key);
41 }
42
43 public Map<String, Object> getWrappedContext() {
44 return _context;
45 }
46
47 public void put(String key, Object value) {
48 _context.put(key, value);
49 }
50
51 private Map<String, Object> _context;
52
53 }