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.dynamicdatamapping.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.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil;
025    
026    /**
027     * <p>
028     * This class provides a HTTP utility for the
029     * {@link com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it requires an additional
032     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
033     * </p>
034     *
035     * <p>
036     * The benefits of using the HTTP utility is that it is fast and allows for
037     * tunneling without the cost of serializing to text. The drawback is that it
038     * only works with Java.
039     * </p>
040     *
041     * <p>
042     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
043     * configure security.
044     * </p>
045     *
046     * <p>
047     * The HTTP utility is only generated for remote services.
048     * </p>
049     *
050     * @author    Brian Wing Shun Chan
051     * @see       DDMTemplateServiceSoap
052     * @see       com.liferay.portal.security.auth.HttpPrincipal
053     * @see       com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil
054     * @generated
055     */
056    public class DDMTemplateServiceHttp {
057            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
058                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
059                    long classPK,
060                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
061                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062                    java.lang.String type, java.lang.String mode,
063                    java.lang.String language, java.lang.String script,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    try {
068                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
069                                            "addTemplate", _addTemplateParameterTypes0);
070    
071                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
072                                            classNameId, classPK, nameMap, descriptionMap, type, mode,
073                                            language, script, serviceContext);
074    
075                            Object returnObj = null;
076    
077                            try {
078                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
079                            }
080                            catch (Exception e) {
081                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
082                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
083                                    }
084    
085                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
086                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
087                                    }
088    
089                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
090                            }
091    
092                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
093                    }
094                    catch (com.liferay.portal.kernel.exception.SystemException se) {
095                            _log.error(se, se);
096    
097                            throw se;
098                    }
099            }
100    
101            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
102                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
103                    long classPK, java.lang.String templateKey,
104                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
105                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
106                    java.lang.String type, java.lang.String mode,
107                    java.lang.String language, java.lang.String script, boolean cacheable,
108                    boolean smallImage, java.lang.String smallImageURL,
109                    java.io.File smallImageFile,
110                    com.liferay.portal.service.ServiceContext serviceContext)
111                    throws com.liferay.portal.kernel.exception.PortalException,
112                            com.liferay.portal.kernel.exception.SystemException {
113                    try {
114                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
115                                            "addTemplate", _addTemplateParameterTypes1);
116    
117                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
118                                            classNameId, classPK, templateKey, nameMap, descriptionMap,
119                                            type, mode, language, script, cacheable, smallImage,
120                                            smallImageURL, smallImageFile, serviceContext);
121    
122                            Object returnObj = null;
123    
124                            try {
125                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
126                            }
127                            catch (Exception e) {
128                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
129                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
130                                    }
131    
132                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
133                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
134                                    }
135    
136                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
137                            }
138    
139                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
140                    }
141                    catch (com.liferay.portal.kernel.exception.SystemException se) {
142                            _log.error(se, se);
143    
144                            throw se;
145                    }
146            }
147    
148            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
149                    HttpPrincipal httpPrincipal, long templateId,
150                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
151                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
152                    com.liferay.portal.service.ServiceContext serviceContext)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    try {
156                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
157                                            "copyTemplate", _copyTemplateParameterTypes2);
158    
159                            MethodHandler methodHandler = new MethodHandler(methodKey,
160                                            templateId, nameMap, descriptionMap, serviceContext);
161    
162                            Object returnObj = null;
163    
164                            try {
165                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
166                            }
167                            catch (Exception e) {
168                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
169                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
170                                    }
171    
172                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
173                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
174                                    }
175    
176                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
177                            }
178    
179                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
180                    }
181                    catch (com.liferay.portal.kernel.exception.SystemException se) {
182                            _log.error(se, se);
183    
184                            throw se;
185                    }
186            }
187    
188            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
189                    HttpPrincipal httpPrincipal, long templateId,
190                    com.liferay.portal.service.ServiceContext serviceContext)
191                    throws com.liferay.portal.kernel.exception.PortalException,
192                            com.liferay.portal.kernel.exception.SystemException {
193                    try {
194                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
195                                            "copyTemplate", _copyTemplateParameterTypes3);
196    
197                            MethodHandler methodHandler = new MethodHandler(methodKey,
198                                            templateId, serviceContext);
199    
200                            Object returnObj = null;
201    
202                            try {
203                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
204                            }
205                            catch (Exception e) {
206                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
207                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
208                                    }
209    
210                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
211                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
212                                    }
213    
214                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
215                            }
216    
217                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
218                    }
219                    catch (com.liferay.portal.kernel.exception.SystemException se) {
220                            _log.error(se, se);
221    
222                            throw se;
223                    }
224            }
225    
226            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> copyTemplates(
227                    HttpPrincipal httpPrincipal, long classNameId, long classPK,
228                    long newClassPK, java.lang.String type,
229                    com.liferay.portal.service.ServiceContext serviceContext)
230                    throws com.liferay.portal.kernel.exception.PortalException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    try {
233                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
234                                            "copyTemplates", _copyTemplatesParameterTypes4);
235    
236                            MethodHandler methodHandler = new MethodHandler(methodKey,
237                                            classNameId, classPK, newClassPK, type, serviceContext);
238    
239                            Object returnObj = null;
240    
241                            try {
242                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
243                            }
244                            catch (Exception e) {
245                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
246                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
247                                    }
248    
249                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
250                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
251                                    }
252    
253                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
254                            }
255    
256                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
257                    }
258                    catch (com.liferay.portal.kernel.exception.SystemException se) {
259                            _log.error(se, se);
260    
261                            throw se;
262                    }
263            }
264    
265            public static void deleteTemplate(HttpPrincipal httpPrincipal,
266                    long templateId)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    try {
270                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
271                                            "deleteTemplate", _deleteTemplateParameterTypes5);
272    
273                            MethodHandler methodHandler = new MethodHandler(methodKey,
274                                            templateId);
275    
276                            try {
277                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
278                            }
279                            catch (Exception e) {
280                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
281                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
282                                    }
283    
284                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
285                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
286                                    }
287    
288                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
289                            }
290                    }
291                    catch (com.liferay.portal.kernel.exception.SystemException se) {
292                            _log.error(se, se);
293    
294                            throw se;
295                    }
296            }
297    
298            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate(
299                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
300                    java.lang.String templateKey)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    try {
304                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
305                                            "fetchTemplate", _fetchTemplateParameterTypes6);
306    
307                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
308                                            classNameId, templateKey);
309    
310                            Object returnObj = null;
311    
312                            try {
313                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
314                            }
315                            catch (Exception e) {
316                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
317                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
318                                    }
319    
320                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
321                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
322                                    }
323    
324                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
325                            }
326    
327                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
328                    }
329                    catch (com.liferay.portal.kernel.exception.SystemException se) {
330                            _log.error(se, se);
331    
332                            throw se;
333                    }
334            }
335    
336            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
337                    HttpPrincipal httpPrincipal, long templateId)
338                    throws com.liferay.portal.kernel.exception.PortalException,
339                            com.liferay.portal.kernel.exception.SystemException {
340                    try {
341                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
342                                            "getTemplate", _getTemplateParameterTypes7);
343    
344                            MethodHandler methodHandler = new MethodHandler(methodKey,
345                                            templateId);
346    
347                            Object returnObj = null;
348    
349                            try {
350                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
351                            }
352                            catch (Exception e) {
353                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
354                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
355                                    }
356    
357                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
358                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
359                                    }
360    
361                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
362                            }
363    
364                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
365                    }
366                    catch (com.liferay.portal.kernel.exception.SystemException se) {
367                            _log.error(se, se);
368    
369                            throw se;
370                    }
371            }
372    
373            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
374                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
375                    java.lang.String templateKey)
376                    throws com.liferay.portal.kernel.exception.PortalException,
377                            com.liferay.portal.kernel.exception.SystemException {
378                    try {
379                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
380                                            "getTemplate", _getTemplateParameterTypes8);
381    
382                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
383                                            classNameId, templateKey);
384    
385                            Object returnObj = null;
386    
387                            try {
388                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
389                            }
390                            catch (Exception e) {
391                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
392                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
393                                    }
394    
395                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
396                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
397                                    }
398    
399                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
400                            }
401    
402                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
403                    }
404                    catch (com.liferay.portal.kernel.exception.SystemException se) {
405                            _log.error(se, se);
406    
407                            throw se;
408                    }
409            }
410    
411            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
412                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
413                    java.lang.String templateKey, boolean includeGlobalTemplates)
414                    throws com.liferay.portal.kernel.exception.PortalException,
415                            com.liferay.portal.kernel.exception.SystemException {
416                    try {
417                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
418                                            "getTemplate", _getTemplateParameterTypes9);
419    
420                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
421                                            classNameId, templateKey, includeGlobalTemplates);
422    
423                            Object returnObj = null;
424    
425                            try {
426                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
427                            }
428                            catch (Exception e) {
429                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
430                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
431                                    }
432    
433                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
434                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
435                                    }
436    
437                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
438                            }
439    
440                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
441                    }
442                    catch (com.liferay.portal.kernel.exception.SystemException se) {
443                            _log.error(se, se);
444    
445                            throw se;
446                    }
447            }
448    
449            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
450                    HttpPrincipal httpPrincipal, long groupId, long classNameId)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    try {
453                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
454                                            "getTemplates", _getTemplatesParameterTypes10);
455    
456                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
457                                            classNameId);
458    
459                            Object returnObj = null;
460    
461                            try {
462                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
463                            }
464                            catch (Exception e) {
465                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
466                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
467                                    }
468    
469                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
470                            }
471    
472                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
473                    }
474                    catch (com.liferay.portal.kernel.exception.SystemException se) {
475                            _log.error(se, se);
476    
477                            throw se;
478                    }
479            }
480    
481            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
482                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
483                    long classPK)
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    try {
486                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
487                                            "getTemplates", _getTemplatesParameterTypes11);
488    
489                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
490                                            classNameId, classPK);
491    
492                            Object returnObj = null;
493    
494                            try {
495                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
496                            }
497                            catch (Exception e) {
498                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
499                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
500                                    }
501    
502                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
503                            }
504    
505                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
506                    }
507                    catch (com.liferay.portal.kernel.exception.SystemException se) {
508                            _log.error(se, se);
509    
510                            throw se;
511                    }
512            }
513    
514            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
515                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
516                    long classPK, java.lang.String type)
517                    throws com.liferay.portal.kernel.exception.SystemException {
518                    try {
519                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
520                                            "getTemplates", _getTemplatesParameterTypes12);
521    
522                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
523                                            classNameId, classPK, type);
524    
525                            Object returnObj = null;
526    
527                            try {
528                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
529                            }
530                            catch (Exception e) {
531                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
532                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
533                                    }
534    
535                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
536                            }
537    
538                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
539                    }
540                    catch (com.liferay.portal.kernel.exception.SystemException se) {
541                            _log.error(se, se);
542    
543                            throw se;
544                    }
545            }
546    
547            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
548                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
549                    long classPK, java.lang.String type, java.lang.String mode)
550                    throws com.liferay.portal.kernel.exception.SystemException {
551                    try {
552                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
553                                            "getTemplates", _getTemplatesParameterTypes13);
554    
555                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
556                                            classNameId, classPK, type, mode);
557    
558                            Object returnObj = null;
559    
560                            try {
561                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
562                            }
563                            catch (Exception e) {
564                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
565                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
566                                    }
567    
568                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
569                            }
570    
571                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
572                    }
573                    catch (com.liferay.portal.kernel.exception.SystemException se) {
574                            _log.error(se, se);
575    
576                            throw se;
577                    }
578            }
579    
580            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK(
581                    HttpPrincipal httpPrincipal, long groupId, long classPK)
582                    throws com.liferay.portal.kernel.exception.SystemException {
583                    try {
584                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
585                                            "getTemplatesByClassPK",
586                                            _getTemplatesByClassPKParameterTypes14);
587    
588                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
589                                            classPK);
590    
591                            Object returnObj = null;
592    
593                            try {
594                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
595                            }
596                            catch (Exception e) {
597                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
598                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
599                                    }
600    
601                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
602                            }
603    
604                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
605                    }
606                    catch (com.liferay.portal.kernel.exception.SystemException se) {
607                            _log.error(se, se);
608    
609                            throw se;
610                    }
611            }
612    
613            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByStructureClassNameId(
614                    HttpPrincipal httpPrincipal, long groupId, long structureClassNameId,
615                    int start, int end,
616                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
617                    throws com.liferay.portal.kernel.exception.SystemException {
618                    try {
619                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
620                                            "getTemplatesByStructureClassNameId",
621                                            _getTemplatesByStructureClassNameIdParameterTypes15);
622    
623                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
624                                            structureClassNameId, start, end, orderByComparator);
625    
626                            Object returnObj = null;
627    
628                            try {
629                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
630                            }
631                            catch (Exception e) {
632                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
633                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
634                                    }
635    
636                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
637                            }
638    
639                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
640                    }
641                    catch (com.liferay.portal.kernel.exception.SystemException se) {
642                            _log.error(se, se);
643    
644                            throw se;
645                    }
646            }
647    
648            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
649                    HttpPrincipal httpPrincipal, long companyId, long groupId,
650                    long classNameId, long classPK, java.lang.String keywords,
651                    java.lang.String type, java.lang.String mode, int start, int end,
652                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
653                    throws com.liferay.portal.kernel.exception.SystemException {
654                    try {
655                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
656                                            "search", _searchParameterTypes16);
657    
658                            MethodHandler methodHandler = new MethodHandler(methodKey,
659                                            companyId, groupId, classNameId, classPK, keywords, type,
660                                            mode, start, end, orderByComparator);
661    
662                            Object returnObj = null;
663    
664                            try {
665                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
666                            }
667                            catch (Exception e) {
668                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
669                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
670                                    }
671    
672                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
673                            }
674    
675                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
676                    }
677                    catch (com.liferay.portal.kernel.exception.SystemException se) {
678                            _log.error(se, se);
679    
680                            throw se;
681                    }
682            }
683    
684            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
685                    HttpPrincipal httpPrincipal, long companyId, long groupId,
686                    long classNameId, long classPK, java.lang.String name,
687                    java.lang.String description, java.lang.String type,
688                    java.lang.String mode, java.lang.String language, boolean andOperator,
689                    int start, int end,
690                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
691                    throws com.liferay.portal.kernel.exception.SystemException {
692                    try {
693                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
694                                            "search", _searchParameterTypes17);
695    
696                            MethodHandler methodHandler = new MethodHandler(methodKey,
697                                            companyId, groupId, classNameId, classPK, name,
698                                            description, type, mode, language, andOperator, start, end,
699                                            orderByComparator);
700    
701                            Object returnObj = null;
702    
703                            try {
704                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
705                            }
706                            catch (Exception e) {
707                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
708                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
709                                    }
710    
711                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
712                            }
713    
714                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
715                    }
716                    catch (com.liferay.portal.kernel.exception.SystemException se) {
717                            _log.error(se, se);
718    
719                            throw se;
720                    }
721            }
722    
723            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
724                    HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
725                    long[] classNameIds, long classPK, java.lang.String keywords,
726                    java.lang.String type, java.lang.String mode, int start, int end,
727                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
728                    throws com.liferay.portal.kernel.exception.SystemException {
729                    try {
730                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
731                                            "search", _searchParameterTypes18);
732    
733                            MethodHandler methodHandler = new MethodHandler(methodKey,
734                                            companyId, groupIds, classNameIds, classPK, keywords, type,
735                                            mode, start, end, orderByComparator);
736    
737                            Object returnObj = null;
738    
739                            try {
740                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
741                            }
742                            catch (Exception e) {
743                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
744                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
745                                    }
746    
747                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
748                            }
749    
750                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
751                    }
752                    catch (com.liferay.portal.kernel.exception.SystemException se) {
753                            _log.error(se, se);
754    
755                            throw se;
756                    }
757            }
758    
759            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
760                    HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
761                    long[] classNameIds, long classPK, java.lang.String name,
762                    java.lang.String description, java.lang.String type,
763                    java.lang.String mode, java.lang.String language, boolean andOperator,
764                    int start, int end,
765                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
766                    throws com.liferay.portal.kernel.exception.SystemException {
767                    try {
768                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
769                                            "search", _searchParameterTypes19);
770    
771                            MethodHandler methodHandler = new MethodHandler(methodKey,
772                                            companyId, groupIds, classNameIds, classPK, name,
773                                            description, type, mode, language, andOperator, start, end,
774                                            orderByComparator);
775    
776                            Object returnObj = null;
777    
778                            try {
779                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
780                            }
781                            catch (Exception e) {
782                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
783                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
784                                    }
785    
786                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
787                            }
788    
789                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
790                    }
791                    catch (com.liferay.portal.kernel.exception.SystemException se) {
792                            _log.error(se, se);
793    
794                            throw se;
795                    }
796            }
797    
798            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
799                    long groupId, long classNameId, long classPK,
800                    java.lang.String keywords, java.lang.String type, java.lang.String mode)
801                    throws com.liferay.portal.kernel.exception.SystemException {
802                    try {
803                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
804                                            "searchCount", _searchCountParameterTypes20);
805    
806                            MethodHandler methodHandler = new MethodHandler(methodKey,
807                                            companyId, groupId, classNameId, classPK, keywords, type,
808                                            mode);
809    
810                            Object returnObj = null;
811    
812                            try {
813                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
814                            }
815                            catch (Exception e) {
816                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
817                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
818                                    }
819    
820                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
821                            }
822    
823                            return ((Integer)returnObj).intValue();
824                    }
825                    catch (com.liferay.portal.kernel.exception.SystemException se) {
826                            _log.error(se, se);
827    
828                            throw se;
829                    }
830            }
831    
832            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
833                    long groupId, long classNameId, long classPK, java.lang.String name,
834                    java.lang.String description, java.lang.String type,
835                    java.lang.String mode, java.lang.String language, boolean andOperator)
836                    throws com.liferay.portal.kernel.exception.SystemException {
837                    try {
838                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
839                                            "searchCount", _searchCountParameterTypes21);
840    
841                            MethodHandler methodHandler = new MethodHandler(methodKey,
842                                            companyId, groupId, classNameId, classPK, name,
843                                            description, type, mode, language, andOperator);
844    
845                            Object returnObj = null;
846    
847                            try {
848                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
849                            }
850                            catch (Exception e) {
851                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
852                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
853                                    }
854    
855                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
856                            }
857    
858                            return ((Integer)returnObj).intValue();
859                    }
860                    catch (com.liferay.portal.kernel.exception.SystemException se) {
861                            _log.error(se, se);
862    
863                            throw se;
864                    }
865            }
866    
867            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
868                    long[] groupIds, long[] classNameIds, long classPK,
869                    java.lang.String keywords, java.lang.String type, java.lang.String mode)
870                    throws com.liferay.portal.kernel.exception.SystemException {
871                    try {
872                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
873                                            "searchCount", _searchCountParameterTypes22);
874    
875                            MethodHandler methodHandler = new MethodHandler(methodKey,
876                                            companyId, groupIds, classNameIds, classPK, keywords, type,
877                                            mode);
878    
879                            Object returnObj = null;
880    
881                            try {
882                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
883                            }
884                            catch (Exception e) {
885                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
886                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
887                                    }
888    
889                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
890                            }
891    
892                            return ((Integer)returnObj).intValue();
893                    }
894                    catch (com.liferay.portal.kernel.exception.SystemException se) {
895                            _log.error(se, se);
896    
897                            throw se;
898                    }
899            }
900    
901            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
902                    long[] groupIds, long[] classNameIds, long classPK,
903                    java.lang.String name, java.lang.String description,
904                    java.lang.String type, java.lang.String mode,
905                    java.lang.String language, boolean andOperator)
906                    throws com.liferay.portal.kernel.exception.SystemException {
907                    try {
908                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
909                                            "searchCount", _searchCountParameterTypes23);
910    
911                            MethodHandler methodHandler = new MethodHandler(methodKey,
912                                            companyId, groupIds, classNameIds, classPK, name,
913                                            description, type, mode, language, andOperator);
914    
915                            Object returnObj = null;
916    
917                            try {
918                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
919                            }
920                            catch (Exception e) {
921                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
922                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
923                                    }
924    
925                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
926                            }
927    
928                            return ((Integer)returnObj).intValue();
929                    }
930                    catch (com.liferay.portal.kernel.exception.SystemException se) {
931                            _log.error(se, se);
932    
933                            throw se;
934                    }
935            }
936    
937            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate(
938                    HttpPrincipal httpPrincipal, long templateId,
939                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
940                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
941                    java.lang.String type, java.lang.String mode,
942                    java.lang.String language, java.lang.String script, boolean cacheable,
943                    boolean smallImage, java.lang.String smallImageURL,
944                    java.io.File smallImageFile,
945                    com.liferay.portal.service.ServiceContext serviceContext)
946                    throws com.liferay.portal.kernel.exception.PortalException,
947                            com.liferay.portal.kernel.exception.SystemException {
948                    try {
949                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class,
950                                            "updateTemplate", _updateTemplateParameterTypes24);
951    
952                            MethodHandler methodHandler = new MethodHandler(methodKey,
953                                            templateId, nameMap, descriptionMap, type, mode, language,
954                                            script, cacheable, smallImage, smallImageURL,
955                                            smallImageFile, serviceContext);
956    
957                            Object returnObj = null;
958    
959                            try {
960                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
961                            }
962                            catch (Exception e) {
963                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
964                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
965                                    }
966    
967                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
968                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
969                                    }
970    
971                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
972                            }
973    
974                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
975                    }
976                    catch (com.liferay.portal.kernel.exception.SystemException se) {
977                            _log.error(se, se);
978    
979                            throw se;
980                    }
981            }
982    
983            private static Log _log = LogFactoryUtil.getLog(DDMTemplateServiceHttp.class);
984            private static final Class<?>[] _addTemplateParameterTypes0 = new Class[] {
985                            long.class, long.class, long.class, java.util.Map.class,
986                            java.util.Map.class, java.lang.String.class, java.lang.String.class,
987                            java.lang.String.class, java.lang.String.class,
988                            com.liferay.portal.service.ServiceContext.class
989                    };
990            private static final Class<?>[] _addTemplateParameterTypes1 = new Class[] {
991                            long.class, long.class, long.class, java.lang.String.class,
992                            java.util.Map.class, java.util.Map.class, java.lang.String.class,
993                            java.lang.String.class, java.lang.String.class,
994                            java.lang.String.class, boolean.class, boolean.class,
995                            java.lang.String.class, java.io.File.class,
996                            com.liferay.portal.service.ServiceContext.class
997                    };
998            private static final Class<?>[] _copyTemplateParameterTypes2 = new Class[] {
999                            long.class, java.util.Map.class, java.util.Map.class,
1000                            com.liferay.portal.service.ServiceContext.class
1001                    };
1002            private static final Class<?>[] _copyTemplateParameterTypes3 = new Class[] {
1003                            long.class, com.liferay.portal.service.ServiceContext.class
1004                    };
1005            private static final Class<?>[] _copyTemplatesParameterTypes4 = new Class[] {
1006                            long.class, long.class, long.class, java.lang.String.class,
1007                            com.liferay.portal.service.ServiceContext.class
1008                    };
1009            private static final Class<?>[] _deleteTemplateParameterTypes5 = new Class[] {
1010                            long.class
1011                    };
1012            private static final Class<?>[] _fetchTemplateParameterTypes6 = new Class[] {
1013                            long.class, long.class, java.lang.String.class
1014                    };
1015            private static final Class<?>[] _getTemplateParameterTypes7 = new Class[] {
1016                            long.class
1017                    };
1018            private static final Class<?>[] _getTemplateParameterTypes8 = new Class[] {
1019                            long.class, long.class, java.lang.String.class
1020                    };
1021            private static final Class<?>[] _getTemplateParameterTypes9 = new Class[] {
1022                            long.class, long.class, java.lang.String.class, boolean.class
1023                    };
1024            private static final Class<?>[] _getTemplatesParameterTypes10 = new Class[] {
1025                            long.class, long.class
1026                    };
1027            private static final Class<?>[] _getTemplatesParameterTypes11 = new Class[] {
1028                            long.class, long.class, long.class
1029                    };
1030            private static final Class<?>[] _getTemplatesParameterTypes12 = new Class[] {
1031                            long.class, long.class, long.class, java.lang.String.class
1032                    };
1033            private static final Class<?>[] _getTemplatesParameterTypes13 = new Class[] {
1034                            long.class, long.class, long.class, java.lang.String.class,
1035                            java.lang.String.class
1036                    };
1037            private static final Class<?>[] _getTemplatesByClassPKParameterTypes14 = new Class[] {
1038                            long.class, long.class
1039                    };
1040            private static final Class<?>[] _getTemplatesByStructureClassNameIdParameterTypes15 =
1041                    new Class[] {
1042                            long.class, long.class, int.class, int.class,
1043                            com.liferay.portal.kernel.util.OrderByComparator.class
1044                    };
1045            private static final Class<?>[] _searchParameterTypes16 = new Class[] {
1046                            long.class, long.class, long.class, long.class,
1047                            java.lang.String.class, java.lang.String.class,
1048                            java.lang.String.class, int.class, int.class,
1049                            com.liferay.portal.kernel.util.OrderByComparator.class
1050                    };
1051            private static final Class<?>[] _searchParameterTypes17 = new Class[] {
1052                            long.class, long.class, long.class, long.class,
1053                            java.lang.String.class, java.lang.String.class,
1054                            java.lang.String.class, java.lang.String.class,
1055                            java.lang.String.class, boolean.class, int.class, int.class,
1056                            com.liferay.portal.kernel.util.OrderByComparator.class
1057                    };
1058            private static final Class<?>[] _searchParameterTypes18 = new Class[] {
1059                            long.class, long[].class, long[].class, long.class,
1060                            java.lang.String.class, java.lang.String.class,
1061                            java.lang.String.class, int.class, int.class,
1062                            com.liferay.portal.kernel.util.OrderByComparator.class
1063                    };
1064            private static final Class<?>[] _searchParameterTypes19 = new Class[] {
1065                            long.class, long[].class, long[].class, long.class,
1066                            java.lang.String.class, java.lang.String.class,
1067                            java.lang.String.class, java.lang.String.class,
1068                            java.lang.String.class, boolean.class, int.class, int.class,
1069                            com.liferay.portal.kernel.util.OrderByComparator.class
1070                    };
1071            private static final Class<?>[] _searchCountParameterTypes20 = new Class[] {
1072                            long.class, long.class, long.class, long.class,
1073                            java.lang.String.class, java.lang.String.class,
1074                            java.lang.String.class
1075                    };
1076            private static final Class<?>[] _searchCountParameterTypes21 = new Class[] {
1077                            long.class, long.class, long.class, long.class,
1078                            java.lang.String.class, java.lang.String.class,
1079                            java.lang.String.class, java.lang.String.class,
1080                            java.lang.String.class, boolean.class
1081                    };
1082            private static final Class<?>[] _searchCountParameterTypes22 = new Class[] {
1083                            long.class, long[].class, long[].class, long.class,
1084                            java.lang.String.class, java.lang.String.class,
1085                            java.lang.String.class
1086                    };
1087            private static final Class<?>[] _searchCountParameterTypes23 = new Class[] {
1088                            long.class, long[].class, long[].class, long.class,
1089                            java.lang.String.class, java.lang.String.class,
1090                            java.lang.String.class, java.lang.String.class,
1091                            java.lang.String.class, boolean.class
1092                    };
1093            private static final Class<?>[] _updateTemplateParameterTypes24 = new Class[] {
1094                            long.class, java.util.Map.class, java.util.Map.class,
1095                            java.lang.String.class, java.lang.String.class,
1096                            java.lang.String.class, java.lang.String.class, boolean.class,
1097                            boolean.class, java.lang.String.class, java.io.File.class,
1098                            com.liferay.portal.service.ServiceContext.class
1099                    };
1100    }