001    /**
002     * Copyright (c) 2000-2011 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    
020    import com.liferay.portlet.journal.service.JournalTemplateServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.journal.service.JournalTemplateServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     * </p>
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portlet.journal.model.JournalTemplateSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.journal.model.JournalTemplate}, that is translated to a
039     * {@link com.liferay.portlet.journal.model.JournalTemplateSoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at
052     * http://localhost:8080/api/secure/axis. Set the property
053     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author    Brian Wing Shun Chan
062     * @see       JournalTemplateServiceHttp
063     * @see       com.liferay.portlet.journal.model.JournalTemplateSoap
064     * @see       com.liferay.portlet.journal.service.JournalTemplateServiceUtil
065     * @generated
066     */
067    public class JournalTemplateServiceSoap {
068            public static com.liferay.portlet.journal.model.JournalTemplateSoap copyTemplate(
069                    long groupId, java.lang.String oldTemplateId,
070                    java.lang.String newTemplateId, boolean autoTemplateId)
071                    throws RemoteException {
072                    try {
073                            com.liferay.portlet.journal.model.JournalTemplate returnValue = JournalTemplateServiceUtil.copyTemplate(groupId,
074                                            oldTemplateId, newTemplateId, autoTemplateId);
075    
076                            return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModel(returnValue);
077                    }
078                    catch (Exception e) {
079                            _log.error(e, e);
080    
081                            throw new RemoteException(e.getMessage());
082                    }
083            }
084    
085            public static void deleteTemplate(long groupId, java.lang.String templateId)
086                    throws RemoteException {
087                    try {
088                            JournalTemplateServiceUtil.deleteTemplate(groupId, templateId);
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.journal.model.JournalTemplateSoap[] getStructureTemplates(
098                    long groupId, java.lang.String structureId) throws RemoteException {
099                    try {
100                            java.util.List<com.liferay.portlet.journal.model.JournalTemplate> returnValue =
101                                    JournalTemplateServiceUtil.getStructureTemplates(groupId,
102                                            structureId);
103    
104                            return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModels(returnValue);
105                    }
106                    catch (Exception e) {
107                            _log.error(e, e);
108    
109                            throw new RemoteException(e.getMessage());
110                    }
111            }
112    
113            public static com.liferay.portlet.journal.model.JournalTemplateSoap getTemplate(
114                    long groupId, java.lang.String templateId) throws RemoteException {
115                    try {
116                            com.liferay.portlet.journal.model.JournalTemplate returnValue = JournalTemplateServiceUtil.getTemplate(groupId,
117                                            templateId);
118    
119                            return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModel(returnValue);
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.journal.model.JournalTemplateSoap[] search(
129                    long companyId, long[] groupIds, java.lang.String keywords,
130                    java.lang.String structureId, java.lang.String structureIdComparator,
131                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
132                    throws RemoteException {
133                    try {
134                            java.util.List<com.liferay.portlet.journal.model.JournalTemplate> returnValue =
135                                    JournalTemplateServiceUtil.search(companyId, groupIds,
136                                            keywords, structureId, structureIdComparator, start, end,
137                                            obc);
138    
139                            return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModels(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.JournalTemplateSoap[] search(
149                    long companyId, long[] groupIds, java.lang.String templateId,
150                    java.lang.String structureId, java.lang.String structureIdComparator,
151                    java.lang.String name, java.lang.String description,
152                    boolean andOperator, int start, int end,
153                    com.liferay.portal.kernel.util.OrderByComparator obc)
154                    throws RemoteException {
155                    try {
156                            java.util.List<com.liferay.portlet.journal.model.JournalTemplate> returnValue =
157                                    JournalTemplateServiceUtil.search(companyId, groupIds,
158                                            templateId, structureId, structureIdComparator, name,
159                                            description, andOperator, start, end, obc);
160    
161                            return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModels(returnValue);
162                    }
163                    catch (Exception e) {
164                            _log.error(e, e);
165    
166                            throw new RemoteException(e.getMessage());
167                    }
168            }
169    
170            public static int searchCount(long companyId, long[] groupIds,
171                    java.lang.String keywords, java.lang.String structureId,
172                    java.lang.String structureIdComparator) throws RemoteException {
173                    try {
174                            int returnValue = JournalTemplateServiceUtil.searchCount(companyId,
175                                            groupIds, keywords, structureId, structureIdComparator);
176    
177                            return returnValue;
178                    }
179                    catch (Exception e) {
180                            _log.error(e, e);
181    
182                            throw new RemoteException(e.getMessage());
183                    }
184            }
185    
186            public static int searchCount(long companyId, long[] groupIds,
187                    java.lang.String templateId, java.lang.String structureId,
188                    java.lang.String structureIdComparator, java.lang.String name,
189                    java.lang.String description, boolean andOperator)
190                    throws RemoteException {
191                    try {
192                            int returnValue = JournalTemplateServiceUtil.searchCount(companyId,
193                                            groupIds, templateId, structureId, structureIdComparator,
194                                            name, description, andOperator);
195    
196                            return returnValue;
197                    }
198                    catch (Exception e) {
199                            _log.error(e, e);
200    
201                            throw new RemoteException(e.getMessage());
202                    }
203            }
204    
205            private static Log _log = LogFactoryUtil.getLog(JournalTemplateServiceSoap.class);
206    }