1
14
15 package com.liferay.portal.kernel.portlet;
16
17 import java.util.Map;
18 import java.util.concurrent.ConcurrentHashMap;
19
20
25 public class PortletBagPool {
26
27 public static PortletBag get(String portletId) {
28 return _instance._get(portletId);
29 }
30
31 public static void put(String portletId, PortletBag portletBag) {
32 _instance._put(portletId, portletBag);
33 }
34
35 public static PortletBag remove(String portletId) {
36 return _instance._remove(portletId);
37 }
38
39 private PortletBagPool() {
40 _portletBagPool = new ConcurrentHashMap<String, PortletBag>();
41 }
42
43 private PortletBag _get(String portletId) {
44 return _portletBagPool.get(portletId);
45 }
46
47 private void _put(String portletId, PortletBag portletBag) {
48 _portletBagPool.put(portletId, portletBag);
49 }
50
51 private PortletBag _remove(String portletId) {
52 return _portletBagPool.remove(portletId);
53 }
54
55 private static PortletBagPool _instance = new PortletBagPool();
56
57 private Map<String, PortletBag>_portletBagPool;
58
59 }