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.PortletApplicationDefinition;
15: import org.apache.pluto.om.portlet.PortletApplicationDefinitionList;
16:
17: /**
18: * Implementation of Apache Pluto object model.
19: * @author Ken Weiner, kweiner@unicon.net
20: * @version $Revision: 34757 $
21: */
22: public class PortletApplicationDefinitionListImpl implements
23: PortletApplicationDefinitionList, Serializable {
24:
25: private Map portletApplicationDefinitions = null;
26:
27: public PortletApplicationDefinitionListImpl() {
28: portletApplicationDefinitions = new HashMap();
29: }
30:
31: public Iterator iterator() {
32: return portletApplicationDefinitions.values().iterator();
33: }
34:
35: public PortletApplicationDefinition get(ObjectID id) {
36: return (PortletApplicationDefinition) portletApplicationDefinitions
37: .get(id.toString());
38: }
39:
40: // Additional methods
41:
42: public void add(String id, PortletApplicationDefinition definition) {
43: portletApplicationDefinitions.put(id, definition);
44: }
45:
46: }
|