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, java.lang.String[] tagsEntries,
113         boolean addCommunityPermissions, boolean addGuestPermissions)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         return getService()
117                    .addImage(userId, folderId, name, description, file,
118             contentType, tagsEntries, addCommunityPermissions,
119             addGuestPermissions);
120     }
121 
122     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
123         java.lang.String uuid, long userId, long folderId,
124         java.lang.String name, java.lang.String description, java.io.File file,
125         java.lang.String contentType, java.lang.String[] tagsEntries,
126         boolean addCommunityPermissions, boolean addGuestPermissions)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService()
130                    .addImage(uuid, userId, folderId, name, description, file,
131             contentType, tagsEntries, addCommunityPermissions,
132             addGuestPermissions);
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.io.File file,
138         java.lang.String contentType, java.lang.String[] tagsEntries,
139         java.lang.String[] communityPermissions,
140         java.lang.String[] guestPermissions)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         return getService()
144                    .addImage(userId, folderId, name, description, file,
145             contentType, tagsEntries, communityPermissions, guestPermissions);
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, java.lang.String[] tagsEntries,
152         java.lang.Boolean addCommunityPermissions,
153         java.lang.Boolean addGuestPermissions,
154         java.lang.String[] communityPermissions,
155         java.lang.String[] guestPermissions)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException {
158         return getService()
159                    .addImage(uuid, userId, folderId, name, description, file,
160             contentType, tagsEntries, addCommunityPermissions,
161             addGuestPermissions, communityPermissions, guestPermissions);
162     }
163 
164     public static void addImageResources(long imageId,
165         boolean addCommunityPermissions, boolean addGuestPermissions)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         getService()
169             .addImageResources(imageId, addCommunityPermissions,
170             addGuestPermissions);
171     }
172 
173     public static void addImageResources(
174         com.liferay.portlet.imagegallery.model.IGImage image,
175         boolean addCommunityPermissions, boolean addGuestPermissions)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         getService()
179             .addImageResources(image, addCommunityPermissions,
180             addGuestPermissions);
181     }
182 
183     public static void addImageResources(long imageId,
184         java.lang.String[] communityPermissions,
185         java.lang.String[] guestPermissions)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         getService()
189             .addImageResources(imageId, communityPermissions, guestPermissions);
190     }
191 
192     public static void addImageResources(
193         com.liferay.portlet.imagegallery.model.IGImage image,
194         java.lang.String[] communityPermissions,
195         java.lang.String[] guestPermissions)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException {
198         getService()
199             .addImageResources(image, communityPermissions, guestPermissions);
200     }
201 
202     public static void deleteImage(long imageId)
203         throws com.liferay.portal.PortalException,
204             com.liferay.portal.SystemException {
205         getService().deleteImage(imageId);
206     }
207 
208     public static void deleteImage(
209         com.liferay.portlet.imagegallery.model.IGImage image)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException {
212         getService().deleteImage(image);
213     }
214 
215     public static void deleteImages(long folderId)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         getService().deleteImages(folderId);
219     }
220 
221     public static int getFoldersImagesCount(java.util.List<Long> folderIds)
222         throws com.liferay.portal.SystemException {
223         return getService().getFoldersImagesCount(folderIds);
224     }
225 
226     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
227         long groupId, int start, int end)
228         throws com.liferay.portal.SystemException {
229         return getService().getGroupImages(groupId, start, end);
230     }
231 
232     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
233         long groupId, long userId, int start, int end)
234         throws com.liferay.portal.SystemException {
235         return getService().getGroupImages(groupId, userId, start, end);
236     }
237 
238     public static int getGroupImagesCount(long groupId)
239         throws com.liferay.portal.SystemException {
240         return getService().getGroupImagesCount(groupId);
241     }
242 
243     public static int getGroupImagesCount(long groupId, long userId)
244         throws com.liferay.portal.SystemException {
245         return getService().getGroupImagesCount(groupId, userId);
246     }
247 
248     public static com.liferay.portlet.imagegallery.model.IGImage getImage(
249         long imageId)
250         throws com.liferay.portal.PortalException,
251             com.liferay.portal.SystemException {
252         return getService().getImage(imageId);
253     }
254 
255     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
256         long custom1ImageId)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException {
259         return getService().getImageByCustom1ImageId(custom1ImageId);
260     }
261 
262     public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
263         long custom2ImageId)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         return getService().getImageByCustom2ImageId(custom2ImageId);
267     }
268 
269     public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
270         long folderId, java.lang.String nameWithExtension)
271         throws com.liferay.portal.PortalException,
272             com.liferay.portal.SystemException {
273         return getService()
274                    .getImageByFolderIdAndNameWithExtension(folderId,
275             nameWithExtension);
276     }
277 
278     public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
279         long largeImageId)
280         throws com.liferay.portal.PortalException,
281             com.liferay.portal.SystemException {
282         return getService().getImageByLargeImageId(largeImageId);
283     }
284 
285     public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
286         long smallImageId)
287         throws com.liferay.portal.PortalException,
288             com.liferay.portal.SystemException {
289         return getService().getImageBySmallImageId(smallImageId);
290     }
291 
292     public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
293         java.lang.String uuid, long groupId)
294         throws com.liferay.portal.PortalException,
295             com.liferay.portal.SystemException {
296         return getService().getImageByUuidAndGroupId(uuid, groupId);
297     }
298 
299     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
300         long folderId) throws com.liferay.portal.SystemException {
301         return getService().getImages(folderId);
302     }
303 
304     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
305         long folderId, int start, int end)
306         throws com.liferay.portal.SystemException {
307         return getService().getImages(folderId, start, end);
308     }
309 
310     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
311         long folderId, int start, int end,
312         com.liferay.portal.kernel.util.OrderByComparator obc)
313         throws com.liferay.portal.SystemException {
314         return getService().getImages(folderId, start, end, obc);
315     }
316 
317     public static int getImagesCount(long folderId)
318         throws com.liferay.portal.SystemException {
319         return getService().getImagesCount(folderId);
320     }
321 
322     public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
323         throws com.liferay.portal.SystemException {
324         return getService().getNoAssetImages();
325     }
326 
327     public static void reIndex(long imageId)
328         throws com.liferay.portal.SystemException {
329         getService().reIndex(imageId);
330     }
331 
332     public static void reIndex(
333         com.liferay.portlet.imagegallery.model.IGImage image)
334         throws com.liferay.portal.SystemException {
335         getService().reIndex(image);
336     }
337 
338     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
339         long userId, long imageId, long folderId, java.lang.String name,
340         java.lang.String description, java.io.File file,
341         java.lang.String contentType, java.lang.String[] tagsEntries)
342         throws com.liferay.portal.PortalException,
343             com.liferay.portal.SystemException {
344         return getService()
345                    .updateImage(userId, imageId, folderId, name, description,
346             file, contentType, tagsEntries);
347     }
348 
349     public static void updateTagsAsset(long userId,
350         com.liferay.portlet.imagegallery.model.IGImage image,
351         java.lang.String[] tagsEntries)
352         throws com.liferay.portal.PortalException,
353             com.liferay.portal.SystemException {
354         getService().updateTagsAsset(userId, image, tagsEntries);
355     }
356 
357     public static IGImageLocalService getService() {
358         if (_service == null) {
359             throw new RuntimeException("IGImageLocalService is not set");
360         }
361 
362         return _service;
363     }
364 
365     public void setService(IGImageLocalService service) {
366         _service = service;
367     }
368 
369     private static IGImageLocalService _service;
370 }