KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > profile > impl > CopletInstanceDataManager


1 /*
2  * Copyright 1999-2002,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.profile.impl;
17
18 import java.util.HashMap JavaDoc;
19 import java.util.Map JavaDoc;
20
21 import org.apache.cocoon.portal.coplet.CopletInstanceData;
22
23 /**
24  * Holds instances of CopletInstanceData.
25  *
26  * @author <a HREF="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
27  *
28  * @version CVS $Id: CopletInstanceDataManager.java 306572 2005-10-06 10:06:57Z cziegeler $
29  */

30 public class CopletInstanceDataManager {
31     
32     /**
33      * The coplet instance data instances.
34      */

35     private final Map JavaDoc copletInstanceData;
36
37     public CopletInstanceDataManager() {
38         this.copletInstanceData = new HashMap JavaDoc();
39     }
40
41     public CopletInstanceDataManager(Map JavaDoc instances) {
42         this.copletInstanceData = instances;
43     }
44
45     /**
46      * Gets all coplet instance data.
47      */

48     public Map JavaDoc getCopletInstanceData() {
49         return this.copletInstanceData;
50     }
51
52     /**
53      * Gets the specified coplet instance data.
54      */

55     public CopletInstanceData getCopletInstanceData(String JavaDoc copletId) {
56         return (CopletInstanceData)this.copletInstanceData.get(copletId);
57     }
58     
59     /**
60      * Puts the specified coplet instance data to the manager.
61      */

62     public void putCopletInstanceData(CopletInstanceData data) {
63         this.copletInstanceData.put(data.getId(), data);
64     }
65 }
66
Popular Tags