1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet;
16  
17  import com.liferay.portal.PortalException;
18  import com.liferay.portal.SystemException;
19  import com.liferay.portal.model.Layout;
20  import com.liferay.portal.model.Portlet;
21  import com.liferay.portal.model.PortletPreferencesIds;
22  
23  import javax.portlet.PortletPreferences;
24  import javax.portlet.PortletRequest;
25  import javax.portlet.PreferencesValidator;
26  
27  import javax.servlet.http.HttpServletRequest;
28  
29  /**
30   * <a href="PortletPreferencesFactory.java.html"><b><i>View Source</i></b></a>
31   *
32   * @author Brian Wing Shun Chan
33   */
34  public interface PortletPreferencesFactory {
35  
36      public PortletPreferences getLayoutPortletSetup(
37              Layout layout, String portletId)
38          throws SystemException;
39  
40      public PortalPreferences getPortalPreferences(HttpServletRequest request)
41          throws SystemException;
42  
43      public PortalPreferences getPortalPreferences(PortletRequest portletRequest)
44          throws SystemException;
45  
46      public PortletPreferences getPortletPreferences(
47              HttpServletRequest request, String portletId)
48          throws PortalException, SystemException;
49  
50      public PortletPreferencesIds getPortletPreferencesIds(
51              HttpServletRequest request, String portletId)
52          throws PortalException, SystemException;
53  
54      public PortletPreferencesIds getPortletPreferencesIds(
55              HttpServletRequest request, Layout selLayout, String portletId)
56          throws PortalException, SystemException;
57  
58      public PortletPreferences getPortletSetup(
59              Layout layout, String portletId, String defaultPreferences)
60          throws SystemException;
61  
62      public PortletPreferences getPortletSetup(
63              HttpServletRequest request, String portletId)
64          throws SystemException;
65  
66      public PortletPreferences getPortletSetup(
67              HttpServletRequest request, String portletId,
68              String defaultPreferences)
69          throws SystemException;
70  
71      public PortletPreferences getPortletSetup(PortletRequest portletRequest)
72          throws SystemException;
73  
74      public PortletPreferences getPortletSetup(
75              PortletRequest portletRequest, String portletId)
76          throws SystemException;
77  
78      public PortletPreferences getPreferences(HttpServletRequest request);
79  
80      public PreferencesValidator getPreferencesValidator(Portlet portlet);
81  
82  }