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.portlet.softwarecatalog.service;
24  
25  /**
26   * <a href="SCProductEntryLocalServiceUtil.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.portlet.softwarecatalog.service.SCProductEntryLocalService</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.portlet.softwarecatalog.service.SCProductEntryLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService
48   * @see com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceFactory
49   *
50   */
51  public class SCProductEntryLocalServiceUtil {
52      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addSCProductEntry(
53          com.liferay.portlet.softwarecatalog.model.SCProductEntry model)
54          throws com.liferay.portal.SystemException {
55          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
56  
57          return scProductEntryLocalService.addSCProductEntry(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          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
64  
65          return scProductEntryLocalService.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          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
72  
73          return scProductEntryLocalService.dynamicQuery(queryInitializer, begin,
74              end);
75      }
76  
77      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateSCProductEntry(
78          com.liferay.portlet.softwarecatalog.model.SCProductEntry model)
79          throws com.liferay.portal.SystemException {
80          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
81  
82          return scProductEntryLocalService.updateSCProductEntry(model);
83      }
84  
85      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
86          long userId, long plid, java.lang.String name, java.lang.String type,
87          java.lang.String tags, java.lang.String shortDescription,
88          java.lang.String longDescription, java.lang.String pageURL,
89          java.lang.String author, java.lang.String repoGroupId,
90          java.lang.String repoArtifactId, long[] licenseIds,
91          java.util.List thumbnails, java.util.List fullImages,
92          boolean addCommunityPermissions, boolean addGuestPermissions)
93          throws com.liferay.portal.PortalException, 
94              com.liferay.portal.SystemException {
95          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
96  
97          return scProductEntryLocalService.addProductEntry(userId, plid, name,
98              type, tags, shortDescription, longDescription, pageURL, author,
99              repoGroupId, repoArtifactId, licenseIds, thumbnails, fullImages,
100             addCommunityPermissions, addGuestPermissions);
101     }
102 
103     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
104         long userId, long plid, java.lang.String name, java.lang.String type,
105         java.lang.String tags, java.lang.String shortDescription,
106         java.lang.String longDescription, java.lang.String pageURL,
107         java.lang.String author, java.lang.String repoGroupId,
108         java.lang.String repoArtifactId, long[] licenseIds,
109         java.util.List thumbnails, java.util.List fullImages,
110         java.lang.String[] communityPermissions,
111         java.lang.String[] guestPermissions)
112         throws com.liferay.portal.PortalException, 
113             com.liferay.portal.SystemException {
114         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
115 
116         return scProductEntryLocalService.addProductEntry(userId, plid, name,
117             type, tags, shortDescription, longDescription, pageURL, author,
118             repoGroupId, repoArtifactId, licenseIds, thumbnails, fullImages,
119             communityPermissions, guestPermissions);
120     }
121 
122     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
123         long userId, long plid, java.lang.String name, java.lang.String type,
124         java.lang.String tags, java.lang.String shortDescription,
125         java.lang.String longDescription, java.lang.String pageURL,
126         java.lang.String author, java.lang.String repoGroupId,
127         java.lang.String repoArtifactId, long[] licenseIds,
128         java.util.List thumbnails, java.util.List fullImages,
129         java.lang.Boolean addCommunityPermissions,
130         java.lang.Boolean addGuestPermissions,
131         java.lang.String[] communityPermissions,
132         java.lang.String[] guestPermissions)
133         throws com.liferay.portal.PortalException, 
134             com.liferay.portal.SystemException {
135         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
136 
137         return scProductEntryLocalService.addProductEntry(userId, plid, name,
138             type, tags, shortDescription, longDescription, pageURL, author,
139             repoGroupId, repoArtifactId, licenseIds, thumbnails, fullImages,
140             addCommunityPermissions, addGuestPermissions, communityPermissions,
141             guestPermissions);
142     }
143 
144     public static void addProductEntryResources(long productEntryId,
145         boolean addCommunityPermissions, boolean addGuestPermissions)
146         throws com.liferay.portal.PortalException, 
147             com.liferay.portal.SystemException {
148         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
149         scProductEntryLocalService.addProductEntryResources(productEntryId,
150             addCommunityPermissions, addGuestPermissions);
151     }
152 
153     public static void addProductEntryResources(
154         com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
155         boolean addCommunityPermissions, boolean addGuestPermissions)
156         throws com.liferay.portal.PortalException, 
157             com.liferay.portal.SystemException {
158         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
159         scProductEntryLocalService.addProductEntryResources(productEntry,
160             addCommunityPermissions, addGuestPermissions);
161     }
162 
163     public static void addProductEntryResources(long productEntryId,
164         java.lang.String[] communityPermissions,
165         java.lang.String[] guestPermissions)
166         throws com.liferay.portal.PortalException, 
167             com.liferay.portal.SystemException {
168         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
169         scProductEntryLocalService.addProductEntryResources(productEntryId,
170             communityPermissions, guestPermissions);
171     }
172 
173     public static void addProductEntryResources(
174         com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
175         java.lang.String[] communityPermissions,
176         java.lang.String[] guestPermissions)
177         throws com.liferay.portal.PortalException, 
178             com.liferay.portal.SystemException {
179         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
180         scProductEntryLocalService.addProductEntryResources(productEntry,
181             communityPermissions, guestPermissions);
182     }
183 
184     public static void deleteProductEntry(long productEntryId)
185         throws com.liferay.portal.PortalException, 
186             com.liferay.portal.SystemException {
187         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
188         scProductEntryLocalService.deleteProductEntry(productEntryId);
189     }
190 
191     public static void deleteProductEntry(
192         com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry)
193         throws com.liferay.portal.PortalException, 
194             com.liferay.portal.SystemException {
195         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
196         scProductEntryLocalService.deleteProductEntry(productEntry);
197     }
198 
199     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
200         long productEntryId)
201         throws com.liferay.portal.PortalException, 
202             com.liferay.portal.SystemException {
203         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
204 
205         return scProductEntryLocalService.getProductEntry(productEntryId);
206     }
207 
208     public static java.util.List getProductEntries(long groupId, int begin,
209         int end) throws com.liferay.portal.SystemException {
210         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
211 
212         return scProductEntryLocalService.getProductEntries(groupId, begin, end);
213     }
214 
215     public static java.util.List getProductEntries(long groupId, int begin,
216         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException {
218         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
219 
220         return scProductEntryLocalService.getProductEntries(groupId, begin,
221             end, obc);
222     }
223 
224     public static java.util.List getProductEntries(long groupId, long userId,
225         int begin, int end) throws com.liferay.portal.SystemException {
226         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
227 
228         return scProductEntryLocalService.getProductEntries(groupId, userId,
229             begin, end);
230     }
231 
232     public static java.util.List getProductEntries(long groupId, long userId,
233         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException {
235         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
236 
237         return scProductEntryLocalService.getProductEntries(groupId, userId,
238             begin, end, obc);
239     }
240 
241     public static int getProductEntriesCount(long groupId)
242         throws com.liferay.portal.SystemException {
243         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
244 
245         return scProductEntryLocalService.getProductEntriesCount(groupId);
246     }
247 
248     public static int getProductEntriesCount(long groupId, long userId)
249         throws com.liferay.portal.SystemException {
250         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
251 
252         return scProductEntryLocalService.getProductEntriesCount(groupId, userId);
253     }
254 
255     public static java.lang.String getRepositoryXML(long groupId,
256         java.lang.String baseImageURL, java.util.Date oldestDate,
257         int maxNumOfVersions, java.util.Properties repoSettings)
258         throws com.liferay.portal.PortalException, 
259             com.liferay.portal.SystemException {
260         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
261 
262         return scProductEntryLocalService.getRepositoryXML(groupId,
263             baseImageURL, oldestDate, maxNumOfVersions, repoSettings);
264     }
265 
266     public static java.lang.String getRepositoryXML(long groupId,
267         java.lang.String version, java.lang.String baseImageURL,
268         java.util.Date oldestDate, int maxNumOfVersions,
269         java.util.Properties repoSettings)
270         throws com.liferay.portal.PortalException, 
271             com.liferay.portal.SystemException {
272         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
273 
274         return scProductEntryLocalService.getRepositoryXML(groupId, version,
275             baseImageURL, oldestDate, maxNumOfVersions, repoSettings);
276     }
277 
278     public static void reIndex(java.lang.String[] ids)
279         throws com.liferay.portal.SystemException {
280         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
281         scProductEntryLocalService.reIndex(ids);
282     }
283 
284     public static com.liferay.portal.kernel.search.Hits search(long companyId,
285         long groupId, java.lang.String keywords, java.lang.String type)
286         throws com.liferay.portal.SystemException {
287         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
288 
289         return scProductEntryLocalService.search(companyId, groupId, keywords,
290             type);
291     }
292 
293     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
294         long productEntryId, java.lang.String name, java.lang.String type,
295         java.lang.String tags, java.lang.String shortDescription,
296         java.lang.String longDescription, java.lang.String pageURL,
297         java.lang.String author, java.lang.String repoGroupId,
298         java.lang.String repoArtifactId, long[] licenseIds,
299         java.util.List thumbnails, java.util.List fullImages)
300         throws com.liferay.portal.PortalException, 
301             com.liferay.portal.SystemException {
302         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
303 
304         return scProductEntryLocalService.updateProductEntry(productEntryId,
305             name, type, tags, shortDescription, longDescription, pageURL,
306             author, repoGroupId, repoArtifactId, licenseIds, thumbnails,
307             fullImages);
308     }
309 }