1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.blogs.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  
20  import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
21  
22  import java.rmi.RemoteException;
23  
24  /**
25   * <a href="BlogsEntryServiceSoap.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class provides a SOAP utility for the
34   * {@link com.liferay.portlet.blogs.service.BlogsEntryServiceUtil} service utility. The
35   * static methods of this class calls the same methods of the service utility.
36   * However, the signatures are different because it is difficult for SOAP to
37   * support certain types.
38   * </p>
39   *
40   * <p>
41   * ServiceBuilder follows certain rules in translating the methods. For example,
42   * if the method in the service utility returns a {@link java.util.List}, that
43   * is translated to an array of {@link com.liferay.portlet.blogs.model.BlogsEntrySoap}.
44   * If the method in the service utility returns a
45   * {@link com.liferay.portlet.blogs.model.BlogsEntry}, that is translated to a
46   * {@link com.liferay.portlet.blogs.model.BlogsEntrySoap}. Methods that SOAP cannot
47   * safely wire are skipped.
48   * </p>
49   *
50   * <p>
51   * The benefits of using the SOAP utility is that it is cross platform
52   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
53   * even Perl, to call the generated services. One drawback of SOAP is that it is
54   * slow because it needs to serialize all calls into a text format (XML).
55   * </p>
56   *
57   * <p>
58   * You can see a list of services at
59   * http://localhost:8080/tunnel-web/secure/axis. Set the property
60   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
61   * security.
62   * </p>
63   *
64   * <p>
65   * The SOAP utility is only generated for remote services.
66   * </p>
67   *
68   * @author    Brian Wing Shun Chan
69   * @see       BlogsEntryServiceHttp
70   * @see       com.liferay.portlet.blogs.model.BlogsEntrySoap
71   * @see       com.liferay.portlet.blogs.service.BlogsEntryServiceUtil
72   * @generated
73   */
74  public class BlogsEntryServiceSoap {
75      public static com.liferay.portlet.blogs.model.BlogsEntrySoap addEntry(
76          java.lang.String title, java.lang.String content, int displayDateMonth,
77          int displayDateDay, int displayDateYear, int displayDateHour,
78          int displayDateMinute, boolean allowPingbacks, boolean allowTrackbacks,
79          java.lang.String[] trackbacks,
80          com.liferay.portal.service.ServiceContext serviceContext)
81          throws RemoteException {
82          try {
83              com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.addEntry(title,
84                      content, displayDateMonth, displayDateDay, displayDateYear,
85                      displayDateHour, displayDateMinute, allowPingbacks,
86                      allowTrackbacks, trackbacks, serviceContext);
87  
88              return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
89          }
90          catch (Exception e) {
91              _log.error(e, e);
92  
93              throw new RemoteException(e.getMessage());
94          }
95      }
96  
97      public static void deleteEntry(long entryId) throws RemoteException {
98          try {
99              BlogsEntryServiceUtil.deleteEntry(entryId);
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[] getCompanyEntries(
109         long companyId, int status, int max) throws RemoteException {
110         try {
111             java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
112                 BlogsEntryServiceUtil.getCompanyEntries(companyId, status, max);
113 
114             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(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 getEntry(
124         long entryId) throws RemoteException {
125         try {
126             com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
127 
128             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
129         }
130         catch (Exception e) {
131             _log.error(e, e);
132 
133             throw new RemoteException(e.getMessage());
134         }
135     }
136 
137     public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
138         long groupId, java.lang.String urlTitle) throws RemoteException {
139         try {
140             com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
141                     urlTitle);
142 
143             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
144         }
145         catch (Exception e) {
146             _log.error(e, e);
147 
148             throw new RemoteException(e.getMessage());
149         }
150     }
151 
152     public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
153         long groupId, int status, int max) throws RemoteException {
154         try {
155             java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
156                 BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
157 
158             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
159         }
160         catch (Exception e) {
161             _log.error(e, e);
162 
163             throw new RemoteException(e.getMessage());
164         }
165     }
166 
167     public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
168         long organizationId, int status, int max) throws RemoteException {
169         try {
170             java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
171                 BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
172                     status, max);
173 
174             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
175         }
176         catch (Exception e) {
177             _log.error(e, e);
178 
179             throw new RemoteException(e.getMessage());
180         }
181     }
182 
183     public static com.liferay.portlet.blogs.model.BlogsEntrySoap updateEntry(
184         long entryId, java.lang.String title, java.lang.String content,
185         int displayDateMonth, int displayDateDay, int displayDateYear,
186         int displayDateHour, int displayDateMinute, boolean allowPingbacks,
187         boolean allowTrackbacks, java.lang.String[] trackbacks,
188         com.liferay.portal.service.ServiceContext serviceContext)
189         throws RemoteException {
190         try {
191             com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.updateEntry(entryId,
192                     title, content, displayDateMonth, displayDateDay,
193                     displayDateYear, displayDateHour, displayDateMinute,
194                     allowPingbacks, allowTrackbacks, trackbacks, serviceContext);
195 
196             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
197         }
198         catch (Exception e) {
199             _log.error(e, e);
200 
201             throw new RemoteException(e.getMessage());
202         }
203     }
204 
205     private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
206 }