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.portal.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.service.LayoutServiceUtil;
20  
21  import java.rmi.RemoteException;
22  
23  /**
24   * <a href="LayoutServiceSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides a SOAP utility for the
33   * {@link com.liferay.portal.service.LayoutServiceUtil} service utility. The
34   * static methods of this class calls the same methods of the service utility.
35   * However, the signatures are different because it is difficult for SOAP to
36   * support certain types.
37   * </p>
38   *
39   * <p>
40   * ServiceBuilder follows certain rules in translating the methods. For example,
41   * if the method in the service utility returns a {@link java.util.List}, that
42   * is translated to an array of {@link com.liferay.portal.model.LayoutSoap}.
43   * If the method in the service utility returns a
44   * {@link com.liferay.portal.model.Layout}, that is translated to a
45   * {@link com.liferay.portal.model.LayoutSoap}. Methods that SOAP cannot
46   * safely wire are skipped.
47   * </p>
48   *
49   * <p>
50   * The benefits of using the SOAP utility is that it is cross platform
51   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
52   * even Perl, to call the generated services. One drawback of SOAP is that it is
53   * slow because it needs to serialize all calls into a text format (XML).
54   * </p>
55   *
56   * <p>
57   * You can see a list of services at
58   * http://localhost:8080/tunnel-web/secure/axis. Set the property
59   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
60   * security.
61   * </p>
62   *
63   * <p>
64   * The SOAP utility is only generated for remote services.
65   * </p>
66   *
67   * @author    Brian Wing Shun Chan
68   * @see       LayoutServiceHttp
69   * @see       com.liferay.portal.model.LayoutSoap
70   * @see       com.liferay.portal.service.LayoutServiceUtil
71   * @generated
72   */
73  public class LayoutServiceSoap {
74      public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
75          boolean privateLayout, long parentLayoutId, java.lang.String name,
76          java.lang.String title, java.lang.String description,
77          java.lang.String type, boolean hidden, java.lang.String friendlyURL,
78          com.liferay.portal.service.ServiceContext serviceContext)
79          throws RemoteException {
80          try {
81              com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
82                      privateLayout, parentLayoutId, name, title, description,
83                      type, hidden, friendlyURL, serviceContext);
84  
85              return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
86          }
87          catch (Exception e) {
88              _log.error(e, e);
89  
90              throw new RemoteException(e.getMessage());
91          }
92      }
93  
94      public static void deleteLayout(long plid) throws RemoteException {
95          try {
96              LayoutServiceUtil.deleteLayout(plid);
97          }
98          catch (Exception e) {
99              _log.error(e, e);
100 
101             throw new RemoteException(e.getMessage());
102         }
103     }
104 
105     public static void deleteLayout(long groupId, boolean privateLayout,
106         long layoutId) throws RemoteException {
107         try {
108             LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId);
109         }
110         catch (Exception e) {
111             _log.error(e, e);
112 
113             throw new RemoteException(e.getMessage());
114         }
115     }
116 
117     public static java.lang.String getLayoutName(long groupId,
118         boolean privateLayout, long layoutId, java.lang.String languageId)
119         throws RemoteException {
120         try {
121             java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
122                     privateLayout, layoutId, languageId);
123 
124             return returnValue;
125         }
126         catch (Exception e) {
127             _log.error(e, e);
128 
129             throw new RemoteException(e.getMessage());
130         }
131     }
132 
133     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
134         long companyId, java.lang.String portletId,
135         java.lang.String preferencesKey, java.lang.String preferencesValue)
136         throws RemoteException {
137         try {
138             com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId,
139                     portletId, preferencesKey, preferencesValue);
140 
141             return returnValue;
142         }
143         catch (Exception e) {
144             _log.error(e, e);
145 
146             throw new RemoteException(e.getMessage());
147         }
148     }
149 
150     public static void setLayouts(long groupId, boolean privateLayout,
151         long parentLayoutId, long[] layoutIds) throws RemoteException {
152         try {
153             LayoutServiceUtil.setLayouts(groupId, privateLayout,
154                 parentLayoutId, layoutIds);
155         }
156         catch (Exception e) {
157             _log.error(e, e);
158 
159             throw new RemoteException(e.getMessage());
160         }
161     }
162 
163     public static void unschedulePublishToLive(long groupId,
164         java.lang.String jobName, java.lang.String groupName)
165         throws RemoteException {
166         try {
167             LayoutServiceUtil.unschedulePublishToLive(groupId, jobName,
168                 groupName);
169         }
170         catch (Exception e) {
171             _log.error(e, e);
172 
173             throw new RemoteException(e.getMessage());
174         }
175     }
176 
177     public static void unschedulePublishToRemote(long groupId,
178         java.lang.String jobName, java.lang.String groupName)
179         throws RemoteException {
180         try {
181             LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName,
182                 groupName);
183         }
184         catch (Exception e) {
185             _log.error(e, e);
186 
187             throw new RemoteException(e.getMessage());
188         }
189     }
190 
191     public static com.liferay.portal.model.LayoutSoap updateLayout(
192         long groupId, boolean privateLayout, long layoutId,
193         java.lang.String typeSettings) throws RemoteException {
194         try {
195             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
196                     privateLayout, layoutId, typeSettings);
197 
198             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
199         }
200         catch (Exception e) {
201             _log.error(e, e);
202 
203             throw new RemoteException(e.getMessage());
204         }
205     }
206 
207     public static com.liferay.portal.model.LayoutSoap updateLookAndFeel(
208         long groupId, boolean privateLayout, long layoutId,
209         java.lang.String themeId, java.lang.String colorSchemeId,
210         java.lang.String css, boolean wapTheme) throws RemoteException {
211         try {
212             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId,
213                     privateLayout, layoutId, themeId, colorSchemeId, css,
214                     wapTheme);
215 
216             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
217         }
218         catch (Exception e) {
219             _log.error(e, e);
220 
221             throw new RemoteException(e.getMessage());
222         }
223     }
224 
225     public static com.liferay.portal.model.LayoutSoap updateName(long groupId,
226         boolean privateLayout, long layoutId, java.lang.String name,
227         java.lang.String languageId) throws RemoteException {
228         try {
229             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
230                     privateLayout, layoutId, name, languageId);
231 
232             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
233         }
234         catch (Exception e) {
235             _log.error(e, e);
236 
237             throw new RemoteException(e.getMessage());
238         }
239     }
240 
241     public static com.liferay.portal.model.LayoutSoap updateName(long plid,
242         java.lang.String name, java.lang.String languageId)
243         throws RemoteException {
244         try {
245             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
246                     name, languageId);
247 
248             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
249         }
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, long parentLayoutId)
259         throws RemoteException {
260         try {
261             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
262                     privateLayout, layoutId, parentLayoutId);
263 
264             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
265         }
266         catch (Exception e) {
267             _log.error(e, e);
268 
269             throw new RemoteException(e.getMessage());
270         }
271     }
272 
273     public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
274         long plid, long parentPlid) throws RemoteException {
275         try {
276             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
277                     parentPlid);
278 
279             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
280         }
281         catch (Exception e) {
282             _log.error(e, e);
283 
284             throw new RemoteException(e.getMessage());
285         }
286     }
287 
288     public static com.liferay.portal.model.LayoutSoap updatePriority(
289         long groupId, boolean privateLayout, long layoutId, int priority)
290         throws RemoteException {
291         try {
292             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
293                     privateLayout, layoutId, priority);
294 
295             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
296         }
297         catch (Exception e) {
298             _log.error(e, e);
299 
300             throw new RemoteException(e.getMessage());
301         }
302     }
303 
304     public static com.liferay.portal.model.LayoutSoap updatePriority(
305         long plid, int priority) throws RemoteException {
306         try {
307             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
308                     priority);
309 
310             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
311         }
312         catch (Exception e) {
313             _log.error(e, e);
314 
315             throw new RemoteException(e.getMessage());
316         }
317     }
318 
319     private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class);
320 }