001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.imagegallery.service;
022:
023: /**
024: * <a href="IGImageLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.imagegallery.service.IGImageLocalService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.imagegallery.service.IGImageLocalServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.imagegallery.service.IGImageLocalService
047: * @see com.liferay.portlet.imagegallery.service.IGImageLocalServiceFactory
048: *
049: */
050: public class IGImageLocalServiceUtil {
051: public static com.liferay.portlet.imagegallery.model.IGImage addIGImage(
052: com.liferay.portlet.imagegallery.model.IGImage model)
053: throws com.liferay.portal.SystemException {
054: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
055: .getService();
056:
057: return igImageLocalService.addIGImage(model);
058: }
059:
060: public static java.util.List dynamicQuery(
061: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
062: throws com.liferay.portal.SystemException {
063: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
064: .getService();
065:
066: return igImageLocalService.dynamicQuery(queryInitializer);
067: }
068:
069: public static java.util.List dynamicQuery(
070: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
071: int begin, int end)
072: throws com.liferay.portal.SystemException {
073: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
074: .getService();
075:
076: return igImageLocalService.dynamicQuery(queryInitializer,
077: begin, end);
078: }
079:
080: public static com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
081: com.liferay.portlet.imagegallery.model.IGImage model)
082: throws com.liferay.portal.SystemException {
083: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
084: .getService();
085:
086: return igImageLocalService.updateIGImage(model);
087: }
088:
089: public static com.liferay.portlet.imagegallery.service.persistence.IGFolderPersistence getIGFolderPersistence() {
090: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
091: .getService();
092:
093: return igImageLocalService.getIGFolderPersistence();
094: }
095:
096: public static void setIGFolderPersistence(
097: com.liferay.portlet.imagegallery.service.persistence.IGFolderPersistence igFolderPersistence) {
098: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
099: .getService();
100:
101: igImageLocalService.setIGFolderPersistence(igFolderPersistence);
102: }
103:
104: public static com.liferay.portlet.imagegallery.service.persistence.IGImagePersistence getIGImagePersistence() {
105: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
106: .getService();
107:
108: return igImageLocalService.getIGImagePersistence();
109: }
110:
111: public static void setIGImagePersistence(
112: com.liferay.portlet.imagegallery.service.persistence.IGImagePersistence igImagePersistence) {
113: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
114: .getService();
115:
116: igImageLocalService.setIGImagePersistence(igImagePersistence);
117: }
118:
119: public static com.liferay.portlet.imagegallery.service.persistence.IGImageFinder getIGImageFinder() {
120: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
121: .getService();
122:
123: return igImageLocalService.getIGImageFinder();
124: }
125:
126: public static void setIGImageFinder(
127: com.liferay.portlet.imagegallery.service.persistence.IGImageFinder igImageFinder) {
128: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
129: .getService();
130:
131: igImageLocalService.setIGImageFinder(igImageFinder);
132: }
133:
134: public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
135: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
136: .getService();
137:
138: return igImageLocalService.getResourcePersistence();
139: }
140:
141: public static void setResourcePersistence(
142: com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
143: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
144: .getService();
145:
146: igImageLocalService.setResourcePersistence(resourcePersistence);
147: }
148:
149: public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
150: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
151: .getService();
152:
153: return igImageLocalService.getResourceFinder();
154: }
155:
156: public static void setResourceFinder(
157: com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
158: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
159: .getService();
160:
161: igImageLocalService.setResourceFinder(resourceFinder);
162: }
163:
164: public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
165: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
166: .getService();
167:
168: return igImageLocalService.getUserPersistence();
169: }
170:
171: public static void setUserPersistence(
172: com.liferay.portal.service.persistence.UserPersistence userPersistence) {
173: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
174: .getService();
175:
176: igImageLocalService.setUserPersistence(userPersistence);
177: }
178:
179: public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
180: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
181: .getService();
182:
183: return igImageLocalService.getUserFinder();
184: }
185:
186: public static void setUserFinder(
187: com.liferay.portal.service.persistence.UserFinder userFinder) {
188: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
189: .getService();
190:
191: igImageLocalService.setUserFinder(userFinder);
192: }
193:
194: public static com.liferay.portlet.tags.service.persistence.TagsAssetPersistence getTagsAssetPersistence() {
195: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
196: .getService();
197:
198: return igImageLocalService.getTagsAssetPersistence();
199: }
200:
201: public static void setTagsAssetPersistence(
202: com.liferay.portlet.tags.service.persistence.TagsAssetPersistence tagsAssetPersistence) {
203: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
204: .getService();
205:
206: igImageLocalService
207: .setTagsAssetPersistence(tagsAssetPersistence);
208: }
209:
210: public static com.liferay.portlet.tags.service.persistence.TagsAssetFinder getTagsAssetFinder() {
211: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
212: .getService();
213:
214: return igImageLocalService.getTagsAssetFinder();
215: }
216:
217: public static void setTagsAssetFinder(
218: com.liferay.portlet.tags.service.persistence.TagsAssetFinder tagsAssetFinder) {
219: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
220: .getService();
221:
222: igImageLocalService.setTagsAssetFinder(tagsAssetFinder);
223: }
224:
225: public static void afterPropertiesSet() {
226: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
227: .getService();
228:
229: igImageLocalService.afterPropertiesSet();
230: }
231:
232: public static com.liferay.portlet.imagegallery.model.IGImage addImage(
233: long userId, long folderId, java.lang.String description,
234: java.io.File file, java.lang.String contentType,
235: java.lang.String[] tagsEntries,
236: boolean addCommunityPermissions, boolean addGuestPermissions)
237: throws com.liferay.portal.PortalException,
238: com.liferay.portal.SystemException {
239: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
240: .getService();
241:
242: return igImageLocalService.addImage(userId, folderId,
243: description, file, contentType, tagsEntries,
244: addCommunityPermissions, addGuestPermissions);
245: }
246:
247: public static com.liferay.portlet.imagegallery.model.IGImage addImage(
248: java.lang.String uuid, long userId, long folderId,
249: java.lang.String description, java.io.File file,
250: java.lang.String contentType,
251: java.lang.String[] tagsEntries,
252: boolean addCommunityPermissions, boolean addGuestPermissions)
253: throws com.liferay.portal.PortalException,
254: com.liferay.portal.SystemException {
255: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
256: .getService();
257:
258: return igImageLocalService.addImage(uuid, userId, folderId,
259: description, file, contentType, tagsEntries,
260: addCommunityPermissions, addGuestPermissions);
261: }
262:
263: public static com.liferay.portlet.imagegallery.model.IGImage addImage(
264: long userId, long folderId, java.lang.String description,
265: java.io.File file, java.lang.String contentType,
266: java.lang.String[] tagsEntries,
267: java.lang.String[] communityPermissions,
268: java.lang.String[] guestPermissions)
269: throws com.liferay.portal.PortalException,
270: com.liferay.portal.SystemException {
271: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
272: .getService();
273:
274: return igImageLocalService.addImage(userId, folderId,
275: description, file, contentType, tagsEntries,
276: communityPermissions, guestPermissions);
277: }
278:
279: public static com.liferay.portlet.imagegallery.model.IGImage addImage(
280: java.lang.String uuid, long userId, long folderId,
281: java.lang.String description, java.io.File file,
282: java.lang.String contentType,
283: java.lang.String[] tagsEntries,
284: java.lang.Boolean addCommunityPermissions,
285: java.lang.Boolean addGuestPermissions,
286: java.lang.String[] communityPermissions,
287: java.lang.String[] guestPermissions)
288: throws com.liferay.portal.PortalException,
289: com.liferay.portal.SystemException {
290: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
291: .getService();
292:
293: return igImageLocalService.addImage(uuid, userId, folderId,
294: description, file, contentType, tagsEntries,
295: addCommunityPermissions, addGuestPermissions,
296: communityPermissions, guestPermissions);
297: }
298:
299: public static void addImageResources(long folderId, long imageId,
300: boolean addCommunityPermissions, boolean addGuestPermissions)
301: throws com.liferay.portal.PortalException,
302: com.liferay.portal.SystemException {
303: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
304: .getService();
305:
306: igImageLocalService.addImageResources(folderId, imageId,
307: addCommunityPermissions, addGuestPermissions);
308: }
309:
310: public static void addImageResources(
311: com.liferay.portlet.imagegallery.model.IGFolder folder,
312: com.liferay.portlet.imagegallery.model.IGImage image,
313: boolean addCommunityPermissions, boolean addGuestPermissions)
314: throws com.liferay.portal.PortalException,
315: com.liferay.portal.SystemException {
316: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
317: .getService();
318:
319: igImageLocalService.addImageResources(folder, image,
320: addCommunityPermissions, addGuestPermissions);
321: }
322:
323: public static void addImageResources(long folderId, long imageId,
324: java.lang.String[] communityPermissions,
325: java.lang.String[] guestPermissions)
326: throws com.liferay.portal.PortalException,
327: com.liferay.portal.SystemException {
328: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
329: .getService();
330:
331: igImageLocalService.addImageResources(folderId, imageId,
332: communityPermissions, guestPermissions);
333: }
334:
335: public static void addImageResources(
336: com.liferay.portlet.imagegallery.model.IGFolder folder,
337: com.liferay.portlet.imagegallery.model.IGImage image,
338: java.lang.String[] communityPermissions,
339: java.lang.String[] guestPermissions)
340: throws com.liferay.portal.PortalException,
341: com.liferay.portal.SystemException {
342: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
343: .getService();
344:
345: igImageLocalService.addImageResources(folder, image,
346: communityPermissions, guestPermissions);
347: }
348:
349: public static void deleteImage(long imageId)
350: throws com.liferay.portal.PortalException,
351: com.liferay.portal.SystemException {
352: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
353: .getService();
354:
355: igImageLocalService.deleteImage(imageId);
356: }
357:
358: public static void deleteImage(
359: com.liferay.portlet.imagegallery.model.IGImage image)
360: throws com.liferay.portal.PortalException,
361: com.liferay.portal.SystemException {
362: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
363: .getService();
364:
365: igImageLocalService.deleteImage(image);
366: }
367:
368: public static void deleteImages(long folderId)
369: throws com.liferay.portal.PortalException,
370: com.liferay.portal.SystemException {
371: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
372: .getService();
373:
374: igImageLocalService.deleteImages(folderId);
375: }
376:
377: public static int getFoldersImagesCount(java.util.List folderIds)
378: throws com.liferay.portal.SystemException {
379: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
380: .getService();
381:
382: return igImageLocalService.getFoldersImagesCount(folderIds);
383: }
384:
385: public static java.util.List getGroupImages(long groupId,
386: int begin, int end)
387: throws com.liferay.portal.SystemException {
388: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
389: .getService();
390:
391: return igImageLocalService.getGroupImages(groupId, begin, end);
392: }
393:
394: public static java.util.List getGroupImages(long groupId,
395: long userId, int begin, int end)
396: throws com.liferay.portal.SystemException {
397: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
398: .getService();
399:
400: return igImageLocalService.getGroupImages(groupId, userId,
401: begin, end);
402: }
403:
404: public static int getGroupImagesCount(long groupId)
405: throws com.liferay.portal.SystemException {
406: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
407: .getService();
408:
409: return igImageLocalService.getGroupImagesCount(groupId);
410: }
411:
412: public static int getGroupImagesCount(long groupId, long userId)
413: throws com.liferay.portal.SystemException {
414: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
415: .getService();
416:
417: return igImageLocalService.getGroupImagesCount(groupId, userId);
418: }
419:
420: public static com.liferay.portlet.imagegallery.model.IGImage getImage(
421: long imageId) throws com.liferay.portal.PortalException,
422: com.liferay.portal.SystemException {
423: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
424: .getService();
425:
426: return igImageLocalService.getImage(imageId);
427: }
428:
429: public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
430: long largeImageId)
431: throws com.liferay.portal.PortalException,
432: com.liferay.portal.SystemException {
433: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
434: .getService();
435:
436: return igImageLocalService.getImageByLargeImageId(largeImageId);
437: }
438:
439: public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
440: long smallImageId)
441: throws com.liferay.portal.PortalException,
442: com.liferay.portal.SystemException {
443: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
444: .getService();
445:
446: return igImageLocalService.getImageBySmallImageId(smallImageId);
447: }
448:
449: public static com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
450: java.lang.String uuid, long groupId)
451: throws com.liferay.portal.PortalException,
452: com.liferay.portal.SystemException {
453: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
454: .getService();
455:
456: return igImageLocalService.getImageByUuidAndGroupId(uuid,
457: groupId);
458: }
459:
460: public static java.util.List getImages(long folderId)
461: throws com.liferay.portal.SystemException {
462: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
463: .getService();
464:
465: return igImageLocalService.getImages(folderId);
466: }
467:
468: public static java.util.List getImages(long folderId, int begin,
469: int end) throws com.liferay.portal.SystemException {
470: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
471: .getService();
472:
473: return igImageLocalService.getImages(folderId, begin, end);
474: }
475:
476: public static java.util.List getImages(long folderId, int begin,
477: int end,
478: com.liferay.portal.kernel.util.OrderByComparator obc)
479: throws com.liferay.portal.SystemException {
480: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
481: .getService();
482:
483: return igImageLocalService.getImages(folderId, begin, end, obc);
484: }
485:
486: public static int getImagesCount(long folderId)
487: throws com.liferay.portal.SystemException {
488: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
489: .getService();
490:
491: return igImageLocalService.getImagesCount(folderId);
492: }
493:
494: public static java.util.List getNoAssetImages()
495: throws com.liferay.portal.SystemException {
496: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
497: .getService();
498:
499: return igImageLocalService.getNoAssetImages();
500: }
501:
502: public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
503: long userId, long imageId, long folderId,
504: java.lang.String description, java.io.File file,
505: java.lang.String contentType, java.lang.String[] tagsEntries)
506: throws com.liferay.portal.PortalException,
507: com.liferay.portal.SystemException {
508: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
509: .getService();
510:
511: return igImageLocalService.updateImage(userId, imageId,
512: folderId, description, file, contentType, tagsEntries);
513: }
514:
515: public static void updateTagsAsset(long userId,
516: com.liferay.portlet.imagegallery.model.IGImage image,
517: java.lang.String[] tagsEntries)
518: throws com.liferay.portal.PortalException,
519: com.liferay.portal.SystemException {
520: IGImageLocalService igImageLocalService = IGImageLocalServiceFactory
521: .getService();
522:
523: igImageLocalService.updateTagsAsset(userId, image, tagsEntries);
524: }
525: }
|