KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > pluto > om > common > DescriptionSetImpl


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.common;
17
18 import java.util.Iterator JavaDoc;
19 import java.util.Locale JavaDoc;
20
21 import org.apache.pluto.om.common.Description;
22 import org.apache.pluto.om.common.DescriptionSet;
23
24 /**
25  *
26  *
27  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
28  *
29  * @version CVS $Id: DescriptionSetImpl.java 123407 2004-12-27 13:51:59Z cziegeler $
30  */

31 public class DescriptionSetImpl
32     extends AbstractSupportSet
33     implements DescriptionSet, java.io.Serializable JavaDoc, Support {
34
35     /* (non-Javadoc)
36      * @see org.apache.pluto.om.common.DescriptionSet#get(java.util.Locale)
37      */

38     public Description get(Locale JavaDoc locale) {
39         Iterator JavaDoc iterator = this.iterator();
40         while (iterator.hasNext()) {
41             Description desc = (Description)iterator.next();
42             if (desc.getLocale().equals(locale)) {
43                 return desc;
44             }
45         }
46         return null;
47     }
48
49     /* (non-Javadoc)
50      * @see org.apache.cocoon.portal.pluto.om.common.Support#postBuild(java.lang.Object)
51      */

52     public void postBuild(Object JavaDoc parameter) throws Exception JavaDoc {
53         // nothing to do
54
}
55
56     /* (non-Javadoc)
57      * @see org.apache.cocoon.portal.pluto.om.common.Support#postLoad(java.lang.Object)
58      */

59     public void postLoad(Object JavaDoc parameter) throws Exception JavaDoc {
60         Iterator JavaDoc iterator = this.iterator();
61         while (iterator.hasNext()) {
62             ((DescriptionImpl)iterator.next()).postLoad(parameter);
63         }
64     }
65
66     /* (non-Javadoc)
67      * @see org.apache.cocoon.portal.pluto.om.common.Support#postStore(java.lang.Object)
68      */

69     public void postStore(Object JavaDoc parameter) throws Exception JavaDoc {
70         // nothing to do
71
}
72
73     /* (non-Javadoc)
74      * @see org.apache.cocoon.portal.pluto.om.common.Support#preBuild(java.lang.Object)
75      */

76     public void preBuild(Object JavaDoc parameter) throws Exception JavaDoc {
77         // nothing to do
78
}
79
80     /* (non-Javadoc)
81      * @see org.apache.cocoon.portal.pluto.om.common.Support#preStore(java.lang.Object)
82      */

83     public void preStore(Object JavaDoc parameter) throws Exception JavaDoc {
84         // nothing to do
85
}
86
87 }
88
Popular Tags