001
014
015 package com.liferay.portlet.imagegallery.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class IGImageLocalServiceUtil {
037
044 public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
045 com.liferay.portlet.imagegallery.model.IGImage igImage)
046 throws com.liferay.portal.kernel.exception.SystemException {
047 return getService().addIGImage(igImage);
048 }
049
050
056 public static com.liferay.portlet.imagegallery.model.IGImage createIGImage(
057 long imageId) {
058 return getService().createIGImage(imageId);
059 }
060
061
068 public static void deleteIGImage(long imageId)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 getService().deleteIGImage(imageId);
072 }
073
074
080 public static void deleteIGImage(
081 com.liferay.portlet.imagegallery.model.IGImage igImage)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 getService().deleteIGImage(igImage);
084 }
085
086
093 @SuppressWarnings("rawtypes")
094 public static java.util.List dynamicQuery(
095 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
096 throws com.liferay.portal.kernel.exception.SystemException {
097 return getService().dynamicQuery(dynamicQuery);
098 }
099
100
113 @SuppressWarnings("rawtypes")
114 public static java.util.List dynamicQuery(
115 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
116 int end) throws com.liferay.portal.kernel.exception.SystemException {
117 return getService().dynamicQuery(dynamicQuery, start, end);
118 }
119
120
134 @SuppressWarnings("rawtypes")
135 public static java.util.List dynamicQuery(
136 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
137 int end,
138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139 throws com.liferay.portal.kernel.exception.SystemException {
140 return getService()
141 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
142 }
143
144
151 public static long dynamicQueryCount(
152 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
153 throws com.liferay.portal.kernel.exception.SystemException {
154 return getService().dynamicQueryCount(dynamicQuery);
155 }
156
157
165 public static com.liferay.portlet.imagegallery.model.IGImage getIGImage(
166 long imageId)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 return getService().getIGImage(imageId);
170 }
171
172
181 public static com.liferay.portlet.imagegallery.model.IGImage getIGImageByUuidAndGroupId(
182 java.lang.String uuid, long groupId)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 return getService().getIGImageByUuidAndGroupId(uuid, groupId);
186 }
187
188
200 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
201 int start, int end)
202 throws com.liferay.portal.kernel.exception.SystemException {
203 return getService().getIGImages(start, end);
204 }
205
206
212 public static int getIGImagesCount()
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getIGImagesCount();
215 }
216
217
224 public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
225 com.liferay.portlet.imagegallery.model.IGImage igImage)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return getService().updateIGImage(igImage);
228 }
229
230
238 public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
239 com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
240 throws com.liferay.portal.kernel.exception.SystemException {
241 return getService().updateIGImage(igImage, merge);
242 }
243
244 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
245 long userId, long groupId, long folderId, java.lang.String name,
246 java.lang.String description, java.io.File file,
247 java.lang.String contentType,
248 com.liferay.portal.service.ServiceContext serviceContext)
249 throws com.liferay.portal.kernel.exception.PortalException,
250 com.liferay.portal.kernel.exception.SystemException {
251 return getService()
252 .addImage(userId, groupId, folderId, name, description,
253 file, contentType, serviceContext);
254 }
255
256 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
257 long userId, long groupId, long folderId, java.lang.String name,
258 java.lang.String description, java.lang.String fileName, byte[] bytes,
259 java.lang.String contentType,
260 com.liferay.portal.service.ServiceContext serviceContext)
261 throws com.liferay.portal.kernel.exception.PortalException,
262 com.liferay.portal.kernel.exception.SystemException {
263 return getService()
264 .addImage(userId, groupId, folderId, name, description,
265 fileName, bytes, contentType, serviceContext);
266 }
267
268 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
269 long userId, long groupId, long folderId, java.lang.String name,
270 java.lang.String description, java.lang.String fileName,
271 java.io.InputStream is, java.lang.String contentType,
272 com.liferay.portal.service.ServiceContext serviceContext)
273 throws com.liferay.portal.kernel.exception.PortalException,
274 com.liferay.portal.kernel.exception.SystemException {
275 return getService()
276 .addImage(userId, groupId, folderId, name, description,
277 fileName, is, contentType, serviceContext);
278 }
279
280 public static void addImageResources(
281 com.liferay.portlet.imagegallery.model.IGImage image,
282 boolean addCommunityPermissions, boolean addGuestPermissions)
283 throws com.liferay.portal.kernel.exception.PortalException,
284 com.liferay.portal.kernel.exception.SystemException {
285 getService()
286 .addImageResources(image, addCommunityPermissions,
287 addGuestPermissions);
288 }
289
290 public static void addImageResources(
291 com.liferay.portlet.imagegallery.model.IGImage image,
292 java.lang.String[] communityPermissions,
293 java.lang.String[] guestPermissions)
294 throws com.liferay.portal.kernel.exception.PortalException,
295 com.liferay.portal.kernel.exception.SystemException {
296 getService()
297 .addImageResources(image, communityPermissions, guestPermissions);
298 }
299
300 public static void addImageResources(long imageId,
301 boolean addCommunityPermissions, boolean addGuestPermissions)
302 throws com.liferay.portal.kernel.exception.PortalException,
303 com.liferay.portal.kernel.exception.SystemException {
304 getService()
305 .addImageResources(imageId, addCommunityPermissions,
306 addGuestPermissions);
307 }
308
309 public static void addImageResources(long imageId,
310 java.lang.String[] communityPermissions,
311 java.lang.String[] guestPermissions)
312 throws com.liferay.portal.kernel.exception.PortalException,
313 com.liferay.portal.kernel.exception.SystemException {
314 getService()
315 .addImageResources(imageId, communityPermissions, guestPermissions);
316 }
317
318 public static void deleteImage(
319 com.liferay.portlet.imagegallery.model.IGImage image)
320 throws com.liferay.portal.kernel.exception.PortalException,
321 com.liferay.portal.kernel.exception.SystemException {
322 getService().deleteImage(image);
323 }
324
325 public static void deleteImage(long imageId)
326 throws com.liferay.portal.kernel.exception.PortalException,
327 com.liferay.portal.kernel.exception.SystemException {
328 getService().deleteImage(imageId);
329 }
330
331 public static void deleteImages(long groupId, long folderId)
332 throws com.liferay.portal.kernel.exception.PortalException,
333 com.liferay.portal.kernel.exception.SystemException {
334 getService().deleteImages(groupId, folderId);
335 }
336
337 public static int getFoldersImagesCount(long groupId,
338 java.util.List<java.lang.Long> folderIds)
339 throws com.liferay.portal.kernel.exception.SystemException {
340 return getService().getFoldersImagesCount(groupId, folderIds);
341 }
342
343 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
344 long groupId, int start, int end)
345 throws com.liferay.portal.kernel.exception.SystemException {
346 return getService().getGroupImages(groupId, start, end);
347 }
348
349 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
350 long groupId, long userId, int start, int end)
351 throws com.liferay.portal.kernel.exception.SystemException {
352 return getService().getGroupImages(groupId, userId, start, end);
353 }
354
355 public static int getGroupImagesCount(long groupId)
356 throws com.liferay.portal.kernel.exception.SystemException {
357 return getService().getGroupImagesCount(groupId);
358 }
359
360 public static int getGroupImagesCount(long groupId, long userId)
361 throws com.liferay.portal.kernel.exception.SystemException {
362 return getService().getGroupImagesCount(groupId, userId);
363 }
364
365 public static com.liferay.portlet.imagegallery.model.IGImage getImage(
366 long imageId)
367 throws com.liferay.portal.kernel.exception.PortalException,
368 com.liferay.portal.kernel.exception.SystemException {
369 return getService().getImage(imageId);
370 }
371
372 public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
373 long custom1ImageId)
374 throws com.liferay.portal.kernel.exception.PortalException,
375 com.liferay.portal.kernel.exception.SystemException {
376 return getService().getImageByCustom1ImageId(custom1ImageId);
377 }
378
379 public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
380 long custom2ImageId)
381 throws com.liferay.portal.kernel.exception.PortalException,
382 com.liferay.portal.kernel.exception.SystemException {
383 return getService().getImageByCustom2ImageId(custom2ImageId);
384 }
385
386 public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
387 long groupId, long folderId, java.lang.String nameWithExtension)
388 throws com.liferay.portal.kernel.exception.PortalException,
389 com.liferay.portal.kernel.exception.SystemException {
390 return getService()
391 .getImageByFolderIdAndNameWithExtension(groupId, folderId,
392 nameWithExtension);
393 }
394
395 public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
396 long largeImageId)
397 throws com.liferay.portal.kernel.exception.PortalException,
398 com.liferay.portal.kernel.exception.SystemException {
399 return getService().getImageByLargeImageId(largeImageId);
400 }
401
402 public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
403 long smallImageId)
404 throws com.liferay.portal.kernel.exception.PortalException,
405 com.liferay.portal.kernel.exception.SystemException {
406 return getService().getImageBySmallImageId(smallImageId);
407 }
408
409 public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
410 java.lang.String uuid, long groupId)
411 throws com.liferay.portal.kernel.exception.PortalException,
412 com.liferay.portal.kernel.exception.SystemException {
413 return getService().getImageByUuidAndGroupId(uuid, groupId);
414 }
415
416 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
417 long groupId, long folderId)
418 throws com.liferay.portal.kernel.exception.SystemException {
419 return getService().getImages(groupId, folderId);
420 }
421
422 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
423 long groupId, long folderId, int start, int end)
424 throws com.liferay.portal.kernel.exception.SystemException {
425 return getService().getImages(groupId, folderId, start, end);
426 }
427
428 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
429 long groupId, long folderId, int start, int end,
430 com.liferay.portal.kernel.util.OrderByComparator obc)
431 throws com.liferay.portal.kernel.exception.SystemException {
432 return getService().getImages(groupId, folderId, start, end, obc);
433 }
434
435 public static int getImagesCount(long groupId, long folderId)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 return getService().getImagesCount(groupId, folderId);
438 }
439
440 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
441 throws com.liferay.portal.kernel.exception.SystemException {
442 return getService().getNoAssetImages();
443 }
444
445 public static void updateAsset(long userId,
446 com.liferay.portlet.imagegallery.model.IGImage image,
447 long[] assetCategoryIds, java.lang.String[] assetTagNames,
448 java.lang.String contentType)
449 throws com.liferay.portal.kernel.exception.PortalException,
450 com.liferay.portal.kernel.exception.SystemException {
451 getService()
452 .updateAsset(userId, image, assetCategoryIds, assetTagNames,
453 contentType);
454 }
455
456 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
457 long userId, long imageId, long groupId, long folderId,
458 java.lang.String name, java.lang.String description, byte[] bytes,
459 java.lang.String contentType,
460 com.liferay.portal.service.ServiceContext serviceContext)
461 throws com.liferay.portal.kernel.exception.PortalException,
462 com.liferay.portal.kernel.exception.SystemException {
463 return getService()
464 .updateImage(userId, imageId, groupId, folderId, name,
465 description, bytes, contentType, serviceContext);
466 }
467
468 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
469 long userId, long imageId, long groupId, long folderId,
470 java.lang.String name, java.lang.String description, java.io.File file,
471 java.lang.String contentType,
472 com.liferay.portal.service.ServiceContext serviceContext)
473 throws com.liferay.portal.kernel.exception.PortalException,
474 com.liferay.portal.kernel.exception.SystemException {
475 return getService()
476 .updateImage(userId, imageId, groupId, folderId, name,
477 description, file, contentType, serviceContext);
478 }
479
480 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
481 long userId, long imageId, long groupId, long folderId,
482 java.lang.String name, java.lang.String description,
483 java.io.InputStream is, java.lang.String contentType,
484 com.liferay.portal.service.ServiceContext serviceContext)
485 throws com.liferay.portal.kernel.exception.PortalException,
486 com.liferay.portal.kernel.exception.SystemException {
487 return getService()
488 .updateImage(userId, imageId, groupId, folderId, name,
489 description, is, contentType, serviceContext);
490 }
491
492 public static void updateSmallImage(long smallImageId, long largeImageId)
493 throws com.liferay.portal.kernel.exception.PortalException,
494 com.liferay.portal.kernel.exception.SystemException {
495 getService().updateSmallImage(smallImageId, largeImageId);
496 }
497
498 public static IGImageLocalService getService() {
499 if (_service == null) {
500 _service = (IGImageLocalService)PortalBeanLocatorUtil.locate(IGImageLocalService.class.getName());
501 }
502
503 return _service;
504 }
505
506 public void setService(IGImageLocalService service) {
507 _service = service;
508 }
509
510 private static IGImageLocalService _service;
511 }