1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet;
16  
17  import com.liferay.portal.kernel.exception.PortalException;
18  import com.liferay.portal.kernel.exception.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  }