001    /**
002     * Copyright (c) 2000-2010 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 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[] getGroupEntries(
161                    long groupId, int status, int start, int end) throws RemoteException {
162                    try {
163                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
164                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
165                                            end);
166    
167                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
168                    }
169                    catch (Exception e) {
170                            _log.error(e, e);
171    
172                            throw new RemoteException(e.getMessage());
173                    }
174            }
175    
176            public static int getGroupEntriesCount(long groupId, int status)
177                    throws RemoteException {
178                    try {
179                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
180                                            status);
181    
182                            return returnValue;
183                    }
184                    catch (Exception e) {
185                            _log.error(e, e);
186    
187                            throw new RemoteException(e.getMessage());
188                    }
189            }
190    
191            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupsEntries(
192                    long companyId, long groupId, int status, int max)
193                    throws RemoteException {
194                    try {
195                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
196                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
197                                            status, max);
198    
199                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
200                    }
201                    catch (Exception e) {
202                            _log.error(e, e);
203    
204                            throw new RemoteException(e.getMessage());
205                    }
206            }
207    
208            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
209                    long organizationId, int status, int max) throws RemoteException {
210                    try {
211                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
212                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
213                                            status, max);
214    
215                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
216                    }
217                    catch (Exception e) {
218                            _log.error(e, e);
219    
220                            throw new RemoteException(e.getMessage());
221                    }
222            }
223    
224            public static com.liferay.portlet.blogs.model.BlogsEntrySoap updateEntry(
225                    long entryId, java.lang.String title, java.lang.String content,
226                    int displayDateMonth, int displayDateDay, int displayDateYear,
227                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
228                    boolean allowTrackbacks, java.lang.String[] trackbacks,
229                    com.liferay.portal.service.ServiceContext serviceContext)
230                    throws RemoteException {
231                    try {
232                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.updateEntry(entryId,
233                                            title, content, displayDateMonth, displayDateDay,
234                                            displayDateYear, displayDateHour, displayDateMinute,
235                                            allowPingbacks, allowTrackbacks, trackbacks, serviceContext);
236    
237                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
238                    }
239                    catch (Exception e) {
240                            _log.error(e, e);
241    
242                            throw new RemoteException(e.getMessage());
243                    }
244            }
245    
246            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
247    }