001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.LocalizationUtil;
020    
021    import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    import java.util.Locale;
026    import java.util.Map;
027    
028    /**
029     * Provides the SOAP utility for the
030     * {@link com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceUtil} service utility. The
031     * static methods of this class calls the same methods of the service utility.
032     * However, the signatures are different because it is difficult for SOAP to
033     * support certain types.
034     *
035     * <p>
036     * ServiceBuilder follows certain rules in translating the methods. For example,
037     * if the method in the service utility returns a {@link java.util.List}, that
038     * is translated to an array of {@link com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap}.
039     * If the method in the service utility returns a
040     * {@link com.liferay.portlet.documentlibrary.model.DLFileEntryType}, that is translated to a
041     * {@link com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap}. Methods that SOAP cannot
042     * safely wire are skipped.
043     * </p>
044     *
045     * <p>
046     * The benefits of using the SOAP utility is that it is cross platform
047     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
048     * even Perl, to call the generated services. One drawback of SOAP is that it is
049     * slow because it needs to serialize all calls into a text format (XML).
050     * </p>
051     *
052     * <p>
053     * You can see a list of services at http://localhost:8080/api/axis. Set the
054     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
055     * security.
056     * </p>
057     *
058     * <p>
059     * The SOAP utility is only generated for remote services.
060     * </p>
061     *
062     * @author Brian Wing Shun Chan
063     * @see DLFileEntryTypeServiceHttp
064     * @see com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap
065     * @see com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceUtil
066     * @generated
067     */
068    public class DLFileEntryTypeServiceSoap {
069            public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap addFileEntryType(
070                    long groupId, java.lang.String fileEntryTypeKey,
071                    java.lang.String[] nameMapLanguageIds,
072                    java.lang.String[] nameMapValues,
073                    java.lang.String[] descriptionMapLanguageIds,
074                    java.lang.String[] descriptionMapValues, long[] ddmStructureIds,
075                    com.liferay.portal.service.ServiceContext serviceContext)
076                    throws RemoteException {
077                    try {
078                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
079                                            nameMapValues);
080                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
081                                            descriptionMapValues);
082    
083                            com.liferay.portlet.documentlibrary.model.DLFileEntryType returnValue =
084                                    DLFileEntryTypeServiceUtil.addFileEntryType(groupId,
085                                            fileEntryTypeKey, nameMap, descriptionMap, ddmStructureIds,
086                                            serviceContext);
087    
088                            return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModel(returnValue);
089                    }
090                    catch (Exception e) {
091                            _log.error(e, e);
092    
093                            throw new RemoteException(e.getMessage());
094                    }
095            }
096    
097            public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap addFileEntryType(
098                    long groupId, java.lang.String name, java.lang.String description,
099                    long[] ddmStructureIds,
100                    com.liferay.portal.service.ServiceContext serviceContext)
101                    throws RemoteException {
102                    try {
103                            com.liferay.portlet.documentlibrary.model.DLFileEntryType returnValue =
104                                    DLFileEntryTypeServiceUtil.addFileEntryType(groupId, name,
105                                            description, ddmStructureIds, serviceContext);
106    
107                            return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModel(returnValue);
108                    }
109                    catch (Exception e) {
110                            _log.error(e, e);
111    
112                            throw new RemoteException(e.getMessage());
113                    }
114            }
115    
116            public static void deleteFileEntryType(long fileEntryTypeId)
117                    throws RemoteException {
118                    try {
119                            DLFileEntryTypeServiceUtil.deleteFileEntryType(fileEntryTypeId);
120                    }
121                    catch (Exception e) {
122                            _log.error(e, e);
123    
124                            throw new RemoteException(e.getMessage());
125                    }
126            }
127    
128            public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap getFileEntryType(
129                    long fileEntryTypeId) throws RemoteException {
130                    try {
131                            com.liferay.portlet.documentlibrary.model.DLFileEntryType returnValue =
132                                    DLFileEntryTypeServiceUtil.getFileEntryType(fileEntryTypeId);
133    
134                            return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModel(returnValue);
135                    }
136                    catch (Exception e) {
137                            _log.error(e, e);
138    
139                            throw new RemoteException(e.getMessage());
140                    }
141            }
142    
143            public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap[] getFileEntryTypes(
144                    long[] groupIds) throws RemoteException {
145                    try {
146                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
147                                    DLFileEntryTypeServiceUtil.getFileEntryTypes(groupIds);
148    
149                            return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(returnValue);
150                    }
151                    catch (Exception e) {
152                            _log.error(e, e);
153    
154                            throw new RemoteException(e.getMessage());
155                    }
156            }
157    
158            public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap[] getFileEntryTypes(
159                    long[] groupIds, int start, int end) throws RemoteException {
160                    try {
161                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
162                                    DLFileEntryTypeServiceUtil.getFileEntryTypes(groupIds, start,
163                                            end);
164    
165                            return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(returnValue);
166                    }
167                    catch (Exception e) {
168                            _log.error(e, e);
169    
170                            throw new RemoteException(e.getMessage());
171                    }
172            }
173    
174            public static int getFileEntryTypesCount(long[] groupIds)
175                    throws RemoteException {
176                    try {
177                            int returnValue = DLFileEntryTypeServiceUtil.getFileEntryTypesCount(groupIds);
178    
179                            return returnValue;
180                    }
181                    catch (Exception e) {
182                            _log.error(e, e);
183    
184                            throw new RemoteException(e.getMessage());
185                    }
186            }
187    
188            public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap[] getFolderFileEntryTypes(
189                    long[] groupIds, long folderId, boolean inherited)
190                    throws RemoteException {
191                    try {
192                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
193                                    DLFileEntryTypeServiceUtil.getFolderFileEntryTypes(groupIds,
194                                            folderId, inherited);
195    
196                            return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(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.portlet.documentlibrary.model.DLFileEntryTypeSoap[] search(
206                    long companyId, long[] groupIds, java.lang.String keywords,
207                    boolean includeBasicFileEntryType, int start, int end,
208                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209                    throws RemoteException {
210                    try {
211                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
212                                    DLFileEntryTypeServiceUtil.search(companyId, groupIds,
213                                            keywords, includeBasicFileEntryType, start, end,
214                                            orderByComparator);
215    
216                            return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(returnValue);
217                    }
218                    catch (Exception e) {
219                            _log.error(e, e);
220    
221                            throw new RemoteException(e.getMessage());
222                    }
223            }
224    
225            public static int searchCount(long companyId, long[] groupIds,
226                    java.lang.String keywords, boolean includeBasicFileEntryType)
227                    throws RemoteException {
228                    try {
229                            int returnValue = DLFileEntryTypeServiceUtil.searchCount(companyId,
230                                            groupIds, keywords, includeBasicFileEntryType);
231    
232                            return returnValue;
233                    }
234                    catch (Exception e) {
235                            _log.error(e, e);
236    
237                            throw new RemoteException(e.getMessage());
238                    }
239            }
240    
241            public static void updateFileEntryType(long fileEntryTypeId,
242                    java.lang.String[] nameMapLanguageIds,
243                    java.lang.String[] nameMapValues,
244                    java.lang.String[] descriptionMapLanguageIds,
245                    java.lang.String[] descriptionMapValues, long[] ddmStructureIds,
246                    com.liferay.portal.service.ServiceContext serviceContext)
247                    throws RemoteException {
248                    try {
249                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
250                                            nameMapValues);
251                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
252                                            descriptionMapValues);
253    
254                            DLFileEntryTypeServiceUtil.updateFileEntryType(fileEntryTypeId,
255                                    nameMap, descriptionMap, ddmStructureIds, serviceContext);
256                    }
257                    catch (Exception e) {
258                            _log.error(e, e);
259    
260                            throw new RemoteException(e.getMessage());
261                    }
262            }
263    
264            public static void updateFileEntryType(long fileEntryTypeId,
265                    java.lang.String name, java.lang.String description,
266                    long[] ddmStructureIds,
267                    com.liferay.portal.service.ServiceContext serviceContext)
268                    throws RemoteException {
269                    try {
270                            DLFileEntryTypeServiceUtil.updateFileEntryType(fileEntryTypeId,
271                                    name, description, ddmStructureIds, serviceContext);
272                    }
273                    catch (Exception e) {
274                            _log.error(e, e);
275    
276                            throw new RemoteException(e.getMessage());
277                    }
278            }
279    
280            private static Log _log = LogFactoryUtil.getLog(DLFileEntryTypeServiceSoap.class);
281    }