001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.blogs.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025:
026: import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="BlogsEntryServiceSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class provides a SOAP utility for the
040: * <code>com.liferay.portlet.blogs.service.BlogsEntryServiceUtil</code> service
041: * utility. The static methods of this class calls the same methods of the
042: * service utility. However, the signatures are different because it is
043: * difficult for SOAP to support certain types.
044: * </p>
045: *
046: * <p>
047: * ServiceBuilder follows certain rules in translating the methods. For example,
048: * if the method in the service utility returns a <code>java.util.List</code>,
049: * that is translated to an array of
050: * <code>com.liferay.portlet.blogs.model.BlogsEntrySoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.blogs.model.BlogsEntry</code>,
052: * that is translated to a <code>com.liferay.portlet.blogs.model.BlogsEntrySoap</code>.
053: * Methods that SOAP cannot safely wire are skipped.
054: * </p>
055: *
056: * <p>
057: * The benefits of using the SOAP utility is that it is cross platform
058: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
059: * even Perl, to call the generated services. One drawback of SOAP is that it is
060: * slow because it needs to serialize all calls into a text format (XML).
061: * </p>
062: *
063: * <p>
064: * You can see a list of services at
065: * http://localhost:8080/tunnel-web/secure/axis. Set the property
066: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
067: * security.
068: * </p>
069: *
070: * <p>
071: * The SOAP utility is only generated for remote services.
072: * </p>
073: *
074: * @author Brian Wing Shun Chan
075: *
076: * @see com.liferay.portlet.blogs.service.BlogsEntryServiceUtil
077: * @see com.liferay.portlet.blogs.service.http.BlogsEntryServiceHttp
078: * @see com.liferay.portlet.blogs.service.model.BlogsEntrySoap
079: *
080: */
081: public class BlogsEntryServiceSoap {
082: public static void deleteEntry(long entryId) throws RemoteException {
083: try {
084: BlogsEntryServiceUtil.deleteEntry(entryId);
085: } catch (Exception e) {
086: _log.error(e, e);
087:
088: throw new RemoteException(e.getMessage());
089: }
090: }
091:
092: public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getCompanyEntries(
093: long companyId, int max) throws RemoteException {
094: try {
095: java.util.List returnValue = BlogsEntryServiceUtil
096: .getCompanyEntries(companyId, max);
097:
098: return com.liferay.portlet.blogs.model.BlogsEntrySoap
099: .toSoapModels(returnValue);
100: } catch (Exception e) {
101: _log.error(e, e);
102:
103: throw new RemoteException(e.getMessage());
104: }
105: }
106:
107: public static java.lang.String getCompanyEntriesRSS(long companyId,
108: int max, java.lang.String type, double version,
109: java.lang.String displayStyle, java.lang.String feedURL,
110: java.lang.String entryURL) throws RemoteException {
111: try {
112: java.lang.String returnValue = BlogsEntryServiceUtil
113: .getCompanyEntriesRSS(companyId, max, type,
114: version, displayStyle, feedURL, entryURL);
115:
116: return returnValue;
117: } catch (Exception e) {
118: _log.error(e, e);
119:
120: throw new RemoteException(e.getMessage());
121: }
122: }
123:
124: public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
125: long entryId) throws RemoteException {
126: try {
127: com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil
128: .getEntry(entryId);
129:
130: return com.liferay.portlet.blogs.model.BlogsEntrySoap
131: .toSoapModel(returnValue);
132: } catch (Exception e) {
133: _log.error(e, e);
134:
135: throw new RemoteException(e.getMessage());
136: }
137: }
138:
139: public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
140: long groupId, java.lang.String urlTitle)
141: throws RemoteException {
142: try {
143: com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil
144: .getEntry(groupId, urlTitle);
145:
146: return com.liferay.portlet.blogs.model.BlogsEntrySoap
147: .toSoapModel(returnValue);
148: } catch (Exception e) {
149: _log.error(e, e);
150:
151: throw new RemoteException(e.getMessage());
152: }
153: }
154:
155: public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
156: long groupId, int max) throws RemoteException {
157: try {
158: java.util.List returnValue = BlogsEntryServiceUtil
159: .getGroupEntries(groupId, max);
160:
161: return com.liferay.portlet.blogs.model.BlogsEntrySoap
162: .toSoapModels(returnValue);
163: } catch (Exception e) {
164: _log.error(e, e);
165:
166: throw new RemoteException(e.getMessage());
167: }
168: }
169:
170: public static java.lang.String getGroupEntriesRSS(long groupId,
171: int max, java.lang.String type, double version,
172: java.lang.String displayStyle, java.lang.String feedURL,
173: java.lang.String entryURL) throws RemoteException {
174: try {
175: java.lang.String returnValue = BlogsEntryServiceUtil
176: .getGroupEntriesRSS(groupId, max, type, version,
177: displayStyle, feedURL, entryURL);
178:
179: return returnValue;
180: } catch (Exception e) {
181: _log.error(e, e);
182:
183: throw new RemoteException(e.getMessage());
184: }
185: }
186:
187: public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
188: long organizationId, int max) throws RemoteException {
189: try {
190: java.util.List returnValue = BlogsEntryServiceUtil
191: .getOrganizationEntries(organizationId, max);
192:
193: return com.liferay.portlet.blogs.model.BlogsEntrySoap
194: .toSoapModels(returnValue);
195: } catch (Exception e) {
196: _log.error(e, e);
197:
198: throw new RemoteException(e.getMessage());
199: }
200: }
201:
202: public static java.lang.String getOrganizationEntriesRSS(
203: long organizationId, int max, java.lang.String type,
204: double version, java.lang.String displayStyle,
205: java.lang.String feedURL, java.lang.String entryURL)
206: throws RemoteException {
207: try {
208: java.lang.String returnValue = BlogsEntryServiceUtil
209: .getOrganizationEntriesRSS(organizationId, max,
210: type, version, displayStyle, feedURL,
211: entryURL);
212:
213: return returnValue;
214: } catch (Exception e) {
215: _log.error(e, e);
216:
217: throw new RemoteException(e.getMessage());
218: }
219: }
220:
221: private static Log _log = LogFactoryUtil
222: .getLog(BlogsEntryServiceSoap.class);
223: }
|