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.imagegallery.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="IGImageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link IGImageLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       IGImageLocalService
37   * @generated
38   */
39  public class IGImageLocalServiceUtil {
40      public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
41          com.liferay.portlet.imagegallery.model.IGImage igImage)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addIGImage(igImage);
44      }
45  
46      public static com.liferay.portlet.imagegallery.model.IGImage createIGImage(
47          long imageId) {
48          return getService().createIGImage(imageId);
49      }
50  
51      public static void deleteIGImage(long imageId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteIGImage(imageId);
55      }
56  
57      public static void deleteIGImage(
58          com.liferay.portlet.imagegallery.model.IGImage igImage)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteIGImage(igImage);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.imagegallery.model.IGImage getIGImage(
91          long imageId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getIGImage(imageId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getIGImages(start, end);
101     }
102 
103     public static int getIGImagesCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getIGImagesCount();
106     }
107 
108     public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
109         com.liferay.portlet.imagegallery.model.IGImage igImage)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateIGImage(igImage);
112     }
113 
114     public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
115         com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getService().updateIGImage(igImage, merge);
118     }
119 
120     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
121         java.lang.String uuid, long userId, long groupId, long folderId,
122         java.lang.String name, java.lang.String description, java.io.File file,
123         java.lang.String contentType,
124         com.liferay.portal.service.ServiceContext serviceContext)
125         throws com.liferay.portal.kernel.exception.PortalException,
126             com.liferay.portal.kernel.exception.SystemException {
127         return getService()
128                    .addImage(uuid, userId, groupId, folderId, name,
129             description, file, contentType, serviceContext);
130     }
131 
132     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
133         java.lang.String uuid, long userId, long groupId, long folderId,
134         java.lang.String name, java.lang.String description,
135         java.lang.String fileName, byte[] bytes, java.lang.String contentType,
136         com.liferay.portal.service.ServiceContext serviceContext)
137         throws com.liferay.portal.kernel.exception.PortalException,
138             com.liferay.portal.kernel.exception.SystemException {
139         return getService()
140                    .addImage(uuid, userId, groupId, folderId, name,
141             description, fileName, bytes, contentType, serviceContext);
142     }
143 
144     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
145         java.lang.String uuid, long userId, long groupId, long folderId,
146         java.lang.String name, java.lang.String description,
147         java.lang.String fileName, java.io.InputStream is,
148         java.lang.String contentType,
149         com.liferay.portal.service.ServiceContext serviceContext)
150         throws com.liferay.portal.kernel.exception.PortalException,
151             com.liferay.portal.kernel.exception.SystemException {
152         return getService()
153                    .addImage(uuid, userId, groupId, folderId, name,
154             description, fileName, is, contentType, serviceContext);
155     }
156 
157     public static void addImageResources(
158         com.liferay.portlet.imagegallery.model.IGImage image,
159         boolean addCommunityPermissions, boolean addGuestPermissions)
160         throws com.liferay.portal.kernel.exception.PortalException,
161             com.liferay.portal.kernel.exception.SystemException {
162         getService()
163             .addImageResources(image, addCommunityPermissions,
164             addGuestPermissions);
165     }
166 
167     public static void addImageResources(
168         com.liferay.portlet.imagegallery.model.IGImage image,
169         java.lang.String[] communityPermissions,
170         java.lang.String[] guestPermissions)
171         throws com.liferay.portal.kernel.exception.PortalException,
172             com.liferay.portal.kernel.exception.SystemException {
173         getService()
174             .addImageResources(image, communityPermissions, guestPermissions);
175     }
176 
177     public static void addImageResources(long imageId,
178         boolean addCommunityPermissions, boolean addGuestPermissions)
179         throws com.liferay.portal.kernel.exception.PortalException,
180             com.liferay.portal.kernel.exception.SystemException {
181         getService()
182             .addImageResources(imageId, addCommunityPermissions,
183             addGuestPermissions);
184     }
185 
186     public static void addImageResources(long imageId,
187         java.lang.String[] communityPermissions,
188         java.lang.String[] guestPermissions)
189         throws com.liferay.portal.kernel.exception.PortalException,
190             com.liferay.portal.kernel.exception.SystemException {
191         getService()
192             .addImageResources(imageId, communityPermissions, guestPermissions);
193     }
194 
195     public static void deleteImage(
196         com.liferay.portlet.imagegallery.model.IGImage image)
197         throws com.liferay.portal.kernel.exception.PortalException,
198             com.liferay.portal.kernel.exception.SystemException {
199         getService().deleteImage(image);
200     }
201 
202     public static void deleteImage(long imageId)
203         throws com.liferay.portal.kernel.exception.PortalException,
204             com.liferay.portal.kernel.exception.SystemException {
205         getService().deleteImage(imageId);
206     }
207 
208     public static void deleteImages(long groupId, long folderId)
209         throws com.liferay.portal.kernel.exception.PortalException,
210             com.liferay.portal.kernel.exception.SystemException {
211         getService().deleteImages(groupId, folderId);
212     }
213 
214     public static int getFoldersImagesCount(long groupId,
215         java.util.List<Long> folderIds)
216         throws com.liferay.portal.kernel.exception.SystemException {
217         return getService().getFoldersImagesCount(groupId, folderIds);
218     }
219 
220     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
221         long groupId, int start, int end)
222         throws com.liferay.portal.kernel.exception.SystemException {
223         return getService().getGroupImages(groupId, start, end);
224     }
225 
226     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
227         long groupId, long userId, int start, int end)
228         throws com.liferay.portal.kernel.exception.SystemException {
229         return getService().getGroupImages(groupId, userId, start, end);
230     }
231 
232     public static int getGroupImagesCount(long groupId)
233         throws com.liferay.portal.kernel.exception.SystemException {
234         return getService().getGroupImagesCount(groupId);
235     }
236 
237     public static int getGroupImagesCount(long groupId, long userId)
238         throws com.liferay.portal.kernel.exception.SystemException {
239         return getService().getGroupImagesCount(groupId, userId);
240     }
241 
242     public static com.liferay.portlet.imagegallery.model.IGImage getImage(
243         long imageId)
244         throws com.liferay.portal.kernel.exception.PortalException,
245             com.liferay.portal.kernel.exception.SystemException {
246         return getService().getImage(imageId);
247     }
248 
249     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
250         long custom1ImageId)
251         throws com.liferay.portal.kernel.exception.PortalException,
252             com.liferay.portal.kernel.exception.SystemException {
253         return getService().getImageByCustom1ImageId(custom1ImageId);
254     }
255 
256     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
257         long custom2ImageId)
258         throws com.liferay.portal.kernel.exception.PortalException,
259             com.liferay.portal.kernel.exception.SystemException {
260         return getService().getImageByCustom2ImageId(custom2ImageId);
261     }
262 
263     public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
264         long groupId, long folderId, java.lang.String nameWithExtension)
265         throws com.liferay.portal.kernel.exception.PortalException,
266             com.liferay.portal.kernel.exception.SystemException {
267         return getService()
268                    .getImageByFolderIdAndNameWithExtension(groupId, folderId,
269             nameWithExtension);
270     }
271 
272     public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
273         long largeImageId)
274         throws com.liferay.portal.kernel.exception.PortalException,
275             com.liferay.portal.kernel.exception.SystemException {
276         return getService().getImageByLargeImageId(largeImageId);
277     }
278 
279     public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
280         long smallImageId)
281         throws com.liferay.portal.kernel.exception.PortalException,
282             com.liferay.portal.kernel.exception.SystemException {
283         return getService().getImageBySmallImageId(smallImageId);
284     }
285 
286     public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
287         java.lang.String uuid, long groupId)
288         throws com.liferay.portal.kernel.exception.PortalException,
289             com.liferay.portal.kernel.exception.SystemException {
290         return getService().getImageByUuidAndGroupId(uuid, groupId);
291     }
292 
293     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
294         long groupId, long folderId)
295         throws com.liferay.portal.kernel.exception.SystemException {
296         return getService().getImages(groupId, folderId);
297     }
298 
299     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
300         long groupId, long folderId, int start, int end)
301         throws com.liferay.portal.kernel.exception.SystemException {
302         return getService().getImages(groupId, folderId, start, end);
303     }
304 
305     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
306         long groupId, long folderId, int start, int end,
307         com.liferay.portal.kernel.util.OrderByComparator obc)
308         throws com.liferay.portal.kernel.exception.SystemException {
309         return getService().getImages(groupId, folderId, start, end, obc);
310     }
311 
312     public static int getImagesCount(long groupId, long folderId)
313         throws com.liferay.portal.kernel.exception.SystemException {
314         return getService().getImagesCount(groupId, folderId);
315     }
316 
317     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
318         throws com.liferay.portal.kernel.exception.SystemException {
319         return getService().getNoAssetImages();
320     }
321 
322     public static void updateAsset(long userId,
323         com.liferay.portlet.imagegallery.model.IGImage image,
324         long[] assetCategoryIds, java.lang.String[] assetTagNames,
325         java.lang.String contentType)
326         throws com.liferay.portal.kernel.exception.PortalException,
327             com.liferay.portal.kernel.exception.SystemException {
328         getService()
329             .updateAsset(userId, image, assetCategoryIds, assetTagNames,
330             contentType);
331     }
332 
333     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
334         long userId, long imageId, long groupId, long folderId,
335         java.lang.String name, java.lang.String description, byte[] bytes,
336         java.lang.String contentType,
337         com.liferay.portal.service.ServiceContext serviceContext)
338         throws com.liferay.portal.kernel.exception.PortalException,
339             com.liferay.portal.kernel.exception.SystemException {
340         return getService()
341                    .updateImage(userId, imageId, groupId, folderId, name,
342             description, bytes, contentType, serviceContext);
343     }
344 
345     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
346         long userId, long imageId, long groupId, long folderId,
347         java.lang.String name, java.lang.String description, java.io.File file,
348         java.lang.String contentType,
349         com.liferay.portal.service.ServiceContext serviceContext)
350         throws com.liferay.portal.kernel.exception.PortalException,
351             com.liferay.portal.kernel.exception.SystemException {
352         return getService()
353                    .updateImage(userId, imageId, groupId, folderId, name,
354             description, file, contentType, serviceContext);
355     }
356 
357     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
358         long userId, long imageId, long groupId, long folderId,
359         java.lang.String name, java.lang.String description,
360         java.io.InputStream is, java.lang.String contentType,
361         com.liferay.portal.service.ServiceContext serviceContext)
362         throws com.liferay.portal.kernel.exception.PortalException,
363             com.liferay.portal.kernel.exception.SystemException {
364         return getService()
365                    .updateImage(userId, imageId, groupId, folderId, name,
366             description, is, contentType, serviceContext);
367     }
368 
369     public static void updateSmallImage(long smallImageId, long largeImageId)
370         throws com.liferay.portal.kernel.exception.PortalException,
371             com.liferay.portal.kernel.exception.SystemException {
372         getService().updateSmallImage(smallImageId, largeImageId);
373     }
374 
375     public static IGImageLocalService getService() {
376         if (_service == null) {
377             _service = (IGImageLocalService)PortalBeanLocatorUtil.locate(IGImageLocalService.class.getName());
378         }
379 
380         return _service;
381     }
382 
383     public void setService(IGImageLocalService service) {
384         _service = service;
385     }
386 
387     private static IGImageLocalService _service;
388 }