1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * 9 * http://www.apache.org/licenses/LICENSE-2.010 * 11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17packageorg.apache.jetspeed.services.information;
1819import javax.servlet.ServletConfig;
2021import org.apache.jetspeed.components.portletregistry.PortletRegistry;
22import org.apache.pluto.om.common.ObjectID;
23import org.apache.pluto.om.portlet.PortletDefinition;
24import org.apache.pluto.services.information.PortalContextProvider;
25import org.apache.pluto.services.information.StaticInformationProvider;
2627/***28 * Provides static information to Pluto Container:29 * 30 * 1. PortletDefinition - given a unique registry id, 31 * retrieve the portlet definition from the portlet registry 32 *33 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>34 * @version $Id: StaticInformationProviderImpl.java 516448 2007-03-09 16:25:47Z ate $35 */36publicclassStaticInformationProviderImpl implements StaticInformationProvider
37 {
38privatefinal PortletRegistry portletRegistry;
3940/***41 * @obsolete42 */43publicStaticInformationProviderImpl(ServletConfig config, PortalContextProvider portalContextProvider, PortletRegistry portletRegistry)
44 {
45this(portletRegistry);
46 }
4748publicStaticInformationProviderImpl(PortletRegistry portletRegistry)
49 {
50this.portletRegistry = portletRegistry;
51 }
5253/***54 * Given a unique registry id, 55 * retrieve the portlet definition from the portlet registry56 * 57 * @param uniqueId The uniquely identifying portlet id in the registry58 */59public PortletDefinition getPortletDefinition(String uniqueId)
60 {
61return portletRegistry.getPortletDefinitionByIdentifier(uniqueId);
62 }
6364/*** 65 * <p>66 * getPortalContextProvider67 * </p>68 * 69 * @see org.apache.pluto.services.information.StaticInformationProvider#getPortalContextProvider()70 * @return71 */72public PortalContextProvider getPortalContextProvider()
73 {
74thrownew UnsupportedOperationException();
75 }
7677/*** 78 * <p>79 * getPortletDefinition80 * </p>81 * 82 * @see org.apache.pluto.services.information.StaticInformationProvider#getPortletDefinition(org.apache.pluto.om.common.ObjectID)83 * @param arg084 * @return85 */86public PortletDefinition getPortletDefinition(ObjectID id)
87 {
88return portletRegistry.getPortletDefinition(id);
89 }
9091 }