001
014
015 package com.liferay.portlet.imagegallery.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class IGImageLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
049 com.liferay.portlet.imagegallery.model.IGImage igImage)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addIGImage(igImage);
052 }
053
054
060 public static com.liferay.portlet.imagegallery.model.IGImage createIGImage(
061 long imageId) {
062 return getService().createIGImage(imageId);
063 }
064
065
072 public static void deleteIGImage(long imageId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteIGImage(imageId);
076 }
077
078
084 public static void deleteIGImage(
085 com.liferay.portlet.imagegallery.model.IGImage igImage)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteIGImage(igImage);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portlet.imagegallery.model.IGImage getIGImage(
170 long imageId)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService().getIGImage(imageId);
174 }
175
176 public static com.liferay.portal.model.PersistedModel getPersistedModel(
177 java.io.Serializable primaryKeyObj)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService().getPersistedModel(primaryKeyObj);
181 }
182
183
192 public static com.liferay.portlet.imagegallery.model.IGImage getIGImageByUuidAndGroupId(
193 java.lang.String uuid, long groupId)
194 throws com.liferay.portal.kernel.exception.PortalException,
195 com.liferay.portal.kernel.exception.SystemException {
196 return getService().getIGImageByUuidAndGroupId(uuid, groupId);
197 }
198
199
211 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
212 int start, int end)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getIGImages(start, end);
215 }
216
217
223 public static int getIGImagesCount()
224 throws com.liferay.portal.kernel.exception.SystemException {
225 return getService().getIGImagesCount();
226 }
227
228
235 public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
236 com.liferay.portlet.imagegallery.model.IGImage igImage)
237 throws com.liferay.portal.kernel.exception.SystemException {
238 return getService().updateIGImage(igImage);
239 }
240
241
249 public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
250 com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getService().updateIGImage(igImage, merge);
253 }
254
255
260 public static java.lang.String getBeanIdentifier() {
261 return getService().getBeanIdentifier();
262 }
263
264
269 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
270 getService().setBeanIdentifier(beanIdentifier);
271 }
272
273 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
274 long userId, long groupId, long folderId, java.lang.String name,
275 java.lang.String description, java.io.File file,
276 java.lang.String contentType,
277 com.liferay.portal.service.ServiceContext serviceContext)
278 throws com.liferay.portal.kernel.exception.PortalException,
279 com.liferay.portal.kernel.exception.SystemException {
280 return getService()
281 .addImage(userId, groupId, folderId, name, description,
282 file, contentType, serviceContext);
283 }
284
285 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
286 long userId, long groupId, long folderId, java.lang.String name,
287 java.lang.String description, java.lang.String fileName, byte[] bytes,
288 java.lang.String contentType,
289 com.liferay.portal.service.ServiceContext serviceContext)
290 throws com.liferay.portal.kernel.exception.PortalException,
291 com.liferay.portal.kernel.exception.SystemException {
292 return getService()
293 .addImage(userId, groupId, folderId, name, description,
294 fileName, bytes, contentType, serviceContext);
295 }
296
297 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
298 long userId, long groupId, long folderId, java.lang.String name,
299 java.lang.String description, java.lang.String fileName,
300 java.io.InputStream is, java.lang.String contentType,
301 com.liferay.portal.service.ServiceContext serviceContext)
302 throws com.liferay.portal.kernel.exception.PortalException,
303 com.liferay.portal.kernel.exception.SystemException {
304 return getService()
305 .addImage(userId, groupId, folderId, name, description,
306 fileName, is, contentType, serviceContext);
307 }
308
309 public static void addImageResources(
310 com.liferay.portlet.imagegallery.model.IGImage image,
311 boolean addCommunityPermissions, boolean addGuestPermissions)
312 throws com.liferay.portal.kernel.exception.PortalException,
313 com.liferay.portal.kernel.exception.SystemException {
314 getService()
315 .addImageResources(image, addCommunityPermissions,
316 addGuestPermissions);
317 }
318
319 public static void addImageResources(
320 com.liferay.portlet.imagegallery.model.IGImage image,
321 java.lang.String[] communityPermissions,
322 java.lang.String[] guestPermissions)
323 throws com.liferay.portal.kernel.exception.PortalException,
324 com.liferay.portal.kernel.exception.SystemException {
325 getService()
326 .addImageResources(image, communityPermissions, guestPermissions);
327 }
328
329 public static void addImageResources(long imageId,
330 boolean addCommunityPermissions, boolean addGuestPermissions)
331 throws com.liferay.portal.kernel.exception.PortalException,
332 com.liferay.portal.kernel.exception.SystemException {
333 getService()
334 .addImageResources(imageId, addCommunityPermissions,
335 addGuestPermissions);
336 }
337
338 public static void addImageResources(long imageId,
339 java.lang.String[] communityPermissions,
340 java.lang.String[] guestPermissions)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 getService()
344 .addImageResources(imageId, communityPermissions, guestPermissions);
345 }
346
347 public static void deleteImage(
348 com.liferay.portlet.imagegallery.model.IGImage image)
349 throws com.liferay.portal.kernel.exception.PortalException,
350 com.liferay.portal.kernel.exception.SystemException {
351 getService().deleteImage(image);
352 }
353
354 public static void deleteImage(long imageId)
355 throws com.liferay.portal.kernel.exception.PortalException,
356 com.liferay.portal.kernel.exception.SystemException {
357 getService().deleteImage(imageId);
358 }
359
360 public static void deleteImages(long groupId, long folderId)
361 throws com.liferay.portal.kernel.exception.PortalException,
362 com.liferay.portal.kernel.exception.SystemException {
363 getService().deleteImages(groupId, folderId);
364 }
365
366 public static int getFoldersImagesCount(long groupId,
367 java.util.List<java.lang.Long> folderIds)
368 throws com.liferay.portal.kernel.exception.SystemException {
369 return getService().getFoldersImagesCount(groupId, folderIds);
370 }
371
372 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
373 long groupId, int start, int end)
374 throws com.liferay.portal.kernel.exception.SystemException {
375 return getService().getGroupImages(groupId, start, end);
376 }
377
378 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
379 long groupId, long userId, int start, int end)
380 throws com.liferay.portal.kernel.exception.SystemException {
381 return getService().getGroupImages(groupId, userId, start, end);
382 }
383
384 public static int getGroupImagesCount(long groupId)
385 throws com.liferay.portal.kernel.exception.SystemException {
386 return getService().getGroupImagesCount(groupId);
387 }
388
389 public static int getGroupImagesCount(long groupId, long userId)
390 throws com.liferay.portal.kernel.exception.SystemException {
391 return getService().getGroupImagesCount(groupId, userId);
392 }
393
394 public static com.liferay.portlet.imagegallery.model.IGImage getImage(
395 long imageId)
396 throws com.liferay.portal.kernel.exception.PortalException,
397 com.liferay.portal.kernel.exception.SystemException {
398 return getService().getImage(imageId);
399 }
400
401 public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
402 long custom1ImageId)
403 throws com.liferay.portal.kernel.exception.PortalException,
404 com.liferay.portal.kernel.exception.SystemException {
405 return getService().getImageByCustom1ImageId(custom1ImageId);
406 }
407
408 public static com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
409 long custom2ImageId)
410 throws com.liferay.portal.kernel.exception.PortalException,
411 com.liferay.portal.kernel.exception.SystemException {
412 return getService().getImageByCustom2ImageId(custom2ImageId);
413 }
414
415 public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
416 long groupId, long folderId, java.lang.String nameWithExtension)
417 throws com.liferay.portal.kernel.exception.PortalException,
418 com.liferay.portal.kernel.exception.SystemException {
419 return getService()
420 .getImageByFolderIdAndNameWithExtension(groupId, folderId,
421 nameWithExtension);
422 }
423
424 public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
425 long largeImageId)
426 throws com.liferay.portal.kernel.exception.PortalException,
427 com.liferay.portal.kernel.exception.SystemException {
428 return getService().getImageByLargeImageId(largeImageId);
429 }
430
431 public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
432 long smallImageId)
433 throws com.liferay.portal.kernel.exception.PortalException,
434 com.liferay.portal.kernel.exception.SystemException {
435 return getService().getImageBySmallImageId(smallImageId);
436 }
437
438 public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
439 java.lang.String uuid, long groupId)
440 throws com.liferay.portal.kernel.exception.PortalException,
441 com.liferay.portal.kernel.exception.SystemException {
442 return getService().getImageByUuidAndGroupId(uuid, groupId);
443 }
444
445 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
446 long groupId, long folderId)
447 throws com.liferay.portal.kernel.exception.SystemException {
448 return getService().getImages(groupId, folderId);
449 }
450
451 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
452 long groupId, long folderId, int start, int end)
453 throws com.liferay.portal.kernel.exception.SystemException {
454 return getService().getImages(groupId, folderId, start, end);
455 }
456
457 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
458 long groupId, long folderId, int start, int end,
459 com.liferay.portal.kernel.util.OrderByComparator obc)
460 throws com.liferay.portal.kernel.exception.SystemException {
461 return getService().getImages(groupId, folderId, start, end, obc);
462 }
463
464 public static int getImagesCount(long groupId, long folderId)
465 throws com.liferay.portal.kernel.exception.SystemException {
466 return getService().getImagesCount(groupId, folderId);
467 }
468
469 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
470 throws com.liferay.portal.kernel.exception.SystemException {
471 return getService().getNoAssetImages();
472 }
473
474 public static void updateAsset(long userId,
475 com.liferay.portlet.imagegallery.model.IGImage image,
476 long[] assetCategoryIds, java.lang.String[] assetTagNames,
477 java.lang.String contentType)
478 throws com.liferay.portal.kernel.exception.PortalException,
479 com.liferay.portal.kernel.exception.SystemException {
480 getService()
481 .updateAsset(userId, image, assetCategoryIds, assetTagNames,
482 contentType);
483 }
484
485 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
486 long userId, long imageId, long groupId, long folderId,
487 java.lang.String name, java.lang.String description, byte[] bytes,
488 java.lang.String contentType,
489 com.liferay.portal.service.ServiceContext serviceContext)
490 throws com.liferay.portal.kernel.exception.PortalException,
491 com.liferay.portal.kernel.exception.SystemException {
492 return getService()
493 .updateImage(userId, imageId, groupId, folderId, name,
494 description, bytes, contentType, serviceContext);
495 }
496
497 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
498 long userId, long imageId, long groupId, long folderId,
499 java.lang.String name, java.lang.String description, java.io.File file,
500 java.lang.String contentType,
501 com.liferay.portal.service.ServiceContext serviceContext)
502 throws com.liferay.portal.kernel.exception.PortalException,
503 com.liferay.portal.kernel.exception.SystemException {
504 return getService()
505 .updateImage(userId, imageId, groupId, folderId, name,
506 description, file, contentType, serviceContext);
507 }
508
509 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
510 long userId, long imageId, long groupId, long folderId,
511 java.lang.String name, java.lang.String description,
512 java.io.InputStream is, java.lang.String contentType,
513 com.liferay.portal.service.ServiceContext serviceContext)
514 throws com.liferay.portal.kernel.exception.PortalException,
515 com.liferay.portal.kernel.exception.SystemException {
516 return getService()
517 .updateImage(userId, imageId, groupId, folderId, name,
518 description, is, contentType, serviceContext);
519 }
520
521 public static void updateSmallImage(long smallImageId, long largeImageId)
522 throws com.liferay.portal.kernel.exception.PortalException,
523 com.liferay.portal.kernel.exception.SystemException {
524 getService().updateSmallImage(smallImageId, largeImageId);
525 }
526
527 public static IGImageLocalService getService() {
528 if (_service == null) {
529 _service = (IGImageLocalService)PortalBeanLocatorUtil.locate(IGImageLocalService.class.getName());
530
531 ReferenceRegistry.registerReference(IGImageLocalServiceUtil.class,
532 "_service");
533 MethodCache.remove(IGImageLocalService.class);
534 }
535
536 return _service;
537 }
538
539 public void setService(IGImageLocalService service) {
540 MethodCache.remove(IGImageLocalService.class);
541
542 _service = service;
543
544 ReferenceRegistry.registerReference(IGImageLocalServiceUtil.class,
545 "_service");
546 MethodCache.remove(IGImageLocalService.class);
547 }
548
549 private static IGImageLocalService _service;
550 }