KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > portalImpl > services > portletdefinitionregistry > PortletDefinitionRegistry


1 /*
2  * Copyright 2003,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 /*
17
18  */

19
20 package org.apache.pluto.portalImpl.services.portletdefinitionregistry;
21
22 import org.apache.pluto.om.common.ObjectID;
23 import org.apache.pluto.om.portlet.PortletApplicationDefinitionList;
24 import org.apache.pluto.om.portlet.PortletDefinition;
25 import org.apache.pluto.portalImpl.services.ServiceManager;
26
27 /**
28  * This class is a static accessor for a <code>PortletRegistryService</code>
29  * implementation.
30  *
31
32  */

33 public class PortletDefinitionRegistry
34 {
35
36
37     private final static PortletDefinitionRegistryService cService =
38         (PortletDefinitionRegistryService) ServiceManager.getService (PortletDefinitionRegistryService.class);
39
40     /**
41      * Returns a set containg all portlet application definitions
42      *
43      * @return the portlet application definition set
44      */

45     public static PortletApplicationDefinitionList getPortletApplicationDefinitionList()
46     {
47         return cService.getPortletApplicationDefinitionList();
48     }
49
50     /**
51      * Returns the portlet definition to the given object id
52      *
53      * @return the portlet definition
54      */

55     public static PortletDefinition getPortletDefinition(ObjectID id)
56     {
57         return cService.getPortletDefinition(id);
58     }
59
60 }
61
Popular Tags