1
22
23 package com.liferay.portlet.imagegallery.service;
24
25 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26
27
47 public class IGImageLocalServiceUtil {
48 public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
49 com.liferay.portlet.imagegallery.model.IGImage igImage)
50 throws com.liferay.portal.SystemException {
51 return getService().addIGImage(igImage);
52 }
53
54 public static com.liferay.portlet.imagegallery.model.IGImage createIGImage(
55 long imageId) {
56 return getService().createIGImage(imageId);
57 }
58
59 public static void deleteIGImage(long imageId)
60 throws com.liferay.portal.PortalException,
61 com.liferay.portal.SystemException {
62 getService().deleteIGImage(imageId);
63 }
64
65 public static void deleteIGImage(
66 com.liferay.portlet.imagegallery.model.IGImage igImage)
67 throws com.liferay.portal.SystemException {
68 getService().deleteIGImage(igImage);
69 }
70
71 public static java.util.List<Object> dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73 throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery);
75 }
76
77 public static java.util.List<Object> dynamicQuery(
78 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79 int end) throws com.liferay.portal.SystemException {
80 return getService().dynamicQuery(dynamicQuery, start, end);
81 }
82
83 public static com.liferay.portlet.imagegallery.model.IGImage getIGImage(
84 long imageId)
85 throws com.liferay.portal.PortalException,
86 com.liferay.portal.SystemException {
87 return getService().getIGImage(imageId);
88 }
89
90 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
91 int start, int end) throws com.liferay.portal.SystemException {
92 return getService().getIGImages(start, end);
93 }
94
95 public static int getIGImagesCount()
96 throws com.liferay.portal.SystemException {
97 return getService().getIGImagesCount();
98 }
99
100 public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
101 com.liferay.portlet.imagegallery.model.IGImage igImage)
102 throws com.liferay.portal.SystemException {
103 return getService().updateIGImage(igImage);
104 }
105
106 public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
107 com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
108 throws com.liferay.portal.SystemException {
109 return getService().updateIGImage(igImage, merge);
110 }
111
112 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
113 long userId, long folderId, java.lang.String name,
114 java.lang.String description, java.io.File file,
115 java.lang.String contentType,
116 com.liferay.portal.service.ServiceContext serviceContext)
117 throws com.liferay.portal.PortalException,
118 com.liferay.portal.SystemException {
119 return getService()
120 .addImage(userId, folderId, name, description, file,
121 contentType, serviceContext);
122 }
123
124 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
125 long userId, long folderId, java.lang.String name,
126 java.lang.String description, java.lang.String fileName, byte[] bytes,
127 java.lang.String contentType,
128 com.liferay.portal.service.ServiceContext serviceContext)
129 throws com.liferay.portal.PortalException,
130 com.liferay.portal.SystemException {
131 return getService()
132 .addImage(userId, folderId, name, description, fileName,
133 bytes, contentType, serviceContext);
134 }
135
136 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
137 long userId, long folderId, java.lang.String name,
138 java.lang.String description, java.lang.String fileName,
139 java.io.InputStream is, java.lang.String contentType,
140 com.liferay.portal.service.ServiceContext serviceContext)
141 throws com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 return getService()
144 .addImage(userId, folderId, name, description, fileName, is,
145 contentType, serviceContext);
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,
152 com.liferay.portal.service.ServiceContext serviceContext)
153 throws com.liferay.portal.PortalException,
154 com.liferay.portal.SystemException {
155 return getService()
156 .addImage(uuid, userId, folderId, name, description, file,
157 contentType, serviceContext);
158 }
159
160 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
161 java.lang.String uuid, long userId, long folderId,
162 java.lang.String name, java.lang.String description,
163 java.lang.String fileName, byte[] bytes, java.lang.String contentType,
164 com.liferay.portal.service.ServiceContext serviceContext)
165 throws com.liferay.portal.PortalException,
166 com.liferay.portal.SystemException {
167 return getService()
168 .addImage(uuid, userId, folderId, name, description,
169 fileName, bytes, contentType, serviceContext);
170 }
171
172 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
173 java.lang.String uuid, long userId, long folderId,
174 java.lang.String name, java.lang.String description,
175 java.lang.String fileName, java.io.InputStream is,
176 java.lang.String contentType,
177 com.liferay.portal.service.ServiceContext serviceContext)
178 throws com.liferay.portal.PortalException,
179 com.liferay.portal.SystemException {
180 return getService()
181 .addImage(uuid, userId, folderId, name, description,
182 fileName, is, contentType, serviceContext);
183 }
184
185 public static void addImageResources(
186 com.liferay.portlet.imagegallery.model.IGImage image,
187 boolean addCommunityPermissions, boolean addGuestPermissions)
188 throws com.liferay.portal.PortalException,
189 com.liferay.portal.SystemException {
190 getService()
191 .addImageResources(image, addCommunityPermissions,
192 addGuestPermissions);
193 }
194
195 public static void addImageResources(
196 com.liferay.portlet.imagegallery.model.IGImage image,
197 java.lang.String[] communityPermissions,
198 java.lang.String[] guestPermissions)
199 throws com.liferay.portal.PortalException,
200 com.liferay.portal.SystemException {
201 getService()
202 .addImageResources(image, communityPermissions, guestPermissions);
203 }
204
205 public static void addImageResources(long imageId,
206 boolean addCommunityPermissions, boolean addGuestPermissions)
207 throws com.liferay.portal.PortalException,
208 com.liferay.portal.SystemException {
209 getService()
210 .addImageResources(imageId, addCommunityPermissions,
211 addGuestPermissions);
212 }
213
214 public static void addImageResources(long imageId,
215 java.lang.String[] communityPermissions,
216 java.lang.String[] guestPermissions)
217 throws com.liferay.portal.PortalException,
218 com.liferay.portal.SystemException {
219 getService()
220 .addImageResources(imageId, communityPermissions, guestPermissions);
221 }
222
223 public static void deleteImage(
224 com.liferay.portlet.imagegallery.model.IGImage image)
225 throws com.liferay.portal.PortalException,
226 com.liferay.portal.SystemException {
227 getService().deleteImage(image);
228 }
229
230 public static void deleteImage(long imageId)
231 throws com.liferay.portal.PortalException,
232 com.liferay.portal.SystemException {
233 getService().deleteImage(imageId);
234 }
235
236 public static void deleteImages(long folderId)
237 throws com.liferay.portal.PortalException,
238 com.liferay.portal.SystemException {
239 getService().deleteImages(folderId);
240 }
241
242 public static int getFoldersImagesCount(java.util.List<Long> folderIds)
243 throws com.liferay.portal.SystemException {
244 return getService().getFoldersImagesCount(folderIds);
245 }
246
247 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
248 long groupId, int start, int end)
249 throws com.liferay.portal.SystemException {
250 return getService().getGroupImages(groupId, start, end);
251 }
252
253 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
254 long groupId, long userId, int start, int end)
255 throws com.liferay.portal.SystemException {
256 return getService().getGroupImages(groupId, userId, start, end);
257 }
258
259 public static int getGroupImagesCount(long groupId)
260 throws com.liferay.portal.SystemException {
261 return getService().getGroupImagesCount(groupId);
262 }
263
264 public static int getGroupImagesCount(long groupId, long userId)
265 throws com.liferay.portal.SystemException {
266 return getService().getGroupImagesCount(groupId, userId);
267 }
268
269 public static com.liferay.portlet.imagegallery.model.IGImage getImage(
270 long imageId)
271 throws com.liferay.portal.PortalException,
272 com.liferay.portal.SystemException {
273 return getService().getImage(imageId);
274 }
275
276 public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
277 long custom1ImageId)
278 throws com.liferay.portal.PortalException,
279 com.liferay.portal.SystemException {
280 return getService().getImageByCustom1ImageId(custom1ImageId);
281 }
282
283 public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
284 long custom2ImageId)
285 throws com.liferay.portal.PortalException,
286 com.liferay.portal.SystemException {
287 return getService().getImageByCustom2ImageId(custom2ImageId);
288 }
289
290 public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
291 long folderId, java.lang.String nameWithExtension)
292 throws com.liferay.portal.PortalException,
293 com.liferay.portal.SystemException {
294 return getService()
295 .getImageByFolderIdAndNameWithExtension(folderId,
296 nameWithExtension);
297 }
298
299 public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
300 long largeImageId)
301 throws com.liferay.portal.PortalException,
302 com.liferay.portal.SystemException {
303 return getService().getImageByLargeImageId(largeImageId);
304 }
305
306 public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
307 long smallImageId)
308 throws com.liferay.portal.PortalException,
309 com.liferay.portal.SystemException {
310 return getService().getImageBySmallImageId(smallImageId);
311 }
312
313 public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
314 java.lang.String uuid, long groupId)
315 throws com.liferay.portal.PortalException,
316 com.liferay.portal.SystemException {
317 return getService().getImageByUuidAndGroupId(uuid, groupId);
318 }
319
320 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
321 long folderId) throws com.liferay.portal.SystemException {
322 return getService().getImages(folderId);
323 }
324
325 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
326 long folderId, int start, int end)
327 throws com.liferay.portal.SystemException {
328 return getService().getImages(folderId, start, end);
329 }
330
331 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
332 long folderId, int start, int end,
333 com.liferay.portal.kernel.util.OrderByComparator obc)
334 throws com.liferay.portal.SystemException {
335 return getService().getImages(folderId, start, end, obc);
336 }
337
338 public static int getImagesCount(long folderId)
339 throws com.liferay.portal.SystemException {
340 return getService().getImagesCount(folderId);
341 }
342
343 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
344 throws com.liferay.portal.SystemException {
345 return getService().getNoAssetImages();
346 }
347
348 public static void reIndex(
349 com.liferay.portlet.imagegallery.model.IGImage image)
350 throws com.liferay.portal.SystemException {
351 getService().reIndex(image);
352 }
353
354 public static void reIndex(long imageId)
355 throws com.liferay.portal.SystemException {
356 getService().reIndex(imageId);
357 }
358
359 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
360 long userId, long imageId, long folderId, java.lang.String name,
361 java.lang.String description, byte[] bytes,
362 java.lang.String contentType,
363 com.liferay.portal.service.ServiceContext serviceContext)
364 throws com.liferay.portal.PortalException,
365 com.liferay.portal.SystemException {
366 return getService()
367 .updateImage(userId, imageId, folderId, name, description,
368 bytes, contentType, serviceContext);
369 }
370
371 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
372 long userId, long imageId, long folderId, java.lang.String name,
373 java.lang.String description, java.io.File file,
374 java.lang.String contentType,
375 com.liferay.portal.service.ServiceContext serviceContext)
376 throws com.liferay.portal.PortalException,
377 com.liferay.portal.SystemException {
378 return getService()
379 .updateImage(userId, imageId, folderId, name, description,
380 file, contentType, serviceContext);
381 }
382
383 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
384 long userId, long imageId, long folderId, java.lang.String name,
385 java.lang.String description, java.io.InputStream is,
386 java.lang.String contentType,
387 com.liferay.portal.service.ServiceContext serviceContext)
388 throws com.liferay.portal.PortalException,
389 com.liferay.portal.SystemException {
390 return getService()
391 .updateImage(userId, imageId, folderId, name, description,
392 is, contentType, serviceContext);
393 }
394
395 public static void updateSmallImage(long smallImageId, long largeImageId)
396 throws com.liferay.portal.PortalException,
397 com.liferay.portal.SystemException {
398 getService().updateSmallImage(smallImageId, largeImageId);
399 }
400
401 public static void updateTagsAsset(long userId,
402 com.liferay.portlet.imagegallery.model.IGImage image,
403 java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
404 throws com.liferay.portal.PortalException,
405 com.liferay.portal.SystemException {
406 getService().updateTagsAsset(userId, image, tagsCategories, tagsEntries);
407 }
408
409 public static void updateTagsAsset(long userId,
410 com.liferay.portlet.imagegallery.model.IGImage image,
411 java.lang.String[] tagsCategories, java.lang.String[] tagsEntries,
412 java.lang.String contentType)
413 throws com.liferay.portal.PortalException,
414 com.liferay.portal.SystemException {
415 getService()
416 .updateTagsAsset(userId, image, tagsCategories, tagsEntries,
417 contentType);
418 }
419
420 public static IGImageLocalService getService() {
421 if (_service == null) {
422 _service = (IGImageLocalService)PortalBeanLocatorUtil.locate(IGImageLocalService.class.getName());
423 }
424
425 return _service;
426 }
427
428 public void setService(IGImageLocalService service) {
429 _service = service;
430 }
431
432 private static IGImageLocalService _service;
433 }