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.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 com.liferay.portlet.blogs.model.BlogsEntrySoap addEntry(
069                    java.lang.String title, java.lang.String content, int displayDateMonth,
070                    int displayDateDay, int displayDateYear, int displayDateHour,
071                    int displayDateMinute, boolean allowPingbacks, boolean allowTrackbacks,
072                    java.lang.String[] trackbacks,
073                    com.liferay.portal.service.ServiceContext serviceContext)
074                    throws RemoteException {
075                    try {
076                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.addEntry(title,
077                                            content, displayDateMonth, displayDateDay, displayDateYear,
078                                            displayDateHour, displayDateMinute, allowPingbacks,
079                                            allowTrackbacks, trackbacks, serviceContext);
080    
081                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
082                    }
083                    catch (Exception e) {
084                            _log.error(e, e);
085    
086                            throw new RemoteException(e.getMessage());
087                    }
088            }
089    
090            public static void deleteEntry(long entryId) throws RemoteException {
091                    try {
092                            BlogsEntryServiceUtil.deleteEntry(entryId);
093                    }
094                    catch (Exception e) {
095                            _log.error(e, e);
096    
097                            throw new RemoteException(e.getMessage());
098                    }
099            }
100    
101            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getCompanyEntries(
102                    long companyId, int status, int max) throws RemoteException {
103                    try {
104                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
105                                    BlogsEntryServiceUtil.getCompanyEntries(companyId, status, max);
106    
107                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
108                    }
109                    catch (Exception e) {
110                            _log.error(e, e);
111    
112                            throw new RemoteException(e.getMessage());
113                    }
114            }
115    
116            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
117                    long entryId) throws RemoteException {
118                    try {
119                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
120    
121                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
122                    }
123                    catch (Exception e) {
124                            _log.error(e, e);
125    
126                            throw new RemoteException(e.getMessage());
127                    }
128            }
129    
130            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
131                    long groupId, java.lang.String urlTitle) throws RemoteException {
132                    try {
133                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
134                                            urlTitle);
135    
136                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
137                    }
138                    catch (Exception e) {
139                            _log.error(e, e);
140    
141                            throw new RemoteException(e.getMessage());
142                    }
143            }
144    
145            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
146                    long groupId, int status, int max) throws RemoteException {
147                    try {
148                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
149                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
150    
151                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
152                    }
153                    catch (Exception e) {
154                            _log.error(e, e);
155    
156                            throw new RemoteException(e.getMessage());
157                    }
158            }
159    
160            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupsEntries(
161                    long companyId, long groupId, int status, int max)
162                    throws RemoteException {
163                    try {
164                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
165                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
166                                            status, max);
167    
168                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
169                    }
170                    catch (Exception e) {
171                            _log.error(e, e);
172    
173                            throw new RemoteException(e.getMessage());
174                    }
175            }
176    
177            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
178                    long organizationId, int status, int max) throws RemoteException {
179                    try {
180                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
181                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
182                                            status, max);
183    
184                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
185                    }
186                    catch (Exception e) {
187                            _log.error(e, e);
188    
189                            throw new RemoteException(e.getMessage());
190                    }
191            }
192    
193            public static com.liferay.portlet.blogs.model.BlogsEntrySoap updateEntry(
194                    long entryId, java.lang.String title, java.lang.String content,
195                    int displayDateMonth, int displayDateDay, int displayDateYear,
196                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
197                    boolean allowTrackbacks, java.lang.String[] trackbacks,
198                    com.liferay.portal.service.ServiceContext serviceContext)
199                    throws RemoteException {
200                    try {
201                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.updateEntry(entryId,
202                                            title, content, displayDateMonth, displayDateDay,
203                                            displayDateYear, displayDateHour, displayDateMinute,
204                                            allowPingbacks, allowTrackbacks, trackbacks, serviceContext);
205    
206                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
207                    }
208                    catch (Exception e) {
209                            _log.error(e, e);
210    
211                            throw new RemoteException(e.getMessage());
212                    }
213            }
214    
215            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
216    }