1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.imagegallery.service;
21  
22  
23  /**
24   * <a href="IGImageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.imagegallery.service.IGImageLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.imagegallery.service.IGImageLocalService
42   *
43   */
44  public class IGImageLocalServiceUtil {
45      public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
46          com.liferay.portlet.imagegallery.model.IGImage igImage)
47          throws com.liferay.portal.SystemException {
48          return getService().addIGImage(igImage);
49      }
50  
51      public static com.liferay.portlet.imagegallery.model.IGImage createIGImage(
52          long imageId) {
53          return getService().createIGImage(imageId);
54      }
55  
56      public static void deleteIGImage(long imageId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteIGImage(imageId);
60      }
61  
62      public static void deleteIGImage(
63          com.liferay.portlet.imagegallery.model.IGImage igImage)
64          throws com.liferay.portal.SystemException {
65          getService().deleteIGImage(igImage);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.imagegallery.model.IGImage getIGImage(
81          long imageId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getIGImage(imageId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getIGImages(start, end);
90      }
91  
92      public static int getIGImagesCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getIGImagesCount();
95      }
96  
97      public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
98          com.liferay.portlet.imagegallery.model.IGImage igImage)
99          throws com.liferay.portal.SystemException {
100         return getService().updateIGImage(igImage);
101     }
102 
103     public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
104         com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
105         throws com.liferay.portal.SystemException {
106         return getService().updateIGImage(igImage, merge);
107     }
108 
109     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
110         long userId, long folderId, java.lang.String name,
111         java.lang.String description, java.io.File file,
112         java.lang.String contentType,
113         com.liferay.portal.service.ServiceContext serviceContext)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         return getService()
117                    .addImage(userId, folderId, name, description, file,
118             contentType, serviceContext);
119     }
120 
121     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
122         long userId, long folderId, java.lang.String name,
123         java.lang.String description, java.lang.String fileName, byte[] bytes,
124         java.lang.String contentType,
125         com.liferay.portal.service.ServiceContext serviceContext)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .addImage(userId, folderId, name, description, fileName,
130             bytes, contentType, serviceContext);
131     }
132 
133     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
134         long userId, long folderId, java.lang.String name,
135         java.lang.String description, java.lang.String fileName,
136         java.io.InputStream is, java.lang.String contentType,
137         com.liferay.portal.service.ServiceContext serviceContext)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         return getService()
141                    .addImage(userId, folderId, name, description, fileName, is,
142             contentType, serviceContext);
143     }
144 
145     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
146         java.lang.String uuid, long userId, long folderId,
147         java.lang.String name, java.lang.String description, java.io.File file,
148         java.lang.String contentType,
149         com.liferay.portal.service.ServiceContext serviceContext)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException {
152         return getService()
153                    .addImage(uuid, userId, folderId, name, description, file,
154             contentType, serviceContext);
155     }
156 
157     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
158         java.lang.String uuid, long userId, long folderId,
159         java.lang.String name, java.lang.String description,
160         java.lang.String fileName, byte[] bytes, java.lang.String contentType,
161         com.liferay.portal.service.ServiceContext serviceContext)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         return getService()
165                    .addImage(uuid, userId, folderId, name, description,
166             fileName, bytes, contentType, serviceContext);
167     }
168 
169     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
170         java.lang.String uuid, long userId, long folderId,
171         java.lang.String name, java.lang.String description,
172         java.lang.String fileName, java.io.InputStream is,
173         java.lang.String contentType,
174         com.liferay.portal.service.ServiceContext serviceContext)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         return getService()
178                    .addImage(uuid, userId, folderId, name, description,
179             fileName, is, contentType, serviceContext);
180     }
181 
182     public static void addImageResources(long imageId,
183         boolean addCommunityPermissions, boolean addGuestPermissions)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         getService()
187             .addImageResources(imageId, addCommunityPermissions,
188             addGuestPermissions);
189     }
190 
191     public static void addImageResources(
192         com.liferay.portlet.imagegallery.model.IGImage image,
193         boolean addCommunityPermissions, boolean addGuestPermissions)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         getService()
197             .addImageResources(image, addCommunityPermissions,
198             addGuestPermissions);
199     }
200 
201     public static void addImageResources(long imageId,
202         java.lang.String[] communityPermissions,
203         java.lang.String[] guestPermissions)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         getService()
207             .addImageResources(imageId, communityPermissions, guestPermissions);
208     }
209 
210     public static void addImageResources(
211         com.liferay.portlet.imagegallery.model.IGImage image,
212         java.lang.String[] communityPermissions,
213         java.lang.String[] guestPermissions)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException {
216         getService()
217             .addImageResources(image, communityPermissions, guestPermissions);
218     }
219 
220     public static void deleteImage(long imageId)
221         throws com.liferay.portal.PortalException,
222             com.liferay.portal.SystemException {
223         getService().deleteImage(imageId);
224     }
225 
226     public static void deleteImage(
227         com.liferay.portlet.imagegallery.model.IGImage image)
228         throws com.liferay.portal.PortalException,
229             com.liferay.portal.SystemException {
230         getService().deleteImage(image);
231     }
232 
233     public static void deleteImages(long folderId)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException {
236         getService().deleteImages(folderId);
237     }
238 
239     public static int getFoldersImagesCount(java.util.List<Long> folderIds)
240         throws com.liferay.portal.SystemException {
241         return getService().getFoldersImagesCount(folderIds);
242     }
243 
244     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
245         long groupId, int start, int end)
246         throws com.liferay.portal.SystemException {
247         return getService().getGroupImages(groupId, start, end);
248     }
249 
250     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
251         long groupId, long userId, int start, int end)
252         throws com.liferay.portal.SystemException {
253         return getService().getGroupImages(groupId, userId, start, end);
254     }
255 
256     public static int getGroupImagesCount(long groupId)
257         throws com.liferay.portal.SystemException {
258         return getService().getGroupImagesCount(groupId);
259     }
260 
261     public static int getGroupImagesCount(long groupId, long userId)
262         throws com.liferay.portal.SystemException {
263         return getService().getGroupImagesCount(groupId, userId);
264     }
265 
266     public static com.liferay.portlet.imagegallery.model.IGImage getImage(
267         long imageId)
268         throws com.liferay.portal.PortalException,
269             com.liferay.portal.SystemException {
270         return getService().getImage(imageId);
271     }
272 
273     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
274         long custom1ImageId)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException {
277         return getService().getImageByCustom1ImageId(custom1ImageId);
278     }
279 
280     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
281         long custom2ImageId)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException {
284         return getService().getImageByCustom2ImageId(custom2ImageId);
285     }
286 
287     public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
288         long folderId, java.lang.String nameWithExtension)
289         throws com.liferay.portal.PortalException,
290             com.liferay.portal.SystemException {
291         return getService()
292                    .getImageByFolderIdAndNameWithExtension(folderId,
293             nameWithExtension);
294     }
295 
296     public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
297         long largeImageId)
298         throws com.liferay.portal.PortalException,
299             com.liferay.portal.SystemException {
300         return getService().getImageByLargeImageId(largeImageId);
301     }
302 
303     public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
304         long smallImageId)
305         throws com.liferay.portal.PortalException,
306             com.liferay.portal.SystemException {
307         return getService().getImageBySmallImageId(smallImageId);
308     }
309 
310     public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
311         java.lang.String uuid, long groupId)
312         throws com.liferay.portal.PortalException,
313             com.liferay.portal.SystemException {
314         return getService().getImageByUuidAndGroupId(uuid, groupId);
315     }
316 
317     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
318         long folderId) throws com.liferay.portal.SystemException {
319         return getService().getImages(folderId);
320     }
321 
322     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
323         long folderId, int start, int end)
324         throws com.liferay.portal.SystemException {
325         return getService().getImages(folderId, start, end);
326     }
327 
328     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
329         long folderId, int start, int end,
330         com.liferay.portal.kernel.util.OrderByComparator obc)
331         throws com.liferay.portal.SystemException {
332         return getService().getImages(folderId, start, end, obc);
333     }
334 
335     public static int getImagesCount(long folderId)
336         throws com.liferay.portal.SystemException {
337         return getService().getImagesCount(folderId);
338     }
339 
340     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
341         throws com.liferay.portal.SystemException {
342         return getService().getNoAssetImages();
343     }
344 
345     public static void reIndex(long imageId)
346         throws com.liferay.portal.SystemException {
347         getService().reIndex(imageId);
348     }
349 
350     public static void reIndex(
351         com.liferay.portlet.imagegallery.model.IGImage image)
352         throws com.liferay.portal.SystemException {
353         getService().reIndex(image);
354     }
355 
356     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
357         long userId, long imageId, long folderId, java.lang.String name,
358         java.lang.String description, byte[] bytes,
359         java.lang.String contentType,
360         com.liferay.portal.service.ServiceContext serviceContext)
361         throws com.liferay.portal.PortalException,
362             com.liferay.portal.SystemException {
363         return getService()
364                    .updateImage(userId, imageId, folderId, name, description,
365             bytes, contentType, serviceContext);
366     }
367 
368     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
369         long userId, long imageId, long folderId, java.lang.String name,
370         java.lang.String description, java.io.File file,
371         java.lang.String contentType,
372         com.liferay.portal.service.ServiceContext serviceContext)
373         throws com.liferay.portal.PortalException,
374             com.liferay.portal.SystemException {
375         return getService()
376                    .updateImage(userId, imageId, folderId, name, description,
377             file, contentType, serviceContext);
378     }
379 
380     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
381         long userId, long imageId, long folderId, java.lang.String name,
382         java.lang.String description, java.io.InputStream is,
383         java.lang.String contentType,
384         com.liferay.portal.service.ServiceContext serviceContext)
385         throws com.liferay.portal.PortalException,
386             com.liferay.portal.SystemException {
387         return getService()
388                    .updateImage(userId, imageId, folderId, name, description,
389             is, contentType, serviceContext);
390     }
391 
392     public static void updateTagsAsset(long userId,
393         com.liferay.portlet.imagegallery.model.IGImage image,
394         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
395         throws com.liferay.portal.PortalException,
396             com.liferay.portal.SystemException {
397         getService().updateTagsAsset(userId, image, tagsCategories, tagsEntries);
398     }
399 
400     public static IGImageLocalService getService() {
401         if (_service == null) {
402             throw new RuntimeException("IGImageLocalService is not set");
403         }
404 
405         return _service;
406     }
407 
408     public void setService(IGImageLocalService service) {
409         _service = service;
410     }
411 
412     private static IGImageLocalService _service;
413 }