001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.imagegallery.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link IGImageLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       IGImageLocalService
030     * @generated
031     */
032    public class IGImageLocalServiceUtil {
033            public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
034                    com.liferay.portlet.imagegallery.model.IGImage igImage)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addIGImage(igImage);
037            }
038    
039            public static com.liferay.portlet.imagegallery.model.IGImage createIGImage(
040                    long imageId) {
041                    return getService().createIGImage(imageId);
042            }
043    
044            public static void deleteIGImage(long imageId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteIGImage(imageId);
048            }
049    
050            public static void deleteIGImage(
051                    com.liferay.portlet.imagegallery.model.IGImage igImage)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteIGImage(igImage);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.imagegallery.model.IGImage getIGImage(
087                    long imageId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getIGImage(imageId);
091            }
092    
093            public static com.liferay.portlet.imagegallery.model.IGImage getIGImageByUuidAndGroupId(
094                    java.lang.String uuid, long groupId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getIGImageByUuidAndGroupId(uuid, groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
101                    int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getIGImages(start, end);
104            }
105    
106            public static int getIGImagesCount()
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getIGImagesCount();
109            }
110    
111            public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
112                    com.liferay.portlet.imagegallery.model.IGImage igImage)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateIGImage(igImage);
115            }
116    
117            public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
118                    com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
119                    throws com.liferay.portal.kernel.exception.SystemException {
120                    return getService().updateIGImage(igImage, merge);
121            }
122    
123            public static com.liferay.portlet.imagegallery.model.IGImage addImage(
124                    long userId, long groupId, long folderId, java.lang.String name,
125                    java.lang.String description, java.io.File file,
126                    java.lang.String contentType,
127                    com.liferay.portal.service.ServiceContext serviceContext)
128                    throws com.liferay.portal.kernel.exception.PortalException,
129                            com.liferay.portal.kernel.exception.SystemException {
130                    return getService()
131                                       .addImage(userId, groupId, folderId, name, description,
132                            file, contentType, serviceContext);
133            }
134    
135            public static com.liferay.portlet.imagegallery.model.IGImage addImage(
136                    long userId, long groupId, long folderId, java.lang.String name,
137                    java.lang.String description, java.lang.String fileName, byte[] bytes,
138                    java.lang.String contentType,
139                    com.liferay.portal.service.ServiceContext serviceContext)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException {
142                    return getService()
143                                       .addImage(userId, groupId, folderId, name, description,
144                            fileName, bytes, contentType, serviceContext);
145            }
146    
147            public static com.liferay.portlet.imagegallery.model.IGImage addImage(
148                    long userId, long groupId, long folderId, java.lang.String name,
149                    java.lang.String description, java.lang.String fileName,
150                    java.io.InputStream is, java.lang.String contentType,
151                    com.liferay.portal.service.ServiceContext serviceContext)
152                    throws com.liferay.portal.kernel.exception.PortalException,
153                            com.liferay.portal.kernel.exception.SystemException {
154                    return getService()
155                                       .addImage(userId, groupId, folderId, name, description,
156                            fileName, is, contentType, serviceContext);
157            }
158    
159            public static void addImageResources(
160                    com.liferay.portlet.imagegallery.model.IGImage image,
161                    boolean addCommunityPermissions, boolean addGuestPermissions)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException {
164                    getService()
165                            .addImageResources(image, addCommunityPermissions,
166                            addGuestPermissions);
167            }
168    
169            public static void addImageResources(
170                    com.liferay.portlet.imagegallery.model.IGImage image,
171                    java.lang.String[] communityPermissions,
172                    java.lang.String[] guestPermissions)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    getService()
176                            .addImageResources(image, communityPermissions, guestPermissions);
177            }
178    
179            public static void addImageResources(long imageId,
180                    boolean addCommunityPermissions, boolean addGuestPermissions)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    getService()
184                            .addImageResources(imageId, addCommunityPermissions,
185                            addGuestPermissions);
186            }
187    
188            public static void addImageResources(long imageId,
189                    java.lang.String[] communityPermissions,
190                    java.lang.String[] guestPermissions)
191                    throws com.liferay.portal.kernel.exception.PortalException,
192                            com.liferay.portal.kernel.exception.SystemException {
193                    getService()
194                            .addImageResources(imageId, communityPermissions, guestPermissions);
195            }
196    
197            public static void deleteImage(
198                    com.liferay.portlet.imagegallery.model.IGImage image)
199                    throws com.liferay.portal.kernel.exception.PortalException,
200                            com.liferay.portal.kernel.exception.SystemException {
201                    getService().deleteImage(image);
202            }
203    
204            public static void deleteImage(long imageId)
205                    throws com.liferay.portal.kernel.exception.PortalException,
206                            com.liferay.portal.kernel.exception.SystemException {
207                    getService().deleteImage(imageId);
208            }
209    
210            public static void deleteImages(long groupId, long folderId)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    getService().deleteImages(groupId, folderId);
214            }
215    
216            public static int getFoldersImagesCount(long groupId,
217                    java.util.List<java.lang.Long> folderIds)
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return getService().getFoldersImagesCount(groupId, folderIds);
220            }
221    
222            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
223                    long groupId, int start, int end)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getService().getGroupImages(groupId, start, end);
226            }
227    
228            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
229                    long groupId, long userId, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getService().getGroupImages(groupId, userId, start, end);
232            }
233    
234            public static int getGroupImagesCount(long groupId)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    return getService().getGroupImagesCount(groupId);
237            }
238    
239            public static int getGroupImagesCount(long groupId, long userId)
240                    throws com.liferay.portal.kernel.exception.SystemException {
241                    return getService().getGroupImagesCount(groupId, userId);
242            }
243    
244            public static com.liferay.portlet.imagegallery.model.IGImage getImage(
245                    long imageId)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException {
248                    return getService().getImage(imageId);
249            }
250    
251            public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
252                    long custom1ImageId)
253                    throws com.liferay.portal.kernel.exception.PortalException,
254                            com.liferay.portal.kernel.exception.SystemException {
255                    return getService().getImageByCustom1ImageId(custom1ImageId);
256            }
257    
258            public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
259                    long custom2ImageId)
260                    throws com.liferay.portal.kernel.exception.PortalException,
261                            com.liferay.portal.kernel.exception.SystemException {
262                    return getService().getImageByCustom2ImageId(custom2ImageId);
263            }
264    
265            public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
266                    long groupId, long folderId, java.lang.String nameWithExtension)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    return getService()
270                                       .getImageByFolderIdAndNameWithExtension(groupId, folderId,
271                            nameWithExtension);
272            }
273    
274            public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
275                    long largeImageId)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException {
278                    return getService().getImageByLargeImageId(largeImageId);
279            }
280    
281            public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
282                    long smallImageId)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return getService().getImageBySmallImageId(smallImageId);
286            }
287    
288            public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
289                    java.lang.String uuid, long groupId)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    return getService().getImageByUuidAndGroupId(uuid, groupId);
293            }
294    
295            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
296                    long groupId, long folderId)
297                    throws com.liferay.portal.kernel.exception.SystemException {
298                    return getService().getImages(groupId, folderId);
299            }
300    
301            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
302                    long groupId, long folderId, int start, int end)
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    return getService().getImages(groupId, folderId, start, end);
305            }
306    
307            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
308                    long groupId, long folderId, int start, int end,
309                    com.liferay.portal.kernel.util.OrderByComparator obc)
310                    throws com.liferay.portal.kernel.exception.SystemException {
311                    return getService().getImages(groupId, folderId, start, end, obc);
312            }
313    
314            public static int getImagesCount(long groupId, long folderId)
315                    throws com.liferay.portal.kernel.exception.SystemException {
316                    return getService().getImagesCount(groupId, folderId);
317            }
318    
319            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    return getService().getNoAssetImages();
322            }
323    
324            public static void updateAsset(long userId,
325                    com.liferay.portlet.imagegallery.model.IGImage image,
326                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
327                    java.lang.String contentType)
328                    throws com.liferay.portal.kernel.exception.PortalException,
329                            com.liferay.portal.kernel.exception.SystemException {
330                    getService()
331                            .updateAsset(userId, image, assetCategoryIds, assetTagNames,
332                            contentType);
333            }
334    
335            public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
336                    long userId, long imageId, long groupId, long folderId,
337                    java.lang.String name, java.lang.String description, byte[] bytes,
338                    java.lang.String contentType,
339                    com.liferay.portal.service.ServiceContext serviceContext)
340                    throws com.liferay.portal.kernel.exception.PortalException,
341                            com.liferay.portal.kernel.exception.SystemException {
342                    return getService()
343                                       .updateImage(userId, imageId, groupId, folderId, name,
344                            description, bytes, contentType, serviceContext);
345            }
346    
347            public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
348                    long userId, long imageId, long groupId, long folderId,
349                    java.lang.String name, java.lang.String description, java.io.File file,
350                    java.lang.String contentType,
351                    com.liferay.portal.service.ServiceContext serviceContext)
352                    throws com.liferay.portal.kernel.exception.PortalException,
353                            com.liferay.portal.kernel.exception.SystemException {
354                    return getService()
355                                       .updateImage(userId, imageId, groupId, folderId, name,
356                            description, file, contentType, serviceContext);
357            }
358    
359            public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
360                    long userId, long imageId, long groupId, long folderId,
361                    java.lang.String name, java.lang.String description,
362                    java.io.InputStream is, java.lang.String contentType,
363                    com.liferay.portal.service.ServiceContext serviceContext)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException {
366                    return getService()
367                                       .updateImage(userId, imageId, groupId, folderId, name,
368                            description, is, contentType, serviceContext);
369            }
370    
371            public static void updateSmallImage(long smallImageId, long largeImageId)
372                    throws com.liferay.portal.kernel.exception.PortalException,
373                            com.liferay.portal.kernel.exception.SystemException {
374                    getService().updateSmallImage(smallImageId, largeImageId);
375            }
376    
377            public static IGImageLocalService getService() {
378                    if (_service == null) {
379                            _service = (IGImageLocalService)PortalBeanLocatorUtil.locate(IGImageLocalService.class.getName());
380                    }
381    
382                    return _service;
383            }
384    
385            public void setService(IGImageLocalService service) {
386                    _service = service;
387            }
388    
389            private static IGImageLocalService _service;
390    }