KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > pluto > StaticInformationProviderImpl


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;
17
18 import org.apache.cocoon.portal.pluto.om.PortletDefinitionRegistry;
19 import org.apache.pluto.om.common.ObjectID;
20 import org.apache.pluto.om.portlet.PortletDefinition;
21 import org.apache.pluto.services.information.StaticInformationProvider;
22 import org.apache.pluto.services.information.PortalContextProvider;
23
24 /**
25  *
26  *
27  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
28  *
29  * @version CVS $Id: StaticInformationProviderImpl.java 30932 2004-07-29 17:35:38Z vgritsenko $
30  */

31 public class StaticInformationProviderImpl
32 implements StaticInformationProvider {
33
34     protected PortalContextProvider provider;
35
36     protected PortletDefinitionRegistry registry;
37     
38     /**
39      * Constructor
40      */

41     public StaticInformationProviderImpl(PortalContextProvider provider,
42                                          PortletDefinitionRegistry registry) {
43         this.provider = provider;
44         this.registry = registry;
45     }
46
47     /* (non-Javadoc)
48      * @see org.apache.pluto.services.information.StaticInformationProvider#getPortalContextProvider()
49      */

50     public PortalContextProvider getPortalContextProvider() {
51         return this.provider;
52     }
53
54     /* (non-Javadoc)
55      * @see org.apache.pluto.services.information.StaticInformationProvider#getPortletDefinition(org.apache.pluto.om.common.ObjectID)
56      */

57     public PortletDefinition getPortletDefinition(ObjectID portletGUID) {
58         return this.registry.getPortletDefinition(portletGUID);
59     }
60
61 }
62
Popular Tags