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.tags.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.tags.service.TagsAssetServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="TagsAssetServiceSoap.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.tags.service.TagsAssetServiceUtil</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.tags.model.TagsAssetSoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.tags.model.TagsAsset</code>,
052: * that is translated to a <code>com.liferay.portlet.tags.model.TagsAssetSoap</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.tags.service.TagsAssetServiceUtil
077: * @see com.liferay.portlet.tags.service.http.TagsAssetServiceHttp
078: * @see com.liferay.portlet.tags.service.model.TagsAssetSoap
079: *
080: */
081: public class TagsAssetServiceSoap {
082: public static void deleteAsset(long assetId) throws RemoteException {
083: try {
084: TagsAssetServiceUtil.deleteAsset(assetId);
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.tags.model.TagsAssetSoap getAsset(
093: long assetId) throws RemoteException {
094: try {
095: com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil
096: .getAsset(assetId);
097:
098: return com.liferay.portlet.tags.model.TagsAssetSoap
099: .toSoapModel(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 getAssetsRSS(long groupId,
108: long[] classNameIds, long[] entryIds, long[] notEntryIds,
109: boolean andOperator, java.lang.String orderByCol1,
110: java.lang.String orderByCol2,
111: java.lang.String orderByType1,
112: java.lang.String orderByType2,
113: boolean excludeZeroViewCount, java.util.Date publishDate,
114: java.util.Date expirationDate, int max,
115: java.lang.String type, double version,
116: java.lang.String displayStyle, java.lang.String feedURL,
117: java.lang.String entryURL) throws RemoteException {
118: try {
119: java.lang.String returnValue = TagsAssetServiceUtil
120: .getAssetsRSS(groupId, classNameIds, entryIds,
121: notEntryIds, andOperator, orderByCol1,
122: orderByCol2, orderByType1, orderByType2,
123: excludeZeroViewCount, publishDate,
124: expirationDate, max, type, version,
125: displayStyle, feedURL, entryURL);
126:
127: return returnValue;
128: } catch (Exception e) {
129: _log.error(e, e);
130:
131: throw new RemoteException(e.getMessage());
132: }
133: }
134:
135: public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
136: java.lang.String languageId) throws RemoteException {
137: try {
138: com.liferay.portlet.tags.model.TagsAssetType[] returnValue = TagsAssetServiceUtil
139: .getAssetTypes(languageId);
140:
141: return returnValue;
142: } catch (Exception e) {
143: _log.error(e, e);
144:
145: throw new RemoteException(e.getMessage());
146: }
147: }
148:
149: public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
150: long companyId, int begin, int end,
151: java.lang.String languageId) throws RemoteException {
152: try {
153: com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil
154: .getCompanyAssetDisplays(companyId, begin, end,
155: languageId);
156:
157: return returnValue;
158: } catch (Exception e) {
159: _log.error(e, e);
160:
161: throw new RemoteException(e.getMessage());
162: }
163: }
164:
165: public static com.liferay.portlet.tags.model.TagsAssetSoap[] getCompanyAssets(
166: long companyId, int begin, int end) throws RemoteException {
167: try {
168: java.util.List returnValue = TagsAssetServiceUtil
169: .getCompanyAssets(companyId, begin, end);
170:
171: return com.liferay.portlet.tags.model.TagsAssetSoap
172: .toSoapModels(returnValue);
173: } catch (Exception e) {
174: _log.error(e, e);
175:
176: throw new RemoteException(e.getMessage());
177: }
178: }
179:
180: public static int getCompanyAssetsCount(long companyId)
181: throws RemoteException {
182: try {
183: int returnValue = TagsAssetServiceUtil
184: .getCompanyAssetsCount(companyId);
185:
186: return returnValue;
187: } catch (Exception e) {
188: _log.error(e, e);
189:
190: throw new RemoteException(e.getMessage());
191: }
192: }
193:
194: public static java.lang.String getCompanyAssetsRSS(long companyId,
195: int max, java.lang.String type, double version,
196: java.lang.String displayStyle, java.lang.String feedURL,
197: java.lang.String entryURL) throws RemoteException {
198: try {
199: java.lang.String returnValue = TagsAssetServiceUtil
200: .getCompanyAssetsRSS(companyId, max, type, version,
201: displayStyle, feedURL, entryURL);
202:
203: return returnValue;
204: } catch (Exception e) {
205: _log.error(e, e);
206:
207: throw new RemoteException(e.getMessage());
208: }
209: }
210:
211: public static com.liferay.portlet.tags.model.TagsAssetSoap incrementViewCounter(
212: java.lang.String className, long classPK)
213: throws RemoteException {
214: try {
215: com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil
216: .incrementViewCounter(className, classPK);
217:
218: return com.liferay.portlet.tags.model.TagsAssetSoap
219: .toSoapModel(returnValue);
220: } catch (Exception e) {
221: _log.error(e, e);
222:
223: throw new RemoteException(e.getMessage());
224: }
225: }
226:
227: public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
228: long companyId, java.lang.String portletId,
229: java.lang.String keywords, java.lang.String languageId,
230: int begin, int end) throws RemoteException {
231: try {
232: com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil
233: .searchAssetDisplays(companyId, portletId,
234: keywords, languageId, begin, end);
235:
236: return returnValue;
237: } catch (Exception e) {
238: _log.error(e, e);
239:
240: throw new RemoteException(e.getMessage());
241: }
242: }
243:
244: public static int searchAssetDisplaysCount(long companyId,
245: java.lang.String portletId, java.lang.String keywords,
246: java.lang.String languageId) throws RemoteException {
247: try {
248: int returnValue = TagsAssetServiceUtil
249: .searchAssetDisplaysCount(companyId, portletId,
250: keywords, languageId);
251:
252: return returnValue;
253: } catch (Exception e) {
254: _log.error(e, e);
255:
256: throw new RemoteException(e.getMessage());
257: }
258: }
259:
260: public static com.liferay.portlet.tags.model.TagsAssetSoap updateAsset(
261: long groupId, java.lang.String className, long classPK,
262: java.lang.String[] entryNames, java.util.Date startDate,
263: java.util.Date endDate, java.util.Date publishDate,
264: java.util.Date expirationDate, java.lang.String mimeType,
265: java.lang.String title, java.lang.String description,
266: java.lang.String summary, java.lang.String url, int height,
267: int width, java.lang.Integer priority)
268: throws RemoteException {
269: try {
270: com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil
271: .updateAsset(groupId, className, classPK,
272: entryNames, startDate, endDate,
273: publishDate, expirationDate, mimeType,
274: title, description, summary, url, height,
275: width, priority);
276:
277: return com.liferay.portlet.tags.model.TagsAssetSoap
278: .toSoapModel(returnValue);
279: } catch (Exception e) {
280: _log.error(e, e);
281:
282: throw new RemoteException(e.getMessage());
283: }
284: }
285:
286: private static Log _log = LogFactoryUtil
287: .getLog(TagsAssetServiceSoap.class);
288: }
|