1   /**
2    * Copyright (c) 2000-2008 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  /**
27   * <a href="SCProductEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService
50   * @see com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceFactory
51   *
52   */
53  public class SCProductEntryLocalServiceUtil {
54      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addSCProductEntry(
55          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
56          throws com.liferay.portal.SystemException {
57          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
58  
59          return scProductEntryLocalService.addSCProductEntry(scProductEntry);
60      }
61  
62      public static void deleteSCProductEntry(long productEntryId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
66  
67          scProductEntryLocalService.deleteSCProductEntry(productEntryId);
68      }
69  
70      public static void deleteSCProductEntry(
71          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
75  
76          scProductEntryLocalService.deleteSCProductEntry(scProductEntry);
77      }
78  
79      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> dynamicQuery(
80          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81          throws com.liferay.portal.SystemException {
82          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
83  
84          return scProductEntryLocalService.dynamicQuery(queryInitializer);
85      }
86  
87      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> dynamicQuery(
88          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89          int begin, int end) throws com.liferay.portal.SystemException {
90          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
91  
92          return scProductEntryLocalService.dynamicQuery(queryInitializer, begin,
93              end);
94      }
95  
96      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateSCProductEntry(
97          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
98          throws com.liferay.portal.SystemException {
99          SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
100 
101         return scProductEntryLocalService.updateSCProductEntry(scProductEntry);
102     }
103 
104     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
105         long userId, long plid, java.lang.String name, java.lang.String type,
106         java.lang.String tags, java.lang.String shortDescription,
107         java.lang.String longDescription, java.lang.String pageURL,
108         java.lang.String author, java.lang.String repoGroupId,
109         java.lang.String repoArtifactId, long[] licenseIds,
110         java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages,
111         boolean addCommunityPermissions, boolean addGuestPermissions)
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             addCommunityPermissions, addGuestPermissions);
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<byte[]> thumbnails, java.util.List<byte[]> fullImages,
129         java.lang.String[] communityPermissions,
130         java.lang.String[] guestPermissions)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException {
133         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
134 
135         return scProductEntryLocalService.addProductEntry(userId, plid, name,
136             type, tags, shortDescription, longDescription, pageURL, author,
137             repoGroupId, repoArtifactId, licenseIds, thumbnails, fullImages,
138             communityPermissions, guestPermissions);
139     }
140 
141     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
142         long userId, long plid, java.lang.String name, java.lang.String type,
143         java.lang.String tags, java.lang.String shortDescription,
144         java.lang.String longDescription, java.lang.String pageURL,
145         java.lang.String author, java.lang.String repoGroupId,
146         java.lang.String repoArtifactId, long[] licenseIds,
147         java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages,
148         java.lang.Boolean addCommunityPermissions,
149         java.lang.Boolean addGuestPermissions,
150         java.lang.String[] communityPermissions,
151         java.lang.String[] guestPermissions)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
155 
156         return scProductEntryLocalService.addProductEntry(userId, plid, name,
157             type, tags, shortDescription, longDescription, pageURL, author,
158             repoGroupId, repoArtifactId, licenseIds, thumbnails, fullImages,
159             addCommunityPermissions, addGuestPermissions, communityPermissions,
160             guestPermissions);
161     }
162 
163     public static void addProductEntryResources(long productEntryId,
164         boolean addCommunityPermissions, boolean addGuestPermissions)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
168 
169         scProductEntryLocalService.addProductEntryResources(productEntryId,
170             addCommunityPermissions, addGuestPermissions);
171     }
172 
173     public static void addProductEntryResources(
174         com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
175         boolean addCommunityPermissions, boolean addGuestPermissions)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
179 
180         scProductEntryLocalService.addProductEntryResources(productEntry,
181             addCommunityPermissions, addGuestPermissions);
182     }
183 
184     public static void addProductEntryResources(long productEntryId,
185         java.lang.String[] communityPermissions,
186         java.lang.String[] guestPermissions)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
190 
191         scProductEntryLocalService.addProductEntryResources(productEntryId,
192             communityPermissions, guestPermissions);
193     }
194 
195     public static void addProductEntryResources(
196         com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
197         java.lang.String[] communityPermissions,
198         java.lang.String[] guestPermissions)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
202 
203         scProductEntryLocalService.addProductEntryResources(productEntry,
204             communityPermissions, guestPermissions);
205     }
206 
207     public static void deleteProductEntries(long groupId)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException {
210         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
211 
212         scProductEntryLocalService.deleteProductEntries(groupId);
213     }
214 
215     public static void deleteProductEntry(long productEntryId)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
219 
220         scProductEntryLocalService.deleteProductEntry(productEntryId);
221     }
222 
223     public static void deleteProductEntry(
224         com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
228 
229         scProductEntryLocalService.deleteProductEntry(productEntry);
230     }
231 
232     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
233         long productEntryId)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException {
236         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
237 
238         return scProductEntryLocalService.getProductEntry(productEntryId);
239     }
240 
241     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
242         long groupId, int begin, int end)
243         throws com.liferay.portal.SystemException {
244         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
245 
246         return scProductEntryLocalService.getProductEntries(groupId, begin, end);
247     }
248 
249     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
250         long groupId, int begin, int end,
251         com.liferay.portal.kernel.util.OrderByComparator obc)
252         throws com.liferay.portal.SystemException {
253         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
254 
255         return scProductEntryLocalService.getProductEntries(groupId, begin,
256             end, obc);
257     }
258 
259     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
260         long groupId, long userId, int begin, int end)
261         throws com.liferay.portal.SystemException {
262         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
263 
264         return scProductEntryLocalService.getProductEntries(groupId, userId,
265             begin, end);
266     }
267 
268     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
269         long groupId, long userId, int begin, int end,
270         com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.SystemException {
272         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
273 
274         return scProductEntryLocalService.getProductEntries(groupId, userId,
275             begin, end, obc);
276     }
277 
278     public static int getProductEntriesCount(long groupId)
279         throws com.liferay.portal.SystemException {
280         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
281 
282         return scProductEntryLocalService.getProductEntriesCount(groupId);
283     }
284 
285     public static int getProductEntriesCount(long groupId, long userId)
286         throws com.liferay.portal.SystemException {
287         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
288 
289         return scProductEntryLocalService.getProductEntriesCount(groupId, userId);
290     }
291 
292     public static java.lang.String getRepositoryXML(long groupId,
293         java.lang.String baseImageURL, java.util.Date oldestDate,
294         int maxNumOfVersions, java.util.Properties repoSettings)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException {
297         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
298 
299         return scProductEntryLocalService.getRepositoryXML(groupId,
300             baseImageURL, oldestDate, maxNumOfVersions, repoSettings);
301     }
302 
303     public static java.lang.String getRepositoryXML(long groupId,
304         java.lang.String version, java.lang.String baseImageURL,
305         java.util.Date oldestDate, int maxNumOfVersions,
306         java.util.Properties repoSettings)
307         throws com.liferay.portal.PortalException,
308             com.liferay.portal.SystemException {
309         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
310 
311         return scProductEntryLocalService.getRepositoryXML(groupId, version,
312             baseImageURL, oldestDate, maxNumOfVersions, repoSettings);
313     }
314 
315     public static void reIndex(java.lang.String[] ids)
316         throws com.liferay.portal.SystemException {
317         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
318 
319         scProductEntryLocalService.reIndex(ids);
320     }
321 
322     public static com.liferay.portal.kernel.search.Hits search(long companyId,
323         long groupId, java.lang.String keywords, java.lang.String type)
324         throws com.liferay.portal.SystemException {
325         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
326 
327         return scProductEntryLocalService.search(companyId, groupId, keywords,
328             type);
329     }
330 
331     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
332         long productEntryId, java.lang.String name, java.lang.String type,
333         java.lang.String tags, java.lang.String shortDescription,
334         java.lang.String longDescription, java.lang.String pageURL,
335         java.lang.String author, java.lang.String repoGroupId,
336         java.lang.String repoArtifactId, long[] licenseIds,
337         java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages)
338         throws com.liferay.portal.PortalException,
339             com.liferay.portal.SystemException {
340         SCProductEntryLocalService scProductEntryLocalService = SCProductEntryLocalServiceFactory.getService();
341 
342         return scProductEntryLocalService.updateProductEntry(productEntryId,
343             name, type, tags, shortDescription, longDescription, pageURL,
344             author, repoGroupId, repoArtifactId, licenseIds, thumbnails,
345             fullImages);
346     }
347 }