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.journal.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.journal.service.JournalStructureServiceUtil;
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.journal.service.JournalStructureServiceUtil} 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     * The benefits of using the SOAP utility is that it is cross platform
037     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
038     * even Perl, to call the generated services. One drawback of SOAP is that it is
039     * slow because it needs to serialize all calls into a text format (XML).
040     * </p>
041     *
042     * <p>
043     * You can see a list of services at http://localhost:8080/api/axis. Set the
044     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
045     * security.
046     * </p>
047     *
048     * <p>
049     * The SOAP utility is only generated for remote services.
050     * </p>
051     *
052     * @author Brian Wing Shun Chan
053     * @see JournalStructureServiceHttp
054     * @see com.liferay.portlet.journal.service.JournalStructureServiceUtil
055     * @deprecated As of 6.2.0, since Web Content Administration now uses the
056                Dynamic Data Mapping framework to handle templates
057     * @generated
058     */
059    public class JournalStructureServiceSoap {
060            public static com.liferay.portlet.journal.model.JournalStructureSoap addStructure(
061                    long groupId, java.lang.String structureId, boolean autoStructureId,
062                    java.lang.String parentStructureId,
063                    java.lang.String[] nameMapLanguageIds,
064                    java.lang.String[] nameMapValues,
065                    java.lang.String[] descriptionMapLanguageIds,
066                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws RemoteException {
069                    try {
070                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
071                                            nameMapValues);
072                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
073                                            descriptionMapValues);
074    
075                            com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.addStructure(groupId,
076                                            structureId, autoStructureId, parentStructureId, nameMap,
077                                            descriptionMap, xsd, serviceContext);
078    
079                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModel(returnValue);
080                    }
081                    catch (Exception e) {
082                            _log.error(e, e);
083    
084                            throw new RemoteException(e.getMessage());
085                    }
086            }
087    
088            public static com.liferay.portlet.journal.model.JournalStructureSoap copyStructure(
089                    long groupId, java.lang.String oldStructureId,
090                    java.lang.String newStructureId, boolean autoStructureId)
091                    throws RemoteException {
092                    try {
093                            com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.copyStructure(groupId,
094                                            oldStructureId, newStructureId, autoStructureId);
095    
096                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModel(returnValue);
097                    }
098                    catch (Exception e) {
099                            _log.error(e, e);
100    
101                            throw new RemoteException(e.getMessage());
102                    }
103            }
104    
105            public static void deleteStructure(long groupId,
106                    java.lang.String structureId) throws RemoteException {
107                    try {
108                            JournalStructureServiceUtil.deleteStructure(groupId, structureId);
109                    }
110                    catch (Exception e) {
111                            _log.error(e, e);
112    
113                            throw new RemoteException(e.getMessage());
114                    }
115            }
116    
117            public static com.liferay.portlet.journal.model.JournalStructureSoap getStructure(
118                    long groupId, java.lang.String structureId) throws RemoteException {
119                    try {
120                            com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.getStructure(groupId,
121                                            structureId);
122    
123                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModel(returnValue);
124                    }
125                    catch (Exception e) {
126                            _log.error(e, e);
127    
128                            throw new RemoteException(e.getMessage());
129                    }
130            }
131    
132            public static com.liferay.portlet.journal.model.JournalStructureSoap getStructure(
133                    long groupId, java.lang.String structureId,
134                    boolean includeGlobalStructures) throws RemoteException {
135                    try {
136                            com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.getStructure(groupId,
137                                            structureId, includeGlobalStructures);
138    
139                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModel(returnValue);
140                    }
141                    catch (Exception e) {
142                            _log.error(e, e);
143    
144                            throw new RemoteException(e.getMessage());
145                    }
146            }
147    
148            public static com.liferay.portlet.journal.model.JournalStructureSoap[] getStructures(
149                    long groupId) throws RemoteException {
150                    try {
151                            java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
152                                    JournalStructureServiceUtil.getStructures(groupId);
153    
154                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
155                    }
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.journal.model.JournalStructureSoap[] getStructures(
164                    long[] groupIds) throws RemoteException {
165                    try {
166                            java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
167                                    JournalStructureServiceUtil.getStructures(groupIds);
168    
169                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
170                    }
171                    catch (Exception e) {
172                            _log.error(e, e);
173    
174                            throw new RemoteException(e.getMessage());
175                    }
176            }
177    
178            public static com.liferay.portlet.journal.model.JournalStructureSoap[] search(
179                    long companyId, long[] groupIds, java.lang.String keywords, int start,
180                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
181                    throws RemoteException {
182                    try {
183                            java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
184                                    JournalStructureServiceUtil.search(companyId, groupIds,
185                                            keywords, start, end, obc);
186    
187                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
188                    }
189                    catch (Exception e) {
190                            _log.error(e, e);
191    
192                            throw new RemoteException(e.getMessage());
193                    }
194            }
195    
196            public static com.liferay.portlet.journal.model.JournalStructureSoap[] search(
197                    long companyId, long[] groupIds, java.lang.String structureId,
198                    java.lang.String name, java.lang.String description,
199                    boolean andOperator, int start, int end,
200                    com.liferay.portal.kernel.util.OrderByComparator obc)
201                    throws RemoteException {
202                    try {
203                            java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
204                                    JournalStructureServiceUtil.search(companyId, groupIds,
205                                            structureId, name, description, andOperator, start, end, obc);
206    
207                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
208                    }
209                    catch (Exception e) {
210                            _log.error(e, e);
211    
212                            throw new RemoteException(e.getMessage());
213                    }
214            }
215    
216            public static int searchCount(long companyId, long[] groupIds,
217                    java.lang.String keywords) throws RemoteException {
218                    try {
219                            int returnValue = JournalStructureServiceUtil.searchCount(companyId,
220                                            groupIds, keywords);
221    
222                            return returnValue;
223                    }
224                    catch (Exception e) {
225                            _log.error(e, e);
226    
227                            throw new RemoteException(e.getMessage());
228                    }
229            }
230    
231            public static int searchCount(long companyId, long[] groupIds,
232                    java.lang.String structureId, java.lang.String name,
233                    java.lang.String description, boolean andOperator)
234                    throws RemoteException {
235                    try {
236                            int returnValue = JournalStructureServiceUtil.searchCount(companyId,
237                                            groupIds, structureId, name, description, andOperator);
238    
239                            return 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.portlet.journal.model.JournalStructureSoap updateStructure(
249                    long groupId, java.lang.String structureId,
250                    java.lang.String parentStructureId,
251                    java.lang.String[] nameMapLanguageIds,
252                    java.lang.String[] nameMapValues,
253                    java.lang.String[] descriptionMapLanguageIds,
254                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
255                    com.liferay.portal.service.ServiceContext serviceContext)
256                    throws RemoteException {
257                    try {
258                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
259                                            nameMapValues);
260                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
261                                            descriptionMapValues);
262    
263                            com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.updateStructure(groupId,
264                                            structureId, parentStructureId, nameMap, descriptionMap,
265                                            xsd, serviceContext);
266    
267                            return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModel(returnValue);
268                    }
269                    catch (Exception e) {
270                            _log.error(e, e);
271    
272                            throw new RemoteException(e.getMessage());
273                    }
274            }
275    
276            private static Log _log = LogFactoryUtil.getLog(JournalStructureServiceSoap.class);
277    }