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.portletentityregistry; 21 22 import org.apache.pluto.om.common.ObjectID; 23 import org.apache.pluto.om.entity.PortletApplicationEntityList; 24 import org.apache.pluto.om.entity.PortletEntity; 25 import org.apache.pluto.portalImpl.services.ServiceManager; 26 27 /** 28 * This class is a static accessor for a <code>PortletPoolService</code> 29 * implementation. 30 * 31 32 */ 33 public class PortletEntityRegistry 34 { 35 36 37 private final static PortletEntityRegistryService cService = 38 (PortletEntityRegistryService) ServiceManager.getService (PortletEntityRegistryService.class); 39 40 /** 41 * Returns the portlet application instance with the given id. 42 * 43 * @return the portlet application instance 44 */ 45 public static PortletApplicationEntityList getPortletApplicationEntityList() 46 { 47 return cService.getPortletApplicationEntityList(); 48 } 49 50 /** 51 * Returns the portlet Entity with the given id. 52 * 53 * @param id the identifier of the portlet Entity to be returned 54 * @return the portlet Entity 55 */ 56 public static PortletEntity getPortletEntity(ObjectID id) 57 { 58 return cService.getPortletEntity(id); 59 } 60 61 public static void store() throws java.io.IOException 62 { 63 cService.store(); 64 } 65 66 public static void load() throws java.io.IOException 67 { 68 cService.load(); 69 } 70 71 public static void refresh(PortletEntity portletEntity) { 72 cService.refresh(portletEntity); 73 } 74 } 75