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.DLFileEntryServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="DLFileEntryServiceSoap.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.DLFileEntryServiceUtil</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.DLFileEntrySoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.documentlibrary.model.DLFileEntry</code>,
052: * that is translated to a <code>com.liferay.portlet.documentlibrary.model.DLFileEntrySoap</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.DLFileEntryServiceUtil
077: * @see com.liferay.portlet.documentlibrary.service.http.DLFileEntryServiceHttp
078: * @see com.liferay.portlet.documentlibrary.service.model.DLFileEntrySoap
079: *
080: */
081: public class DLFileEntryServiceSoap {
082: public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap addFileEntry(
083: long folderId, java.lang.String name,
084: java.lang.String title, java.lang.String description,
085: java.lang.String[] tagsEntries,
086: java.lang.String extraSettings, byte[] byteArray,
087: boolean addCommunityPermissions, boolean addGuestPermissions)
088: throws RemoteException {
089: try {
090: com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil
091: .addFileEntry(folderId, name, title, description,
092: tagsEntries, extraSettings, byteArray,
093: addCommunityPermissions,
094: addGuestPermissions);
095:
096: return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
097: .toSoapModel(returnValue);
098: } catch (Exception e) {
099: _log.error(e, e);
100:
101: throw new RemoteException(e.getMessage());
102: }
103: }
104:
105: public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap addFileEntry(
106: long folderId, java.lang.String name,
107: java.lang.String title, java.lang.String description,
108: java.lang.String[] tagsEntries,
109: java.lang.String extraSettings, byte[] byteArray,
110: java.lang.String[] communityPermissions,
111: java.lang.String[] guestPermissions) throws RemoteException {
112: try {
113: com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil
114: .addFileEntry(folderId, name, title, description,
115: tagsEntries, extraSettings, byteArray,
116: communityPermissions, guestPermissions);
117:
118: return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
119: .toSoapModel(returnValue);
120: } catch (Exception e) {
121: _log.error(e, e);
122:
123: throw new RemoteException(e.getMessage());
124: }
125: }
126:
127: public static void deleteFileEntry(long folderId,
128: java.lang.String name) throws RemoteException {
129: try {
130: DLFileEntryServiceUtil.deleteFileEntry(folderId, name);
131: } catch (Exception e) {
132: _log.error(e, e);
133:
134: throw new RemoteException(e.getMessage());
135: }
136: }
137:
138: public static void deleteFileEntry(long folderId,
139: java.lang.String name, double version)
140: throws RemoteException {
141: try {
142: DLFileEntryServiceUtil.deleteFileEntry(folderId, name,
143: version);
144: } catch (Exception e) {
145: _log.error(e, e);
146:
147: throw new RemoteException(e.getMessage());
148: }
149: }
150:
151: public static void deleteFileEntryByTitle(long folderId,
152: java.lang.String titleWithExtension) throws RemoteException {
153: try {
154: DLFileEntryServiceUtil.deleteFileEntryByTitle(folderId,
155: titleWithExtension);
156: } catch (Exception e) {
157: _log.error(e, e);
158:
159: throw new RemoteException(e.getMessage());
160: }
161: }
162:
163: public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
164: long folderId, java.lang.String name)
165: throws RemoteException {
166: try {
167: com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil
168: .getFileEntry(folderId, name);
169:
170: return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
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.DLFileEntrySoap getFileEntryByTitle(
180: long folderId, java.lang.String titleWithExtension)
181: throws RemoteException {
182: try {
183: com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil
184: .getFileEntryByTitle(folderId, titleWithExtension);
185:
186: return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
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 void lockFileEntry(long folderId,
196: java.lang.String name) throws RemoteException {
197: try {
198: DLFileEntryServiceUtil.lockFileEntry(folderId, name);
199: } catch (Exception e) {
200: _log.error(e, e);
201:
202: throw new RemoteException(e.getMessage());
203: }
204: }
205:
206: public static void unlockFileEntry(long folderId,
207: java.lang.String name) throws RemoteException {
208: try {
209: DLFileEntryServiceUtil.unlockFileEntry(folderId, name);
210: } catch (Exception e) {
211: _log.error(e, e);
212:
213: throw new RemoteException(e.getMessage());
214: }
215: }
216:
217: public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap updateFileEntry(
218: long folderId, long newFolderId, java.lang.String name,
219: java.lang.String sourceFileName, java.lang.String title,
220: java.lang.String description,
221: java.lang.String[] tagsEntries,
222: java.lang.String extraSettings, byte[] byteArray)
223: throws RemoteException {
224: try {
225: com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil
226: .updateFileEntry(folderId, newFolderId, name,
227: sourceFileName, title, description,
228: tagsEntries, extraSettings, byteArray);
229:
230: return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
231: .toSoapModel(returnValue);
232: } catch (Exception e) {
233: _log.error(e, e);
234:
235: throw new RemoteException(e.getMessage());
236: }
237: }
238:
239: private static Log _log = LogFactoryUtil
240: .getLog(DLFileEntryServiceSoap.class);
241: }
|