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