1   /**
2    * Copyright (c) 2000-2007 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   * <a href="IGImageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.imagegallery.service.IGImageLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.imagegallery.service.IGImageLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.imagegallery.service.IGImageLocalService
48   * @see com.liferay.portlet.imagegallery.service.IGImageLocalServiceFactory
49   *
50   */
51  public class IGImageLocalServiceUtil {
52      public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
53          com.liferay.portlet.imagegallery.model.IGImage model)
54          throws com.liferay.portal.SystemException {
55          IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
56  
57          return igImageLocalService.addIGImage(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
64  
65          return igImageLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
72  
73          return igImageLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
77          com.liferay.portlet.imagegallery.model.IGImage model)
78          throws com.liferay.portal.SystemException {
79          IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
80  
81          return igImageLocalService.updateIGImage(model);
82      }
83  
84      public static com.liferay.portlet.imagegallery.model.IGImage addImage(
85          long userId, long folderId, java.lang.String description,
86          java.io.File file, java.lang.String contentType,
87          java.lang.String[] tagsEntries, boolean addCommunityPermissions,
88          boolean addGuestPermissions)
89          throws com.liferay.portal.PortalException, 
90              com.liferay.portal.SystemException {
91          IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
92  
93          return igImageLocalService.addImage(userId, folderId, description,
94              file, contentType, tagsEntries, addCommunityPermissions,
95              addGuestPermissions);
96      }
97  
98      public static com.liferay.portlet.imagegallery.model.IGImage addImage(
99          long userId, long folderId, java.lang.String description,
100         java.io.File file, java.lang.String contentType,
101         java.lang.String[] tagsEntries,
102         java.lang.String[] communityPermissions,
103         java.lang.String[] guestPermissions)
104         throws com.liferay.portal.PortalException, 
105             com.liferay.portal.SystemException {
106         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
107 
108         return igImageLocalService.addImage(userId, folderId, description,
109             file, contentType, tagsEntries, communityPermissions,
110             guestPermissions);
111     }
112 
113     public static com.liferay.portlet.imagegallery.model.IGImage addImage(
114         long userId, long folderId, java.lang.String description,
115         java.io.File file, java.lang.String contentType,
116         java.lang.String[] tagsEntries,
117         java.lang.Boolean addCommunityPermissions,
118         java.lang.Boolean addGuestPermissions,
119         java.lang.String[] communityPermissions,
120         java.lang.String[] guestPermissions)
121         throws com.liferay.portal.PortalException, 
122             com.liferay.portal.SystemException {
123         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
124 
125         return igImageLocalService.addImage(userId, folderId, description,
126             file, contentType, tagsEntries, addCommunityPermissions,
127             addGuestPermissions, communityPermissions, guestPermissions);
128     }
129 
130     public static void addImageResources(long folderId, long imageId,
131         boolean addCommunityPermissions, boolean addGuestPermissions)
132         throws com.liferay.portal.PortalException, 
133             com.liferay.portal.SystemException {
134         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
135         igImageLocalService.addImageResources(folderId, imageId,
136             addCommunityPermissions, addGuestPermissions);
137     }
138 
139     public static void addImageResources(
140         com.liferay.portlet.imagegallery.model.IGFolder folder,
141         com.liferay.portlet.imagegallery.model.IGImage image,
142         boolean addCommunityPermissions, boolean addGuestPermissions)
143         throws com.liferay.portal.PortalException, 
144             com.liferay.portal.SystemException {
145         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
146         igImageLocalService.addImageResources(folder, image,
147             addCommunityPermissions, addGuestPermissions);
148     }
149 
150     public static void addImageResources(long folderId, long imageId,
151         java.lang.String[] communityPermissions,
152         java.lang.String[] guestPermissions)
153         throws com.liferay.portal.PortalException, 
154             com.liferay.portal.SystemException {
155         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
156         igImageLocalService.addImageResources(folderId, imageId,
157             communityPermissions, guestPermissions);
158     }
159 
160     public static void addImageResources(
161         com.liferay.portlet.imagegallery.model.IGFolder folder,
162         com.liferay.portlet.imagegallery.model.IGImage image,
163         java.lang.String[] communityPermissions,
164         java.lang.String[] guestPermissions)
165         throws com.liferay.portal.PortalException, 
166             com.liferay.portal.SystemException {
167         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
168         igImageLocalService.addImageResources(folder, image,
169             communityPermissions, guestPermissions);
170     }
171 
172     public static void deleteImage(long imageId)
173         throws com.liferay.portal.PortalException, 
174             com.liferay.portal.SystemException {
175         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
176         igImageLocalService.deleteImage(imageId);
177     }
178 
179     public static void deleteImage(
180         com.liferay.portlet.imagegallery.model.IGImage image)
181         throws com.liferay.portal.PortalException, 
182             com.liferay.portal.SystemException {
183         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
184         igImageLocalService.deleteImage(image);
185     }
186 
187     public static void deleteImages(long folderId)
188         throws com.liferay.portal.PortalException, 
189             com.liferay.portal.SystemException {
190         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
191         igImageLocalService.deleteImages(folderId);
192     }
193 
194     public static int getFoldersImagesCount(java.util.List folderIds)
195         throws com.liferay.portal.SystemException {
196         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
197 
198         return igImageLocalService.getFoldersImagesCount(folderIds);
199     }
200 
201     public static java.util.List getGroupImages(long groupId, int begin, int end)
202         throws com.liferay.portal.SystemException {
203         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
204 
205         return igImageLocalService.getGroupImages(groupId, begin, end);
206     }
207 
208     public static java.util.List getGroupImages(long groupId, long userId,
209         int begin, int end) throws com.liferay.portal.SystemException {
210         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
211 
212         return igImageLocalService.getGroupImages(groupId, userId, begin, end);
213     }
214 
215     public static int getGroupImagesCount(long groupId)
216         throws com.liferay.portal.SystemException {
217         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
218 
219         return igImageLocalService.getGroupImagesCount(groupId);
220     }
221 
222     public static int getGroupImagesCount(long groupId, long userId)
223         throws com.liferay.portal.SystemException {
224         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
225 
226         return igImageLocalService.getGroupImagesCount(groupId, userId);
227     }
228 
229     public static com.liferay.portlet.imagegallery.model.IGImage getImage(
230         long imageId)
231         throws com.liferay.portal.PortalException, 
232             com.liferay.portal.SystemException {
233         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
234 
235         return igImageLocalService.getImage(imageId);
236     }
237 
238     public static java.util.List getImages(long folderId)
239         throws com.liferay.portal.SystemException {
240         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
241 
242         return igImageLocalService.getImages(folderId);
243     }
244 
245     public static java.util.List getImages(long folderId, int begin, int end)
246         throws com.liferay.portal.SystemException {
247         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
248 
249         return igImageLocalService.getImages(folderId, begin, end);
250     }
251 
252     public static java.util.List getImages(long folderId, int begin, int end,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.SystemException {
255         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
256 
257         return igImageLocalService.getImages(folderId, begin, end, obc);
258     }
259 
260     public static int getImagesCount(long folderId)
261         throws com.liferay.portal.SystemException {
262         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
263 
264         return igImageLocalService.getImagesCount(folderId);
265     }
266 
267     public static java.util.List getNoAssetImages()
268         throws com.liferay.portal.SystemException {
269         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
270 
271         return igImageLocalService.getNoAssetImages();
272     }
273 
274     public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
275         long userId, long imageId, long folderId, java.lang.String description,
276         java.io.File file, java.lang.String contentType,
277         java.lang.String[] tagsEntries)
278         throws com.liferay.portal.PortalException, 
279             com.liferay.portal.SystemException {
280         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
281 
282         return igImageLocalService.updateImage(userId, imageId, folderId,
283             description, file, contentType, tagsEntries);
284     }
285 
286     public static void updateTagsAsset(long userId,
287         com.liferay.portlet.imagegallery.model.IGImage image,
288         java.lang.String[] tagsEntries)
289         throws com.liferay.portal.PortalException, 
290             com.liferay.portal.SystemException {
291         IGImageLocalService igImageLocalService = IGImageLocalServiceFactory.getService();
292         igImageLocalService.updateTagsAsset(userId, image, tagsEntries);
293     }
294 }