1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  import com.liferay.portal.service.LayoutServiceUtil;
28  
29  import java.rmi.RemoteException;
30  
31  /**
32   * <a href="LayoutServiceSoap.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be overwritten
36   * the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This class provides a SOAP utility for the <code>com.liferay.portal.service.LayoutServiceUtil</code>
41   * service utility. The static methods of this class calls the same methods of the
42   * service utility. However, the signatures are different because it is difficult
43   * for SOAP to support certain types.
44   * </p>
45   *
46   * <p>
47   * ServiceBuilder follows certain rules in translating the methods. For example,
48   * if the method in the service utility returns a <code>java.util.List</code>, that
49   * is translated to an array of <code>com.liferay.portal.model.LayoutSoap</code>.
50   * If the method in the service utility returns a <code>com.liferay.portal.model.Layout</code>,
51   * that is translated to a <code>com.liferay.portal.model.LayoutSoap</code>. Methods
52   * that SOAP cannot safely wire are skipped.
53   * </p>
54   *
55   * <p>
56   * The benefits of using the SOAP utility is that it is cross platform compatible.
57   * SOAP allows different languages like Java, .NET, C++, PHP, and even Perl, to
58   * call the generated services. One drawback of SOAP is that it is slow because
59   * it needs to serialize all calls into a text format (XML).
60   * </p>
61   *
62   * <p>
63   * You can see a list of services at http://localhost:8080/tunnel-web/secure/axis.
64   * Set the property <code>tunnel.servlet.hosts.allowed</code> in portal.properties
65   * to configure security.
66   * </p>
67   *
68   * <p>
69   * The SOAP utility is only generated for remote services.
70   * </p>
71   *
72   * @author Brian Wing Shun Chan
73   *
74   * @see com.liferay.portal.service.LayoutServiceUtil
75   * @see com.liferay.portal.service.http.LayoutServiceHttp
76   * @see com.liferay.portal.service.model.LayoutSoap
77   *
78   */
79  public class LayoutServiceSoap {
80      public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
81          boolean privateLayout, long parentLayoutId, java.lang.String name,
82          java.lang.String title, java.lang.String description,
83          java.lang.String type, boolean hidden, java.lang.String friendlyURL)
84          throws RemoteException {
85          try {
86              com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
87                      privateLayout, parentLayoutId, name, title, description,
88                      type, hidden, friendlyURL);
89  
90              return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
91          }
92          catch (Exception e) {
93              _log.error(e, e);
94              throw new RemoteException(e.getMessage());
95          }
96      }
97  
98      public static void deleteLayout(long plid) throws RemoteException {
99          try {
100             LayoutServiceUtil.deleteLayout(plid);
101         }
102         catch (Exception e) {
103             _log.error(e, e);
104             throw new RemoteException(e.getMessage());
105         }
106     }
107 
108     public static void deleteLayout(long groupId, boolean privateLayout,
109         long layoutId) throws RemoteException {
110         try {
111             LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId);
112         }
113         catch (Exception e) {
114             _log.error(e, e);
115             throw new RemoteException(e.getMessage());
116         }
117     }
118 
119     public static java.lang.String getLayoutName(long groupId,
120         boolean privateLayout, long layoutId, java.lang.String languageId)
121         throws RemoteException {
122         try {
123             java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
124                     privateLayout, layoutId, languageId);
125 
126             return returnValue;
127         }
128         catch (Exception e) {
129             _log.error(e, e);
130             throw new RemoteException(e.getMessage());
131         }
132     }
133 
134     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
135         long companyId, java.lang.String portletId, java.lang.String prefsKey,
136         java.lang.String prefsValue) throws RemoteException {
137         try {
138             com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId,
139                     portletId, prefsKey, prefsValue);
140 
141             return returnValue;
142         }
143         catch (Exception e) {
144             _log.error(e, e);
145             throw new RemoteException(e.getMessage());
146         }
147     }
148 
149     public static void setLayouts(long groupId, boolean privateLayout,
150         long parentLayoutId, long[] layoutIds) throws RemoteException {
151         try {
152             LayoutServiceUtil.setLayouts(groupId, privateLayout,
153                 parentLayoutId, layoutIds);
154         }
155         catch (Exception e) {
156             _log.error(e, e);
157             throw new RemoteException(e.getMessage());
158         }
159     }
160 
161     public static com.liferay.portal.model.LayoutSoap updateLayout(
162         long groupId, boolean privateLayout, long layoutId,
163         long parentLayoutId, java.lang.String name, java.lang.String title,
164         java.lang.String languageId, java.lang.String description,
165         java.lang.String type, boolean hidden, java.lang.String friendlyURL)
166         throws RemoteException {
167         try {
168             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
169                     privateLayout, layoutId, parentLayoutId, name, title,
170                     languageId, description, type, hidden, friendlyURL);
171 
172             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
173         }
174         catch (Exception e) {
175             _log.error(e, e);
176             throw new RemoteException(e.getMessage());
177         }
178     }
179 
180     public static com.liferay.portal.model.LayoutSoap updateLayout(
181         long groupId, boolean privateLayout, long layoutId,
182         long parentLayoutId, java.lang.String name, java.lang.String title,
183         java.lang.String languageId, java.lang.String description,
184         java.lang.String type, boolean hidden, java.lang.String friendlyURL,
185         java.lang.Boolean iconImage, byte[] iconBytes)
186         throws RemoteException {
187         try {
188             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
189                     privateLayout, layoutId, parentLayoutId, name, title,
190                     languageId, description, type, hidden, friendlyURL,
191                     iconImage, iconBytes);
192 
193             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
194         }
195         catch (Exception e) {
196             _log.error(e, e);
197             throw new RemoteException(e.getMessage());
198         }
199     }
200 
201     public static com.liferay.portal.model.LayoutSoap updateLayout(
202         long groupId, boolean privateLayout, long layoutId,
203         java.lang.String typeSettings) throws RemoteException {
204         try {
205             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
206                     privateLayout, layoutId, typeSettings);
207 
208             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
209         }
210         catch (Exception e) {
211             _log.error(e, e);
212             throw new RemoteException(e.getMessage());
213         }
214     }
215 
216     public static com.liferay.portal.model.LayoutSoap updateLookAndFeel(
217         long groupId, boolean privateLayout, long layoutId,
218         java.lang.String themeId, java.lang.String colorSchemeId,
219         java.lang.String css, boolean wapTheme) throws RemoteException {
220         try {
221             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId,
222                     privateLayout, layoutId, themeId, colorSchemeId, css,
223                     wapTheme);
224 
225             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
226         }
227         catch (Exception e) {
228             _log.error(e, e);
229             throw new RemoteException(e.getMessage());
230         }
231     }
232 
233     public static com.liferay.portal.model.LayoutSoap updateName(long plid,
234         java.lang.String name, java.lang.String languageId)
235         throws RemoteException {
236         try {
237             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
238                     name, languageId);
239 
240             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
241         }
242         catch (Exception e) {
243             _log.error(e, e);
244             throw new RemoteException(e.getMessage());
245         }
246     }
247 
248     public static com.liferay.portal.model.LayoutSoap updateName(long groupId,
249         boolean privateLayout, long layoutId, java.lang.String name,
250         java.lang.String languageId) throws RemoteException {
251         try {
252             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
253                     privateLayout, layoutId, name, languageId);
254 
255             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
256         }
257         catch (Exception e) {
258             _log.error(e, e);
259             throw new RemoteException(e.getMessage());
260         }
261     }
262 
263     public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
264         long plid, long parentPlid) throws RemoteException {
265         try {
266             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
267                     parentPlid);
268 
269             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
270         }
271         catch (Exception e) {
272             _log.error(e, e);
273             throw new RemoteException(e.getMessage());
274         }
275     }
276 
277     public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
278         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
279         throws RemoteException {
280         try {
281             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
282                     privateLayout, layoutId, parentLayoutId);
283 
284             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
285         }
286         catch (Exception e) {
287             _log.error(e, e);
288             throw new RemoteException(e.getMessage());
289         }
290     }
291 
292     public static com.liferay.portal.model.LayoutSoap updatePriority(
293         long plid, int priority) throws RemoteException {
294         try {
295             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
296                     priority);
297 
298             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
299         }
300         catch (Exception e) {
301             _log.error(e, e);
302             throw new RemoteException(e.getMessage());
303         }
304     }
305 
306     public static com.liferay.portal.model.LayoutSoap updatePriority(
307         long groupId, boolean privateLayout, long layoutId, int priority)
308         throws RemoteException {
309         try {
310             com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
311                     privateLayout, layoutId, priority);
312 
313             return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
314         }
315         catch (Exception e) {
316             _log.error(e, e);
317             throw new RemoteException(e.getMessage());
318         }
319     }
320 
321     private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class);
322 }