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