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