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