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