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