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.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import com.liferay.portlet.imagegallery.service.IGImageServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.imagegallery.service.IGImageServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     * </p>
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portlet.imagegallery.model.IGImageSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.imagegallery.model.IGImage}, that is translated to a
039     * {@link com.liferay.portlet.imagegallery.model.IGImageSoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at
052     * http://localhost:8080/tunnel-web/secure/axis. Set the property
053     * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author    Brian Wing Shun Chan
062     * @see       IGImageServiceHttp
063     * @see       com.liferay.portlet.imagegallery.model.IGImageSoap
064     * @see       com.liferay.portlet.imagegallery.service.IGImageServiceUtil
065     * @generated
066     */
067    public class IGImageServiceSoap {
068            public static void deleteImage(long imageId) throws RemoteException {
069                    try {
070                            IGImageServiceUtil.deleteImage(imageId);
071                    }
072                    catch (Exception e) {
073                            _log.error(e, e);
074    
075                            throw new RemoteException(e.getMessage());
076                    }
077            }
078    
079            public static void deleteImageByFolderIdAndNameWithExtension(long groupId,
080                    long folderId, java.lang.String nameWithExtension)
081                    throws RemoteException {
082                    try {
083                            IGImageServiceUtil.deleteImageByFolderIdAndNameWithExtension(groupId,
084                                    folderId, nameWithExtension);
085                    }
086                    catch (Exception e) {
087                            _log.error(e, e);
088    
089                            throw new RemoteException(e.getMessage());
090                    }
091            }
092    
093            public static com.liferay.portlet.imagegallery.model.IGImageSoap[] getGroupImages(
094                    long groupId, long userId, int start, int end)
095                    throws RemoteException {
096                    try {
097                            java.util.List<com.liferay.portlet.imagegallery.model.IGImage> returnValue =
098                                    IGImageServiceUtil.getGroupImages(groupId, userId, start, end);
099    
100                            return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModels(returnValue);
101                    }
102                    catch (Exception e) {
103                            _log.error(e, e);
104    
105                            throw new RemoteException(e.getMessage());
106                    }
107            }
108    
109            public static int getGroupImagesCount(long groupId, long userId)
110                    throws RemoteException {
111                    try {
112                            int returnValue = IGImageServiceUtil.getGroupImagesCount(groupId,
113                                            userId);
114    
115                            return returnValue;
116                    }
117                    catch (Exception e) {
118                            _log.error(e, e);
119    
120                            throw new RemoteException(e.getMessage());
121                    }
122            }
123    
124            public static com.liferay.portlet.imagegallery.model.IGImageSoap getImage(
125                    long imageId) throws RemoteException {
126                    try {
127                            com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImage(imageId);
128    
129                            return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
130                    }
131                    catch (Exception e) {
132                            _log.error(e, e);
133    
134                            throw new RemoteException(e.getMessage());
135                    }
136            }
137    
138            public static com.liferay.portlet.imagegallery.model.IGImageSoap getImageByFolderIdAndNameWithExtension(
139                    long groupId, long folderId, java.lang.String nameWithExtension)
140                    throws RemoteException {
141                    try {
142                            com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImageByFolderIdAndNameWithExtension(groupId,
143                                            folderId, nameWithExtension);
144    
145                            return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
146                    }
147                    catch (Exception e) {
148                            _log.error(e, e);
149    
150                            throw new RemoteException(e.getMessage());
151                    }
152            }
153    
154            public static com.liferay.portlet.imagegallery.model.IGImageSoap getImageByLargeImageId(
155                    long largeImageId) throws RemoteException {
156                    try {
157                            com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImageByLargeImageId(largeImageId);
158    
159                            return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
160                    }
161                    catch (Exception e) {
162                            _log.error(e, e);
163    
164                            throw new RemoteException(e.getMessage());
165                    }
166            }
167    
168            public static com.liferay.portlet.imagegallery.model.IGImageSoap getImageBySmallImageId(
169                    long smallImageId) throws RemoteException {
170                    try {
171                            com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImageBySmallImageId(smallImageId);
172    
173                            return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
174                    }
175                    catch (Exception e) {
176                            _log.error(e, e);
177    
178                            throw new RemoteException(e.getMessage());
179                    }
180            }
181    
182            public static com.liferay.portlet.imagegallery.model.IGImageSoap[] getImages(
183                    long groupId, long folderId) throws RemoteException {
184                    try {
185                            java.util.List<com.liferay.portlet.imagegallery.model.IGImage> returnValue =
186                                    IGImageServiceUtil.getImages(groupId, folderId);
187    
188                            return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModels(returnValue);
189                    }
190                    catch (Exception e) {
191                            _log.error(e, e);
192    
193                            throw new RemoteException(e.getMessage());
194                    }
195            }
196    
197            public static com.liferay.portlet.imagegallery.model.IGImageSoap[] getImages(
198                    long groupId, long folderId, int start, int end)
199                    throws RemoteException {
200                    try {
201                            java.util.List<com.liferay.portlet.imagegallery.model.IGImage> returnValue =
202                                    IGImageServiceUtil.getImages(groupId, folderId, start, end);
203    
204                            return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModels(returnValue);
205                    }
206                    catch (Exception e) {
207                            _log.error(e, e);
208    
209                            throw new RemoteException(e.getMessage());
210                    }
211            }
212    
213            public static int getImagesCount(long groupId, long folderId)
214                    throws RemoteException {
215                    try {
216                            int returnValue = IGImageServiceUtil.getImagesCount(groupId,
217                                            folderId);
218    
219                            return returnValue;
220                    }
221                    catch (Exception e) {
222                            _log.error(e, e);
223    
224                            throw new RemoteException(e.getMessage());
225                    }
226            }
227    
228            private static Log _log = LogFactoryUtil.getLog(IGImageServiceSoap.class);
229    }