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.portal.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025: import com.liferay.portal.service.LayoutServiceUtil;
026:
027: import java.rmi.RemoteException;
028:
029: /**
030: * <a href="LayoutServiceSoap.java.html"><b><i>View Source</i></b></a>
031: *
032: * <p>
033: * ServiceBuilder generated this class. Modifications in this class will be
034: * overwritten the next time is generated.
035: * </p>
036: *
037: * <p>
038: * This class provides a SOAP utility for the
039: * <code>com.liferay.portal.service.LayoutServiceUtil</code> service
040: * utility. The static methods of this class calls the same methods of the
041: * service utility. However, the signatures are different because it is
042: * difficult for SOAP to support certain types.
043: * </p>
044: *
045: * <p>
046: * ServiceBuilder follows certain rules in translating the methods. For example,
047: * if the method in the service utility returns a <code>java.util.List</code>,
048: * that is translated to an array of
049: * <code>com.liferay.portal.model.LayoutSoap</code>. If the method in the
050: * service utility returns a <code>com.liferay.portal.model.Layout</code>,
051: * that is translated to a <code>com.liferay.portal.model.LayoutSoap</code>.
052: * Methods that SOAP cannot safely wire are skipped.
053: * </p>
054: *
055: * <p>
056: * The benefits of using the SOAP utility is that it is cross platform
057: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
058: * even Perl, to call the generated services. One drawback of SOAP is that it is
059: * slow because it needs to serialize all calls into a text format (XML).
060: * </p>
061: *
062: * <p>
063: * You can see a list of services at
064: * http://localhost:8080/tunnel-web/secure/axis. Set the property
065: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
066: * security.
067: * </p>
068: *
069: * <p>
070: * The SOAP utility is only generated for remote services.
071: * </p>
072: *
073: * @author Brian Wing Shun Chan
074: *
075: * @see com.liferay.portal.service.LayoutServiceUtil
076: * @see com.liferay.portal.service.http.LayoutServiceHttp
077: * @see com.liferay.portal.service.model.LayoutSoap
078: *
079: */
080: public class LayoutServiceSoap {
081: public static com.liferay.portal.model.LayoutSoap addLayout(
082: long groupId, boolean privateLayout, long parentLayoutId,
083: java.lang.String name, java.lang.String title,
084: java.lang.String description, java.lang.String type,
085: boolean hidden, java.lang.String friendlyURL)
086: throws RemoteException {
087: try {
088: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
089: .addLayout(groupId, privateLayout, parentLayoutId,
090: name, title, description, type, hidden,
091: friendlyURL);
092:
093: return com.liferay.portal.model.LayoutSoap
094: .toSoapModel(returnValue);
095: } catch (Exception e) {
096: _log.error(e, e);
097:
098: throw new RemoteException(e.getMessage());
099: }
100: }
101:
102: public static void deleteLayout(long plid) throws RemoteException {
103: try {
104: LayoutServiceUtil.deleteLayout(plid);
105: } catch (Exception e) {
106: _log.error(e, e);
107:
108: throw new RemoteException(e.getMessage());
109: }
110: }
111:
112: public static void deleteLayout(long groupId,
113: boolean privateLayout, long layoutId)
114: throws RemoteException {
115: try {
116: LayoutServiceUtil.deleteLayout(groupId, privateLayout,
117: layoutId);
118: } catch (Exception e) {
119: _log.error(e, e);
120:
121: throw new RemoteException(e.getMessage());
122: }
123: }
124:
125: public static java.lang.String getLayoutName(long groupId,
126: boolean privateLayout, long layoutId,
127: java.lang.String languageId) throws RemoteException {
128: try {
129: java.lang.String returnValue = LayoutServiceUtil
130: .getLayoutName(groupId, privateLayout, layoutId,
131: languageId);
132:
133: return returnValue;
134: } catch (Exception e) {
135: _log.error(e, e);
136:
137: throw new RemoteException(e.getMessage());
138: }
139: }
140:
141: public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
142: long companyId, java.lang.String portletId,
143: java.lang.String prefsKey, java.lang.String prefsValue)
144: throws RemoteException {
145: try {
146: com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil
147: .getLayoutReferences(companyId, portletId,
148: prefsKey, prefsValue);
149:
150: return returnValue;
151: } catch (Exception e) {
152: _log.error(e, e);
153:
154: throw new RemoteException(e.getMessage());
155: }
156: }
157:
158: public static void setLayouts(long groupId, boolean privateLayout,
159: long parentLayoutId, long[] layoutIds)
160: throws RemoteException {
161: try {
162: LayoutServiceUtil.setLayouts(groupId, privateLayout,
163: parentLayoutId, layoutIds);
164: } catch (Exception e) {
165: _log.error(e, e);
166:
167: throw new RemoteException(e.getMessage());
168: }
169: }
170:
171: public static com.liferay.portal.model.LayoutSoap updateLayout(
172: long groupId, boolean privateLayout, long layoutId,
173: java.lang.String typeSettings) throws RemoteException {
174: try {
175: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
176: .updateLayout(groupId, privateLayout, layoutId,
177: typeSettings);
178:
179: return com.liferay.portal.model.LayoutSoap
180: .toSoapModel(returnValue);
181: } catch (Exception e) {
182: _log.error(e, e);
183:
184: throw new RemoteException(e.getMessage());
185: }
186: }
187:
188: public static com.liferay.portal.model.LayoutSoap updateLookAndFeel(
189: long groupId, boolean privateLayout, long layoutId,
190: java.lang.String themeId, java.lang.String colorSchemeId,
191: java.lang.String css, boolean wapTheme)
192: throws RemoteException {
193: try {
194: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
195: .updateLookAndFeel(groupId, privateLayout,
196: layoutId, themeId, colorSchemeId, css,
197: wapTheme);
198:
199: return com.liferay.portal.model.LayoutSoap
200: .toSoapModel(returnValue);
201: } catch (Exception e) {
202: _log.error(e, e);
203:
204: throw new RemoteException(e.getMessage());
205: }
206: }
207:
208: public static com.liferay.portal.model.LayoutSoap updateName(
209: long plid, java.lang.String name,
210: java.lang.String languageId) throws RemoteException {
211: try {
212: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
213: .updateName(plid, name, languageId);
214:
215: return com.liferay.portal.model.LayoutSoap
216: .toSoapModel(returnValue);
217: } catch (Exception e) {
218: _log.error(e, e);
219:
220: throw new RemoteException(e.getMessage());
221: }
222: }
223:
224: public static com.liferay.portal.model.LayoutSoap updateName(
225: long groupId, boolean privateLayout, long layoutId,
226: java.lang.String name, java.lang.String languageId)
227: throws RemoteException {
228: try {
229: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
230: .updateName(groupId, privateLayout, layoutId, name,
231: languageId);
232:
233: return com.liferay.portal.model.LayoutSoap
234: .toSoapModel(returnValue);
235: } catch (Exception e) {
236: _log.error(e, e);
237:
238: throw new RemoteException(e.getMessage());
239: }
240: }
241:
242: public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
243: long plid, long parentPlid) throws RemoteException {
244: try {
245: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
246: .updateParentLayoutId(plid, parentPlid);
247:
248: return com.liferay.portal.model.LayoutSoap
249: .toSoapModel(returnValue);
250: } catch (Exception e) {
251: _log.error(e, e);
252:
253: throw new RemoteException(e.getMessage());
254: }
255: }
256:
257: public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
258: long groupId, boolean privateLayout, long layoutId,
259: long parentLayoutId) throws RemoteException {
260: try {
261: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
262: .updateParentLayoutId(groupId, privateLayout,
263: layoutId, parentLayoutId);
264:
265: return com.liferay.portal.model.LayoutSoap
266: .toSoapModel(returnValue);
267: } catch (Exception e) {
268: _log.error(e, e);
269:
270: throw new RemoteException(e.getMessage());
271: }
272: }
273:
274: public static com.liferay.portal.model.LayoutSoap updatePriority(
275: long plid, int priority) throws RemoteException {
276: try {
277: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
278: .updatePriority(plid, priority);
279:
280: return com.liferay.portal.model.LayoutSoap
281: .toSoapModel(returnValue);
282: } catch (Exception e) {
283: _log.error(e, e);
284:
285: throw new RemoteException(e.getMessage());
286: }
287: }
288:
289: public static com.liferay.portal.model.LayoutSoap updatePriority(
290: long groupId, boolean privateLayout, long layoutId,
291: int priority) throws RemoteException {
292: try {
293: com.liferay.portal.model.Layout returnValue = LayoutServiceUtil
294: .updatePriority(groupId, privateLayout, layoutId,
295: priority);
296:
297: return com.liferay.portal.model.LayoutSoap
298: .toSoapModel(returnValue);
299: } catch (Exception e) {
300: _log.error(e, e);
301:
302: throw new RemoteException(e.getMessage());
303: }
304: }
305:
306: private static Log _log = LogFactoryUtil
307: .getLog(LayoutServiceSoap.class);
308: }
|