1 16 package org.apache.cocoon.portal.pluto.om; 17 18 import java.util.HashMap ; 19 20 import org.apache.pluto.om.common.ObjectID; 21 import org.apache.pluto.om.window.PortletWindow; 22 import org.apache.pluto.om.window.PortletWindowList; 23 import org.apache.pluto.om.window.PortletWindowListCtrl; 24 25 32 public class PortletWindowListImpl implements PortletWindowList, PortletWindowListCtrl { 33 34 35 private final HashMap windows; 36 37 public PortletWindowListImpl() { 38 windows = new HashMap (); 39 } 40 41 43 48 public java.util.Iterator iterator() { 49 50 return windows.values().iterator(); 51 } 52 53 54 62 public PortletWindow get(ObjectID id) { 63 return (PortletWindow)windows.get(id.toString()); 64 } 65 66 68 73 public void add(PortletWindow window) { 74 if(window != null) { 75 windows.put(window.getId().toString(), window); 76 } 77 } 78 79 84 public void remove(ObjectID id){ 85 if(id != null) { 86 windows.remove(id.toString()); 87 } 88 } 89 } 90 | Popular Tags |