1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  /**
26   * <a href="PortletPreferencesLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portal.service.PortletPreferencesLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portal.service.PortletPreferencesLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.PortletPreferencesLocalService
48   * @see com.liferay.portal.service.PortletPreferencesLocalServiceFactory
49   *
50   */
51  public class PortletPreferencesLocalServiceUtil {
52      public static com.liferay.portal.model.PortletPreferences addPortletPreferences(
53          com.liferay.portal.model.PortletPreferences model)
54          throws com.liferay.portal.SystemException {
55          PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
56  
57          return portletPreferencesLocalService.addPortletPreferences(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
64  
65          return portletPreferencesLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
72  
73          return portletPreferencesLocalService.dynamicQuery(queryInitializer,
74              begin, end);
75      }
76  
77      public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
78          com.liferay.portal.model.PortletPreferences model)
79          throws com.liferay.portal.SystemException {
80          PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
81  
82          return portletPreferencesLocalService.updatePortletPreferences(model);
83      }
84  
85      public static void deletePortletPreferences(long ownerId, int ownerType,
86          long plid)
87          throws com.liferay.portal.PortalException, 
88              com.liferay.portal.SystemException {
89          PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
90          portletPreferencesLocalService.deletePortletPreferences(ownerId,
91              ownerType, plid);
92      }
93  
94      public static void deletePortletPreferences(long ownerId, int ownerType,
95          long plid, java.lang.String portletId)
96          throws com.liferay.portal.PortalException, 
97              com.liferay.portal.SystemException {
98          PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
99          portletPreferencesLocalService.deletePortletPreferences(ownerId,
100             ownerType, plid, portletId);
101     }
102 
103     public static javax.portlet.PortletPreferences getDefaultPreferences(
104         long companyId, java.lang.String portletId)
105         throws com.liferay.portal.PortalException, 
106             com.liferay.portal.SystemException {
107         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
108 
109         return portletPreferencesLocalService.getDefaultPreferences(companyId,
110             portletId);
111     }
112 
113     public static java.util.List getPortletPreferences()
114         throws com.liferay.portal.SystemException {
115         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
116 
117         return portletPreferencesLocalService.getPortletPreferences();
118     }
119 
120     public static java.util.List getPortletPreferences(long plid)
121         throws com.liferay.portal.SystemException {
122         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
123 
124         return portletPreferencesLocalService.getPortletPreferences(plid);
125     }
126 
127     public static java.util.List getPortletPreferences(long ownerId,
128         int ownerType, long plid)
129         throws com.liferay.portal.PortalException, 
130             com.liferay.portal.SystemException {
131         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
132 
133         return portletPreferencesLocalService.getPortletPreferences(ownerId,
134             ownerType, plid);
135     }
136 
137     public static com.liferay.portal.model.PortletPreferences getPortletPreferences(
138         long ownerId, int ownerType, long plid, java.lang.String portletId)
139         throws com.liferay.portal.PortalException, 
140             com.liferay.portal.SystemException {
141         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
142 
143         return portletPreferencesLocalService.getPortletPreferences(ownerId,
144             ownerType, plid, portletId);
145     }
146 
147     public static javax.portlet.PortletPreferences getPreferences(
148         com.liferay.portal.model.PortletPreferencesIds portletPreferencesIds)
149         throws com.liferay.portal.PortalException, 
150             com.liferay.portal.SystemException {
151         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
152 
153         return portletPreferencesLocalService.getPreferences(portletPreferencesIds);
154     }
155 
156     public static javax.portlet.PortletPreferences getPreferences(
157         long companyId, long ownerId, int ownerType, long plid,
158         java.lang.String portletId)
159         throws com.liferay.portal.PortalException, 
160             com.liferay.portal.SystemException {
161         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
162 
163         return portletPreferencesLocalService.getPreferences(companyId,
164             ownerId, ownerType, plid, portletId);
165     }
166 
167     public static javax.portlet.PortletPreferences getPreferences(
168         long companyId, long ownerId, int ownerType, long plid,
169         java.lang.String portletId, java.lang.String defaultPreferences)
170         throws com.liferay.portal.PortalException, 
171             com.liferay.portal.SystemException {
172         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
173 
174         return portletPreferencesLocalService.getPreferences(companyId,
175             ownerId, ownerType, plid, portletId, defaultPreferences);
176     }
177 
178     public static com.liferay.portal.model.PortletPreferences updatePreferences(
179         long ownerId, int ownerType, long plid, java.lang.String portletId,
180         javax.portlet.PortletPreferences prefs)
181         throws com.liferay.portal.PortalException, 
182             com.liferay.portal.SystemException {
183         PortletPreferencesLocalService portletPreferencesLocalService = PortletPreferencesLocalServiceFactory.getService();
184 
185         return portletPreferencesLocalService.updatePreferences(ownerId,
186             ownerType, plid, portletId, prefs);
187     }
188 }