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.portlet.documentlibrary.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025:
026: import com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="DLFolderServiceSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class provides a SOAP utility for the
040: * <code>com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil</code> service
041: * utility. The static methods of this class calls the same methods of the
042: * service utility. However, the signatures are different because it is
043: * difficult for SOAP to support certain types.
044: * </p>
045: *
046: * <p>
047: * ServiceBuilder follows certain rules in translating the methods. For example,
048: * if the method in the service utility returns a <code>java.util.List</code>,
049: * that is translated to an array of
050: * <code>com.liferay.portlet.documentlibrary.model.DLFolderSoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.documentlibrary.model.DLFolder</code>,
052: * that is translated to a <code>com.liferay.portlet.documentlibrary.model.DLFolderSoap</code>.
053: * Methods that SOAP cannot safely wire are skipped.
054: * </p>
055: *
056: * <p>
057: * The benefits of using the SOAP utility is that it is cross platform
058: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
059: * even Perl, to call the generated services. One drawback of SOAP is that it is
060: * slow because it needs to serialize all calls into a text format (XML).
061: * </p>
062: *
063: * <p>
064: * You can see a list of services at
065: * http://localhost:8080/tunnel-web/secure/axis. Set the property
066: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
067: * security.
068: * </p>
069: *
070: * <p>
071: * The SOAP utility is only generated for remote services.
072: * </p>
073: *
074: * @author Brian Wing Shun Chan
075: *
076: * @see com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
077: * @see com.liferay.portlet.documentlibrary.service.http.DLFolderServiceHttp
078: * @see com.liferay.portlet.documentlibrary.service.model.DLFolderSoap
079: *
080: */
081: public class DLFolderServiceSoap {
082: public static com.liferay.portlet.documentlibrary.model.DLFolderSoap addFolder(
083: long plid, long parentFolderId, java.lang.String name,
084: java.lang.String description,
085: boolean addCommunityPermissions, boolean addGuestPermissions)
086: throws RemoteException {
087: try {
088: com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil
089: .addFolder(plid, parentFolderId, name, description,
090: addCommunityPermissions,
091: addGuestPermissions);
092:
093: return com.liferay.portlet.documentlibrary.model.DLFolderSoap
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 com.liferay.portlet.documentlibrary.model.DLFolderSoap addFolder(
103: long plid, long parentFolderId, java.lang.String name,
104: java.lang.String description,
105: java.lang.String[] communityPermissions,
106: java.lang.String[] guestPermissions) throws RemoteException {
107: try {
108: com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil
109: .addFolder(plid, parentFolderId, name, description,
110: communityPermissions, guestPermissions);
111:
112: return com.liferay.portlet.documentlibrary.model.DLFolderSoap
113: .toSoapModel(returnValue);
114: } catch (Exception e) {
115: _log.error(e, e);
116:
117: throw new RemoteException(e.getMessage());
118: }
119: }
120:
121: public static com.liferay.portlet.documentlibrary.model.DLFolderSoap copyFolder(
122: long plid, long sourceFolderId, long parentFolderId,
123: java.lang.String name, java.lang.String description,
124: boolean addCommunityPermissions, boolean addGuestPermissions)
125: throws RemoteException {
126: try {
127: com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil
128: .copyFolder(plid, sourceFolderId, parentFolderId,
129: name, description, addCommunityPermissions,
130: addGuestPermissions);
131:
132: return com.liferay.portlet.documentlibrary.model.DLFolderSoap
133: .toSoapModel(returnValue);
134: } catch (Exception e) {
135: _log.error(e, e);
136:
137: throw new RemoteException(e.getMessage());
138: }
139: }
140:
141: public static void deleteFolder(long folderId)
142: throws RemoteException {
143: try {
144: DLFolderServiceUtil.deleteFolder(folderId);
145: } catch (Exception e) {
146: _log.error(e, e);
147:
148: throw new RemoteException(e.getMessage());
149: }
150: }
151:
152: public static void deleteFolder(long groupId, long parentFolderId,
153: java.lang.String name) throws RemoteException {
154: try {
155: DLFolderServiceUtil.deleteFolder(groupId, parentFolderId,
156: name);
157: } catch (Exception e) {
158: _log.error(e, e);
159:
160: throw new RemoteException(e.getMessage());
161: }
162: }
163:
164: public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
165: long folderId) throws RemoteException {
166: try {
167: com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil
168: .getFolder(folderId);
169:
170: return com.liferay.portlet.documentlibrary.model.DLFolderSoap
171: .toSoapModel(returnValue);
172: } catch (Exception e) {
173: _log.error(e, e);
174:
175: throw new RemoteException(e.getMessage());
176: }
177: }
178:
179: public static com.liferay.portlet.documentlibrary.model.DLFolderSoap getFolder(
180: long groupId, long parentFolderId, java.lang.String name)
181: throws RemoteException {
182: try {
183: com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil
184: .getFolder(groupId, parentFolderId, name);
185:
186: return com.liferay.portlet.documentlibrary.model.DLFolderSoap
187: .toSoapModel(returnValue);
188: } catch (Exception e) {
189: _log.error(e, e);
190:
191: throw new RemoteException(e.getMessage());
192: }
193: }
194:
195: public static long getFolderId(long groupId, long parentFolderId,
196: java.lang.String name) throws RemoteException {
197: try {
198: long returnValue = DLFolderServiceUtil.getFolderId(groupId,
199: parentFolderId, name);
200:
201: return returnValue;
202: } catch (Exception e) {
203: _log.error(e, e);
204:
205: throw new RemoteException(e.getMessage());
206: }
207: }
208:
209: public static void reIndexSearch(long companyId)
210: throws RemoteException {
211: try {
212: DLFolderServiceUtil.reIndexSearch(companyId);
213: } catch (Exception e) {
214: _log.error(e, e);
215:
216: throw new RemoteException(e.getMessage());
217: }
218: }
219:
220: public static com.liferay.portlet.documentlibrary.model.DLFolderSoap updateFolder(
221: long folderId, long parentFolderId, java.lang.String name,
222: java.lang.String description) throws RemoteException {
223: try {
224: com.liferay.portlet.documentlibrary.model.DLFolder returnValue = DLFolderServiceUtil
225: .updateFolder(folderId, parentFolderId, name,
226: description);
227:
228: return com.liferay.portlet.documentlibrary.model.DLFolderSoap
229: .toSoapModel(returnValue);
230: } catch (Exception e) {
231: _log.error(e, e);
232:
233: throw new RemoteException(e.getMessage());
234: }
235: }
236:
237: private static Log _log = LogFactoryUtil
238: .getLog(DLFolderServiceSoap.class);
239: }
|