1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services.persistence;
18
19 import java.util.List;
20
21 import org.apache.jetspeed.om.profile.Profile;
22 import org.apache.jetspeed.portal.*;
23 import org.apache.jetspeed.portal.Portlet;
24 import org.apache.jetspeed.portal.PortletException;
25 import org.apache.turbine.services.Service;
26 import org.apache.turbine.util.RunData;
27
28 /***
29 * Defines the interface to the Portal Persistence Service for storing and
30 * 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 */
35 public interface PortalPersistenceService extends Service
36 {
37 String SERVICE_NAME = "PortalPersistenceService";
38
39 /***
40 * Store a portlet instance to permenant storage.
41 *
42 * @param instance The portlet instance to be stored.
43 * @exception PortalPersistenceException if there were problems
44 * storing the PSMLDocument to persistent storage.
45 *
46 */
47 void store(PortletInstance instance) throws PortalPersistenceException;
48
49 /***
50 * Retrieves a portlet instance from persistent storage for the given portlet.
51 *
52 * @param portlet The portlet to retrieve an instance for
53 * @param data Request rundata.
54 * @return PortletInstance The instance for the given portlet.
55 */
56 PortletInstance getInstance(Portlet portlet, RunData data);
57
58 /***
59 * Retrieves a PersistentPortlet instance for this portlet.
60 *
61 * @param portlet The portlet to retrieve an instance for
62 * @param profile Retrieve instance from this profile.
63 * @return PortletInstance The instance for the given portlet.
64 */
65 PortletInstance getInstance(Portlet portlet, Profile profile);
66
67 /***
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;
74
75 /***
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;
82
83 }