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.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          throws RemoteException {
79          try {
80              com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
81                      privateLayout, parentLayoutId, name, title, description,
82                      type, hidden, friendlyURL);
83  
84              return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
85          }
86          catch (Exception e) {
87              _log.error(e, e);
88  
89              throw new RemoteException(e.getMessage());
90          }
91      }
92  
93      public static void deleteLayout(long plid) throws RemoteException {
94          try {
95              LayoutServiceUtil.deleteLayout(plid);
96          }
97          catch (Exception e) {
98              _log.error(e, e);
99  
100             throw new RemoteException(e.getMessage());
101         }
102     }
103 
104     public static void deleteLayout(long groupId, boolean privateLayout,
105         long layoutId) throws RemoteException {
106         try {
107             LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId);
108         }
109         catch (Exception e) {
110             _log.error(e, e);
111 
112             throw new RemoteException(e.getMessage());
113         }
114     }
115 
116     public static java.lang.String getLayoutName(long groupId,
117         boolean privateLayout, long layoutId, java.lang.String languageId)
118         throws RemoteException {
119         try {
120             java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
121                     privateLayout, layoutId, languageId);
122 
123             return returnValue;
124         }
125         catch (Exception e) {
126             _log.error(e, e);
127 
128             throw new RemoteException(e.getMessage());
129         }
130     }
131 
132     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
133         long companyId, java.lang.String portletId, java.lang.String prefsKey,
134         java.lang.String prefsValue) throws RemoteException {
135         try {
136             com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId,
137                     portletId, prefsKey, prefsValue);
138 
139             return returnValue;
140         }
141         catch (Exception e) {
142             _log.error(e, e);
143 
144             throw new RemoteException(e.getMessage());
145         }
146     }
147 
148     public static void setLayouts(long groupId, boolean privateLayout,
149         long parentLayoutId, long[] layoutIds) throws RemoteException {
150         try {
151             LayoutServiceUtil.setLayouts(groupId, privateLayout,
152                 parentLayoutId, layoutIds);
153         }
154         catch (Exception e) {
155             _log.error(e, e);
156 
157             throw new RemoteException(e.getMessage());
158         }
159     }
160 
161     public static void unschedulePublishToLive(long groupId,
162         java.lang.String jobName, java.lang.String groupName)
163         throws RemoteException {
164         try {
165             LayoutServiceUtil.unschedulePublishToLive(groupId, jobName,
166                 groupName);
167         }
168         catch (Exception e) {
169             _log.error(e, e);
170 
171             throw new RemoteException(e.getMessage());
172         }
173     }
174 
175     public static void unschedulePublishToRemote(long groupId,
176         java.lang.String jobName, java.lang.String groupName)
177         throws RemoteException {
178         try {
179             LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName,
180                 groupName);
181         }
182         catch (Exception e) {
183             _log.error(e, e);
184 
185             throw new RemoteException(e.getMessage());
186         }
187     }
188 
189     public static com.liferay.portal.model.LayoutSoap updateLayout(
190         long groupId, boolean privateLayout, long layoutId,
191         java.lang.String typeSettings) throws RemoteException {
192         try {
193             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
194                     privateLayout, layoutId, typeSettings);
195 
196             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
197         }
198         catch (Exception e) {
199             _log.error(e, e);
200 
201             throw new RemoteException(e.getMessage());
202         }
203     }
204 
205     public static com.liferay.portal.model.LayoutSoap updateLookAndFeel(
206         long groupId, boolean privateLayout, long layoutId,
207         java.lang.String themeId, java.lang.String colorSchemeId,
208         java.lang.String css, boolean wapTheme) throws RemoteException {
209         try {
210             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId,
211                     privateLayout, layoutId, themeId, colorSchemeId, css,
212                     wapTheme);
213 
214             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
215         }
216         catch (Exception e) {
217             _log.error(e, e);
218 
219             throw new RemoteException(e.getMessage());
220         }
221     }
222 
223     public static com.liferay.portal.model.LayoutSoap updateName(long groupId,
224         boolean privateLayout, long layoutId, java.lang.String name,
225         java.lang.String languageId) throws RemoteException {
226         try {
227             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
228                     privateLayout, layoutId, name, languageId);
229 
230             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
231         }
232         catch (Exception e) {
233             _log.error(e, e);
234 
235             throw new RemoteException(e.getMessage());
236         }
237     }
238 
239     public static com.liferay.portal.model.LayoutSoap updateName(long plid,
240         java.lang.String name, java.lang.String languageId)
241         throws RemoteException {
242         try {
243             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
244                     name, languageId);
245 
246             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
247         }
248         catch (Exception e) {
249             _log.error(e, e);
250 
251             throw new RemoteException(e.getMessage());
252         }
253     }
254 
255     public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
256         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
257         throws RemoteException {
258         try {
259             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
260                     privateLayout, layoutId, parentLayoutId);
261 
262             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
263         }
264         catch (Exception e) {
265             _log.error(e, e);
266 
267             throw new RemoteException(e.getMessage());
268         }
269     }
270 
271     public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
272         long plid, long parentPlid) throws RemoteException {
273         try {
274             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
275                     parentPlid);
276 
277             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
278         }
279         catch (Exception e) {
280             _log.error(e, e);
281 
282             throw new RemoteException(e.getMessage());
283         }
284     }
285 
286     public static com.liferay.portal.model.LayoutSoap updatePriority(
287         long groupId, boolean privateLayout, long layoutId, int priority)
288         throws RemoteException {
289         try {
290             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
291                     privateLayout, layoutId, priority);
292 
293             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
294         }
295         catch (Exception e) {
296             _log.error(e, e);
297 
298             throw new RemoteException(e.getMessage());
299         }
300     }
301 
302     public static com.liferay.portal.model.LayoutSoap updatePriority(
303         long plid, int priority) throws RemoteException {
304         try {
305             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
306                     priority);
307 
308             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
309         }
310         catch (Exception e) {
311             _log.error(e, e);
312 
313             throw new RemoteException(e.getMessage());
314         }
315     }
316 
317     private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class);
318 }