01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.container.om.portlet;
07:
08: import java.io.Serializable;
09: import java.util.HashMap;
10: import java.util.Iterator;
11: import java.util.Map;
12:
13: import org.apache.pluto.om.common.ObjectID;
14: import org.apache.pluto.om.portlet.PortletDefinition;
15: import org.apache.pluto.om.portlet.PortletDefinitionList;
16:
17: /**
18: * Implementation of Apache Pluto object model.
19: * @author Ken Weiner, kweiner@unicon.net
20: * @version $Revision: 34757 $
21: */
22: public class PortletDefinitionListImpl implements
23: PortletDefinitionList, Serializable {
24:
25: private Map portletDefinitions = null;
26:
27: public PortletDefinitionListImpl() {
28: portletDefinitions = new HashMap();
29: }
30:
31: public Iterator iterator() {
32: return portletDefinitions.values().iterator();
33: }
34:
35: public PortletDefinition get(ObjectID id) {
36: return (PortletDefinition) portletDefinitions
37: .get(id.toString());
38: }
39:
40: // Additional methods
41:
42: public void add(String id, PortletDefinition definition) {
43: portletDefinitions.put(id, definition);
44: }
45:
46: }
|