1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
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 draft, 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, draft, allowTrackbacks,
86                      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 max) throws RemoteException {
110         try {
111             java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
112                 BlogsEntryServiceUtil.getCompanyEntries(companyId, 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 max) throws RemoteException {
154         try {
155             java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
156                 BlogsEntryServiceUtil.getGroupEntries(groupId, 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[] getGroupsEntries(
168         long companyId, long groupId, int max) throws RemoteException {
169         try {
170             java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
171                 BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId, max);
172 
173             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(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.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
183         long organizationId, int max) throws RemoteException {
184         try {
185             java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
186                 BlogsEntryServiceUtil.getOrganizationEntries(organizationId, max);
187 
188             return com.liferay.portlet.blogs.model.BlogsEntrySoap.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.blogs.model.BlogsEntrySoap updateEntry(
198         long entryId, java.lang.String title, java.lang.String content,
199         int displayDateMonth, int displayDateDay, int displayDateYear,
200         int displayDateHour, int displayDateMinute, boolean draft,
201         boolean allowTrackbacks, java.lang.String[] trackbacks,
202         com.liferay.portal.service.ServiceContext serviceContext)
203         throws RemoteException {
204         try {
205             com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.updateEntry(entryId,
206                     title, content, displayDateMonth, displayDateDay,
207                     displayDateYear, displayDateHour, displayDateMinute, draft,
208                     allowTrackbacks, trackbacks, serviceContext);
209 
210             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
211         }
212         catch (Exception e) {
213             _log.error(e, e);
214 
215             throw new RemoteException(e.getMessage());
216         }
217     }
218 
219     private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
220 }