001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.imagegallery.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * The utility for the i g image remote service. This utility wraps {@link com.liferay.portlet.imagegallery.service.impl.IGImageServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.imagegallery.service.impl.IGImageServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see IGImageService
032     * @see com.liferay.portlet.imagegallery.service.base.IGImageServiceBaseImpl
033     * @see com.liferay.portlet.imagegallery.service.impl.IGImageServiceImpl
034     * @generated
035     */
036    public class IGImageServiceUtil {
037            public static com.liferay.portlet.imagegallery.model.IGImage addImage(
038                    long groupId, long folderId, java.lang.String name,
039                    java.lang.String description, java.io.File file,
040                    java.lang.String contentType,
041                    com.liferay.portal.service.ServiceContext serviceContext)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    return getService()
045                                       .addImage(groupId, folderId, name, description, file,
046                            contentType, serviceContext);
047            }
048    
049            public static void deleteImage(long imageId)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException {
052                    getService().deleteImage(imageId);
053            }
054    
055            public static void deleteImageByFolderIdAndNameWithExtension(long groupId,
056                    long folderId, java.lang.String nameWithExtension)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    getService()
060                            .deleteImageByFolderIdAndNameWithExtension(groupId, folderId,
061                            nameWithExtension);
062            }
063    
064            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
065                    long groupId, long userId, int start, int end)
066                    throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().getGroupImages(groupId, userId, start, end);
068            }
069    
070            public static int getGroupImagesCount(long groupId, long userId)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    return getService().getGroupImagesCount(groupId, userId);
073            }
074    
075            public static com.liferay.portlet.imagegallery.model.IGImage getImage(
076                    long imageId)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    return getService().getImage(imageId);
080            }
081    
082            public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
083                    long groupId, long folderId, java.lang.String nameWithExtension)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    return getService()
087                                       .getImageByFolderIdAndNameWithExtension(groupId, folderId,
088                            nameWithExtension);
089            }
090    
091            public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
092                    long largeImageId)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    return getService().getImageByLargeImageId(largeImageId);
096            }
097    
098            public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
099                    long smallImageId)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException {
102                    return getService().getImageBySmallImageId(smallImageId);
103            }
104    
105            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
106                    long groupId, long folderId)
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getImages(groupId, folderId);
109            }
110    
111            public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
112                    long groupId, long folderId, int start, int end)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().getImages(groupId, folderId, start, end);
115            }
116    
117            public static int getImagesCount(long groupId, long folderId)
118                    throws com.liferay.portal.kernel.exception.SystemException {
119                    return getService().getImagesCount(groupId, folderId);
120            }
121    
122            public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
123                    long imageId, long groupId, long folderId, java.lang.String name,
124                    java.lang.String description, java.io.File file,
125                    java.lang.String contentType,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .updateImage(imageId, groupId, folderId, name, description,
131                            file, contentType, serviceContext);
132            }
133    
134            public static IGImageService getService() {
135                    if (_service == null) {
136                            _service = (IGImageService)PortalBeanLocatorUtil.locate(IGImageService.class.getName());
137                    }
138    
139                    return _service;
140            }
141    
142            public void setService(IGImageService service) {
143                    _service = service;
144            }
145    
146            private static IGImageService _service;
147    }