1/*2 * Copyright 2000-2001,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 at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.services.persistence;
1819import java.util.List;
2021import org.apache.jetspeed.om.profile.Profile;
22importorg.apache.jetspeed.portal.*;
23import org.apache.jetspeed.portal.Portlet;
24import org.apache.jetspeed.portal.PortletException;
25import org.apache.turbine.services.Service;
26import org.apache.turbine.util.RunData;
2728/***29 * Defines the interface to the Portal Persistence Service for storing and30 * retrieving portlet instances.31 *32 * @author <a href="mailto:sweaver@rippe.com">Scott Weaver</a>33 * @version $Id: PortalPersistenceService.java,v 1.3 2004/02/23 03:33:52 jford Exp $34 */35publicinterfacePortalPersistenceServiceextends Service
36 {
37 String SERVICE_NAME = "PortalPersistenceService";
3839/***40 * Store a portlet instance to permenant storage.41 *42 * @param instance The portlet instance to be stored.43 * @exception PortalPersistenceException if there were problems44 * storing the PSMLDocument to persistent storage.45 * 46 */47void store(PortletInstance instance) throws PortalPersistenceException;
4849/***50 * Retrieves a portlet instance from persistent storage for the given portlet.51 *52 * @param portlet The portlet to retrieve an instance for53 * @param data Request rundata.54 * @return PortletInstance The instance for the given portlet.55 */56PortletInstance getInstance(Portlet portlet, RunData data);
5758/***59 * Retrieves a PersistentPortlet instance for this portlet.60 *61 * @param portlet The portlet to retrieve an instance for62 * @param profile Retrieve instance from this profile.63 * @return PortletInstance The instance for the given portlet. 64 */65PortletInstance getInstance(Portlet portlet, Profile profile);
6667/***68 * Retrieves a List of portlet instances for the current profile.69 *70 * @param data Request rundata.71 * @return List The list of all instances in current profile.72 */73 List getInstances(RunData data) throws PortletException;
7475/***76 * Retrieves a List of portlet instances for the given profile.77 *78 * @param profile Retrieve instances from this profile.79 * @return List The list of all instances in current profile.80 */81 List getInstances(Profile profile) throws PortletException;
8283 }