001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.blogs.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.blogs.service.BlogsEntryServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.blogs.service.BlogsEntryServiceUtil} 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.blogs.model.BlogsEntrySoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.blogs.model.BlogsEntry}, that is translated to a
039     * {@link com.liferay.portlet.blogs.model.BlogsEntrySoap}. 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       BlogsEntryServiceHttp
063     * @see       com.liferay.portlet.blogs.model.BlogsEntrySoap
064     * @see       com.liferay.portlet.blogs.service.BlogsEntryServiceUtil
065     * @generated
066     */
067    public class BlogsEntryServiceSoap {
068            public static void deleteEntry(long entryId) throws RemoteException {
069                    try {
070                            BlogsEntryServiceUtil.deleteEntry(entryId);
071                    }
072                    catch (Exception e) {
073                            _log.error(e, e);
074    
075                            throw new RemoteException(e.getMessage());
076                    }
077            }
078    
079            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getCompanyEntries(
080                    long companyId, int status, int max) throws RemoteException {
081                    try {
082                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
083                                    BlogsEntryServiceUtil.getCompanyEntries(companyId, status, max);
084    
085                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
086                    }
087                    catch (Exception e) {
088                            _log.error(e, e);
089    
090                            throw new RemoteException(e.getMessage());
091                    }
092            }
093    
094            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
095                    long entryId) throws RemoteException {
096                    try {
097                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
098    
099                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
100                    }
101                    catch (Exception e) {
102                            _log.error(e, e);
103    
104                            throw new RemoteException(e.getMessage());
105                    }
106            }
107    
108            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
109                    long groupId, java.lang.String urlTitle) throws RemoteException {
110                    try {
111                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
112                                            urlTitle);
113    
114                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
115                    }
116                    catch (Exception e) {
117                            _log.error(e, e);
118    
119                            throw new RemoteException(e.getMessage());
120                    }
121            }
122    
123            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
124                    long groupId, int status, int max) throws RemoteException {
125                    try {
126                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
127                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
128    
129                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(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.blogs.model.BlogsEntrySoap[] getGroupEntries(
139                    long groupId, int status, int start, int end) throws RemoteException {
140                    try {
141                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
142                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
143                                            end);
144    
145                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
146                    }
147                    catch (Exception e) {
148                            _log.error(e, e);
149    
150                            throw new RemoteException(e.getMessage());
151                    }
152            }
153    
154            public static int getGroupEntriesCount(long groupId, int status)
155                    throws RemoteException {
156                    try {
157                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
158                                            status);
159    
160                            return returnValue;
161                    }
162                    catch (Exception e) {
163                            _log.error(e, e);
164    
165                            throw new RemoteException(e.getMessage());
166                    }
167            }
168    
169            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupsEntries(
170                    long companyId, long groupId, int status, int max)
171                    throws RemoteException {
172                    try {
173                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
174                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
175                                            status, max);
176    
177                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
178                    }
179                    catch (Exception e) {
180                            _log.error(e, e);
181    
182                            throw new RemoteException(e.getMessage());
183                    }
184            }
185    
186            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
187                    long organizationId, int status, int max) throws RemoteException {
188                    try {
189                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
190                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
191                                            status, max);
192    
193                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
194                    }
195                    catch (Exception e) {
196                            _log.error(e, e);
197    
198                            throw new RemoteException(e.getMessage());
199                    }
200            }
201    
202            public static void subscribe(long groupId) throws RemoteException {
203                    try {
204                            BlogsEntryServiceUtil.subscribe(groupId);
205                    }
206                    catch (Exception e) {
207                            _log.error(e, e);
208    
209                            throw new RemoteException(e.getMessage());
210                    }
211            }
212    
213            public static void unsubscribe(long groupId) throws RemoteException {
214                    try {
215                            BlogsEntryServiceUtil.unsubscribe(groupId);
216                    }
217                    catch (Exception e) {
218                            _log.error(e, e);
219    
220                            throw new RemoteException(e.getMessage());
221                    }
222            }
223    
224            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
225    }