1
14
15 package com.liferay.portlet.imagegallery.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class IGImageServiceUtil {
40 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
41 long folderId, java.lang.String name, java.lang.String description,
42 java.io.File file, java.lang.String contentType,
43 com.liferay.portal.service.ServiceContext serviceContext)
44 throws com.liferay.portal.PortalException,
45 com.liferay.portal.SystemException {
46 return getService()
47 .addImage(folderId, name, description, file, contentType,
48 serviceContext);
49 }
50
51 public static void deleteImage(long imageId)
52 throws com.liferay.portal.PortalException,
53 com.liferay.portal.SystemException {
54 getService().deleteImage(imageId);
55 }
56
57 public static void deleteImageByFolderIdAndNameWithExtension(
58 long folderId, java.lang.String nameWithExtension)
59 throws com.liferay.portal.PortalException,
60 com.liferay.portal.SystemException {
61 getService()
62 .deleteImageByFolderIdAndNameWithExtension(folderId,
63 nameWithExtension);
64 }
65
66 public static com.liferay.portlet.imagegallery.model.IGImage getImage(
67 long imageId)
68 throws com.liferay.portal.PortalException,
69 com.liferay.portal.SystemException {
70 return getService().getImage(imageId);
71 }
72
73 public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
74 long folderId, java.lang.String nameWithExtension)
75 throws com.liferay.portal.PortalException,
76 com.liferay.portal.SystemException {
77 return getService()
78 .getImageByFolderIdAndNameWithExtension(folderId,
79 nameWithExtension);
80 }
81
82 public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
83 long largeImageId)
84 throws com.liferay.portal.PortalException,
85 com.liferay.portal.SystemException {
86 return getService().getImageByLargeImageId(largeImageId);
87 }
88
89 public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
90 long smallImageId)
91 throws com.liferay.portal.PortalException,
92 com.liferay.portal.SystemException {
93 return getService().getImageBySmallImageId(smallImageId);
94 }
95
96 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
97 long folderId)
98 throws com.liferay.portal.PortalException,
99 com.liferay.portal.SystemException {
100 return getService().getImages(folderId);
101 }
102
103 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
104 long imageId, long folderId, java.lang.String name,
105 java.lang.String description, java.io.File file,
106 java.lang.String contentType,
107 com.liferay.portal.service.ServiceContext serviceContext)
108 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 return getService()
111 .updateImage(imageId, folderId, name, description, file,
112 contentType, serviceContext);
113 }
114
115 public static IGImageService getService() {
116 if (_service == null) {
117 _service = (IGImageService)PortalBeanLocatorUtil.locate(IGImageService.class.getName());
118 }
119
120 return _service;
121 }
122
123 public void setService(IGImageService service) {
124 _service = service;
125 }
126
127 private static IGImageService _service;
128 }