KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > pluto > om > PortletApplicationDefinitionListImpl


1 /*
2  * Copyright 2004,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.portal.pluto.om;
17
18 import java.util.HashMap JavaDoc;
19 import java.util.Iterator JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import org.apache.pluto.om.common.ObjectID;
23 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
24 import org.apache.pluto.om.portlet.PortletApplicationDefinitionList;
25
26 /**
27  *
28  *
29  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
30  *
31  * @version CVS $Id: PortletApplicationDefinitionListImpl.java 30932 2004-07-29 17:35:38Z vgritsenko $
32  */

33 public class PortletApplicationDefinitionListImpl
34 implements PortletApplicationDefinitionList {
35
36     /** The portlet application definitions */
37     protected Map JavaDoc portletApplicationDefinitions;
38
39     public PortletApplicationDefinitionListImpl() {
40         this.portletApplicationDefinitions = new HashMap JavaDoc();
41     }
42
43     /* (non-Javadoc)
44      * @see org.apache.pluto.om.portlet.PortletApplicationDefinitionList#get(org.apache.pluto.om.common.ObjectID)
45      */

46     public PortletApplicationDefinition get(ObjectID objectId) {
47         return (PortletApplicationDefinition)this.portletApplicationDefinitions.get(objectId);
48     }
49
50     /* (non-Javadoc)
51      * @see java.util.Collection#iterator()
52      */

53     public Iterator JavaDoc iterator() {
54         return this.portletApplicationDefinitions.values().iterator();
55     }
56     
57     /**
58      * Add a new portlet application definition
59      */

60     public void add(PortletApplicationDefinition def) {
61         this.portletApplicationDefinitions.put(def.getId(), def);
62     }
63 }
64
Popular Tags