1   /**
2    * Copyright (c) 2000-2009 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.imagegallery.service;
24  
25  
26  /**
27   * <a href="IGImageLocalServiceUtil.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.imagegallery.service.IGImageLocalService</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   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.imagegallery.service.IGImageLocalService
45   *
46   */
47  public class IGImageLocalServiceUtil {
48      public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
49          com.liferay.portlet.imagegallery.model.IGImage igImage)
50          throws com.liferay.portal.SystemException {
51          return getService().addIGImage(igImage);
52      }
53  
54      public static com.liferay.portlet.imagegallery.model.IGImage createIGImage(
55          long imageId) {
56          return getService().createIGImage(imageId);
57      }
58  
59      public static void deleteIGImage(long imageId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteIGImage(imageId);
63      }
64  
65      public static void deleteIGImage(
66          com.liferay.portlet.imagegallery.model.IGImage igImage)
67          throws com.liferay.portal.SystemException {
68          getService().deleteIGImage(igImage);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portlet.imagegallery.model.IGImage getIGImage(
84          long imageId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getIGImage(imageId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getIGImages(start, end);
93      }
94  
95      public static int getIGImagesCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getIGImagesCount();
98      }
99  
100     public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
101         com.liferay.portlet.imagegallery.model.IGImage igImage)
102         throws com.liferay.portal.SystemException {
103         return getService().updateIGImage(igImage);
104     }
105 
106     public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
107         com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
108         throws com.liferay.portal.SystemException {
109         return getService().updateIGImage(igImage, merge);
110     }
111 
112     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
113         long userId, long folderId, java.lang.String name,
114         java.lang.String description, java.io.File file,
115         java.lang.String contentType,
116         com.liferay.portal.service.ServiceContext serviceContext)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException {
119         return getService()
120                    .addImage(userId, folderId, name, description, file,
121             contentType, serviceContext);
122     }
123 
124     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
125         long userId, long folderId, java.lang.String name,
126         java.lang.String description, java.lang.String fileName, byte[] bytes,
127         java.lang.String contentType,
128         com.liferay.portal.service.ServiceContext serviceContext)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         return getService()
132                    .addImage(userId, folderId, name, description, fileName,
133             bytes, contentType, serviceContext);
134     }
135 
136     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
137         long userId, long folderId, java.lang.String name,
138         java.lang.String description, java.lang.String fileName,
139         java.io.InputStream is, java.lang.String contentType,
140         com.liferay.portal.service.ServiceContext serviceContext)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         return getService()
144                    .addImage(userId, folderId, name, description, fileName, is,
145             contentType, serviceContext);
146     }
147 
148     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
149         java.lang.String uuid, long userId, long folderId,
150         java.lang.String name, java.lang.String description, java.io.File file,
151         java.lang.String contentType,
152         com.liferay.portal.service.ServiceContext serviceContext)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         return getService()
156                    .addImage(uuid, userId, folderId, name, description, file,
157             contentType, serviceContext);
158     }
159 
160     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
161         java.lang.String uuid, long userId, long folderId,
162         java.lang.String name, java.lang.String description,
163         java.lang.String fileName, byte[] bytes, java.lang.String contentType,
164         com.liferay.portal.service.ServiceContext serviceContext)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         return getService()
168                    .addImage(uuid, userId, folderId, name, description,
169             fileName, bytes, contentType, serviceContext);
170     }
171 
172     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
173         java.lang.String uuid, long userId, long folderId,
174         java.lang.String name, java.lang.String description,
175         java.lang.String fileName, java.io.InputStream is,
176         java.lang.String contentType,
177         com.liferay.portal.service.ServiceContext serviceContext)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         return getService()
181                    .addImage(uuid, userId, folderId, name, description,
182             fileName, is, contentType, serviceContext);
183     }
184 
185     public static void addImageResources(long imageId,
186         boolean addCommunityPermissions, boolean addGuestPermissions)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         getService()
190             .addImageResources(imageId, addCommunityPermissions,
191             addGuestPermissions);
192     }
193 
194     public static void addImageResources(
195         com.liferay.portlet.imagegallery.model.IGImage image,
196         boolean addCommunityPermissions, boolean addGuestPermissions)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException {
199         getService()
200             .addImageResources(image, addCommunityPermissions,
201             addGuestPermissions);
202     }
203 
204     public static void addImageResources(long imageId,
205         java.lang.String[] communityPermissions,
206         java.lang.String[] guestPermissions)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         getService()
210             .addImageResources(imageId, communityPermissions, guestPermissions);
211     }
212 
213     public static void addImageResources(
214         com.liferay.portlet.imagegallery.model.IGImage image,
215         java.lang.String[] communityPermissions,
216         java.lang.String[] guestPermissions)
217         throws com.liferay.portal.PortalException,
218             com.liferay.portal.SystemException {
219         getService()
220             .addImageResources(image, communityPermissions, guestPermissions);
221     }
222 
223     public static void deleteImage(long imageId)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         getService().deleteImage(imageId);
227     }
228 
229     public static void deleteImage(
230         com.liferay.portlet.imagegallery.model.IGImage image)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException {
233         getService().deleteImage(image);
234     }
235 
236     public static void deleteImages(long folderId)
237         throws com.liferay.portal.PortalException,
238             com.liferay.portal.SystemException {
239         getService().deleteImages(folderId);
240     }
241 
242     public static int getFoldersImagesCount(java.util.List<Long> folderIds)
243         throws com.liferay.portal.SystemException {
244         return getService().getFoldersImagesCount(folderIds);
245     }
246 
247     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
248         long groupId, int start, int end)
249         throws com.liferay.portal.SystemException {
250         return getService().getGroupImages(groupId, start, end);
251     }
252 
253     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
254         long groupId, long userId, int start, int end)
255         throws com.liferay.portal.SystemException {
256         return getService().getGroupImages(groupId, userId, start, end);
257     }
258 
259     public static int getGroupImagesCount(long groupId)
260         throws com.liferay.portal.SystemException {
261         return getService().getGroupImagesCount(groupId);
262     }
263 
264     public static int getGroupImagesCount(long groupId, long userId)
265         throws com.liferay.portal.SystemException {
266         return getService().getGroupImagesCount(groupId, userId);
267     }
268 
269     public static com.liferay.portlet.imagegallery.model.IGImage getImage(
270         long imageId)
271         throws com.liferay.portal.PortalException,
272             com.liferay.portal.SystemException {
273         return getService().getImage(imageId);
274     }
275 
276     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
277         long custom1ImageId)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException {
280         return getService().getImageByCustom1ImageId(custom1ImageId);
281     }
282 
283     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
284         long custom2ImageId)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException {
287         return getService().getImageByCustom2ImageId(custom2ImageId);
288     }
289 
290     public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
291         long folderId, java.lang.String nameWithExtension)
292         throws com.liferay.portal.PortalException,
293             com.liferay.portal.SystemException {
294         return getService()
295                    .getImageByFolderIdAndNameWithExtension(folderId,
296             nameWithExtension);
297     }
298 
299     public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
300         long largeImageId)
301         throws com.liferay.portal.PortalException,
302             com.liferay.portal.SystemException {
303         return getService().getImageByLargeImageId(largeImageId);
304     }
305 
306     public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
307         long smallImageId)
308         throws com.liferay.portal.PortalException,
309             com.liferay.portal.SystemException {
310         return getService().getImageBySmallImageId(smallImageId);
311     }
312 
313     public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
314         java.lang.String uuid, long groupId)
315         throws com.liferay.portal.PortalException,
316             com.liferay.portal.SystemException {
317         return getService().getImageByUuidAndGroupId(uuid, groupId);
318     }
319 
320     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
321         long folderId) throws com.liferay.portal.SystemException {
322         return getService().getImages(folderId);
323     }
324 
325     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
326         long folderId, int start, int end)
327         throws com.liferay.portal.SystemException {
328         return getService().getImages(folderId, start, end);
329     }
330 
331     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
332         long folderId, int start, int end,
333         com.liferay.portal.kernel.util.OrderByComparator obc)
334         throws com.liferay.portal.SystemException {
335         return getService().getImages(folderId, start, end, obc);
336     }
337 
338     public static int getImagesCount(long folderId)
339         throws com.liferay.portal.SystemException {
340         return getService().getImagesCount(folderId);
341     }
342 
343     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
344         throws com.liferay.portal.SystemException {
345         return getService().getNoAssetImages();
346     }
347 
348     public static void reIndex(long imageId)
349         throws com.liferay.portal.SystemException {
350         getService().reIndex(imageId);
351     }
352 
353     public static void reIndex(
354         com.liferay.portlet.imagegallery.model.IGImage image)
355         throws com.liferay.portal.SystemException {
356         getService().reIndex(image);
357     }
358 
359     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
360         long userId, long imageId, long folderId, java.lang.String name,
361         java.lang.String description, byte[] bytes,
362         java.lang.String contentType,
363         com.liferay.portal.service.ServiceContext serviceContext)
364         throws com.liferay.portal.PortalException,
365             com.liferay.portal.SystemException {
366         return getService()
367                    .updateImage(userId, imageId, folderId, name, description,
368             bytes, contentType, serviceContext);
369     }
370 
371     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
372         long userId, long imageId, long folderId, java.lang.String name,
373         java.lang.String description, java.io.File file,
374         java.lang.String contentType,
375         com.liferay.portal.service.ServiceContext serviceContext)
376         throws com.liferay.portal.PortalException,
377             com.liferay.portal.SystemException {
378         return getService()
379                    .updateImage(userId, imageId, folderId, name, description,
380             file, contentType, serviceContext);
381     }
382 
383     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
384         long userId, long imageId, long folderId, java.lang.String name,
385         java.lang.String description, java.io.InputStream is,
386         java.lang.String contentType,
387         com.liferay.portal.service.ServiceContext serviceContext)
388         throws com.liferay.portal.PortalException,
389             com.liferay.portal.SystemException {
390         return getService()
391                    .updateImage(userId, imageId, folderId, name, description,
392             is, contentType, serviceContext);
393     }
394 
395     public static void updateTagsAsset(long userId,
396         com.liferay.portlet.imagegallery.model.IGImage image,
397         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
398         throws com.liferay.portal.PortalException,
399             com.liferay.portal.SystemException {
400         getService().updateTagsAsset(userId, image, tagsCategories, tagsEntries);
401     }
402 
403     public static IGImageLocalService getService() {
404         if (_service == null) {
405             throw new RuntimeException("IGImageLocalService is not set");
406         }
407 
408         return _service;
409     }
410 
411     public void setService(IGImageLocalService service) {
412         _service = service;
413     }
414 
415     private static IGImageLocalService _service;
416 }