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