001    /**
002     * Copyright (c) 2000-2012 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, java.lang.String templateKey,
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, boolean cacheable,
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.getName(),
069                                            "addTemplate", _addTemplateParameterTypes0);
070    
071                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
072                                            classNameId, classPK, templateKey, nameMap, descriptionMap,
073                                            type, mode, language, script, cacheable, 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 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> copyTemplates(
102                    HttpPrincipal httpPrincipal, long classNameId, long classPK,
103                    long newClassPK, java.lang.String type,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    try {
108                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
109                                            "copyTemplates", _copyTemplatesParameterTypes1);
110    
111                            MethodHandler methodHandler = new MethodHandler(methodKey,
112                                            classNameId, classPK, newClassPK, type, serviceContext);
113    
114                            Object returnObj = null;
115    
116                            try {
117                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
118                            }
119                            catch (Exception e) {
120                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
121                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
122                                    }
123    
124                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
125                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
126                                    }
127    
128                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
129                            }
130    
131                            return (java.util.List<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 void deleteTemplate(HttpPrincipal httpPrincipal,
141                    long templateId)
142                    throws com.liferay.portal.kernel.exception.PortalException,
143                            com.liferay.portal.kernel.exception.SystemException {
144                    try {
145                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
146                                            "deleteTemplate", _deleteTemplateParameterTypes2);
147    
148                            MethodHandler methodHandler = new MethodHandler(methodKey,
149                                            templateId);
150    
151                            try {
152                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
153                            }
154                            catch (Exception e) {
155                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
156                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
157                                    }
158    
159                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
160                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
161                                    }
162    
163                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
164                            }
165                    }
166                    catch (com.liferay.portal.kernel.exception.SystemException se) {
167                            _log.error(se, se);
168    
169                            throw se;
170                    }
171            }
172    
173            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate(
174                    HttpPrincipal httpPrincipal, long groupId, java.lang.String templateKey)
175                    throws com.liferay.portal.kernel.exception.SystemException {
176                    try {
177                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
178                                            "fetchTemplate", _fetchTemplateParameterTypes3);
179    
180                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
181                                            templateKey);
182    
183                            Object returnObj = null;
184    
185                            try {
186                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
187                            }
188                            catch (Exception e) {
189                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
190                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
191                                    }
192    
193                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
194                            }
195    
196                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
197                    }
198                    catch (com.liferay.portal.kernel.exception.SystemException se) {
199                            _log.error(se, se);
200    
201                            throw se;
202                    }
203            }
204    
205            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
206                    HttpPrincipal httpPrincipal, long templateId)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    try {
210                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
211                                            "getTemplate", _getTemplateParameterTypes4);
212    
213                            MethodHandler methodHandler = new MethodHandler(methodKey,
214                                            templateId);
215    
216                            Object returnObj = null;
217    
218                            try {
219                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
220                            }
221                            catch (Exception e) {
222                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
223                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
224                                    }
225    
226                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
227                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
228                                    }
229    
230                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
231                            }
232    
233                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
234                    }
235                    catch (com.liferay.portal.kernel.exception.SystemException se) {
236                            _log.error(se, se);
237    
238                            throw se;
239                    }
240            }
241    
242            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
243                    HttpPrincipal httpPrincipal, long groupId, java.lang.String templateKey)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    try {
247                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
248                                            "getTemplate", _getTemplateParameterTypes5);
249    
250                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
251                                            templateKey);
252    
253                            Object returnObj = null;
254    
255                            try {
256                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
257                            }
258                            catch (Exception e) {
259                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
260                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
261                                    }
262    
263                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
264                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
265                                    }
266    
267                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
268                            }
269    
270                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
271                    }
272                    catch (com.liferay.portal.kernel.exception.SystemException se) {
273                            _log.error(se, se);
274    
275                            throw se;
276                    }
277            }
278    
279            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
280                    HttpPrincipal httpPrincipal, long groupId, long classNameId)
281                    throws com.liferay.portal.kernel.exception.SystemException {
282                    try {
283                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
284                                            "getTemplates", _getTemplatesParameterTypes6);
285    
286                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
287                                            classNameId);
288    
289                            Object returnObj = null;
290    
291                            try {
292                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
293                            }
294                            catch (Exception e) {
295                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
296                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
297                                    }
298    
299                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
300                            }
301    
302                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
303                    }
304                    catch (com.liferay.portal.kernel.exception.SystemException se) {
305                            _log.error(se, se);
306    
307                            throw se;
308                    }
309            }
310    
311            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
312                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
313                    long classPK)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    try {
316                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
317                                            "getTemplates", _getTemplatesParameterTypes7);
318    
319                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
320                                            classNameId, classPK);
321    
322                            Object returnObj = null;
323    
324                            try {
325                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
326                            }
327                            catch (Exception e) {
328                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
329                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
330                                    }
331    
332                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
333                            }
334    
335                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
336                    }
337                    catch (com.liferay.portal.kernel.exception.SystemException se) {
338                            _log.error(se, se);
339    
340                            throw se;
341                    }
342            }
343    
344            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
345                    HttpPrincipal httpPrincipal, long classNameId, long classPK,
346                    java.lang.String type, java.lang.String mode)
347                    throws com.liferay.portal.kernel.exception.SystemException {
348                    try {
349                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
350                                            "getTemplates", _getTemplatesParameterTypes8);
351    
352                            MethodHandler methodHandler = new MethodHandler(methodKey,
353                                            classNameId, classPK, type, mode);
354    
355                            Object returnObj = null;
356    
357                            try {
358                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
359                            }
360                            catch (Exception e) {
361                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
362                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
363                                    }
364    
365                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
366                            }
367    
368                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
369                    }
370                    catch (com.liferay.portal.kernel.exception.SystemException se) {
371                            _log.error(se, se);
372    
373                            throw se;
374                    }
375            }
376    
377            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
378                    HttpPrincipal httpPrincipal, long companyId, long groupId,
379                    long classNameId, long classPK, java.lang.String keywords,
380                    java.lang.String type, java.lang.String mode, int start, int end,
381                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
382                    throws com.liferay.portal.kernel.exception.SystemException {
383                    try {
384                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
385                                            "search", _searchParameterTypes9);
386    
387                            MethodHandler methodHandler = new MethodHandler(methodKey,
388                                            companyId, groupId, classNameId, classPK, keywords, type,
389                                            mode, start, end, orderByComparator);
390    
391                            Object returnObj = null;
392    
393                            try {
394                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
395                            }
396                            catch (Exception e) {
397                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
398                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
399                                    }
400    
401                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
402                            }
403    
404                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
405                    }
406                    catch (com.liferay.portal.kernel.exception.SystemException se) {
407                            _log.error(se, se);
408    
409                            throw se;
410                    }
411            }
412    
413            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
414                    HttpPrincipal httpPrincipal, long companyId, long groupId,
415                    long classNameId, long classPK, java.lang.String name,
416                    java.lang.String description, java.lang.String type,
417                    java.lang.String mode, java.lang.String language, boolean andOperator,
418                    int start, int end,
419                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
420                    throws com.liferay.portal.kernel.exception.SystemException {
421                    try {
422                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
423                                            "search", _searchParameterTypes10);
424    
425                            MethodHandler methodHandler = new MethodHandler(methodKey,
426                                            companyId, groupId, classNameId, classPK, name,
427                                            description, type, mode, language, andOperator, start, end,
428                                            orderByComparator);
429    
430                            Object returnObj = null;
431    
432                            try {
433                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
434                            }
435                            catch (Exception e) {
436                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
437                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
438                                    }
439    
440                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
441                            }
442    
443                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
444                    }
445                    catch (com.liferay.portal.kernel.exception.SystemException se) {
446                            _log.error(se, se);
447    
448                            throw se;
449                    }
450            }
451    
452            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
453                    HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
454                    long[] classNameIds, long classPK, java.lang.String keywords,
455                    java.lang.String type, java.lang.String mode, int start, int end,
456                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
457                    throws com.liferay.portal.kernel.exception.SystemException {
458                    try {
459                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
460                                            "search", _searchParameterTypes11);
461    
462                            MethodHandler methodHandler = new MethodHandler(methodKey,
463                                            companyId, groupIds, classNameIds, classPK, keywords, type,
464                                            mode, start, end, orderByComparator);
465    
466                            Object returnObj = null;
467    
468                            try {
469                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
470                            }
471                            catch (Exception e) {
472                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
473                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
474                                    }
475    
476                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
477                            }
478    
479                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
480                    }
481                    catch (com.liferay.portal.kernel.exception.SystemException se) {
482                            _log.error(se, se);
483    
484                            throw se;
485                    }
486            }
487    
488            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
489                    HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
490                    long[] classNameIds, long classPK, java.lang.String name,
491                    java.lang.String description, java.lang.String type,
492                    java.lang.String mode, java.lang.String language, boolean andOperator,
493                    int start, int end,
494                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
495                    throws com.liferay.portal.kernel.exception.SystemException {
496                    try {
497                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
498                                            "search", _searchParameterTypes12);
499    
500                            MethodHandler methodHandler = new MethodHandler(methodKey,
501                                            companyId, groupIds, classNameIds, classPK, name,
502                                            description, type, mode, language, andOperator, start, end,
503                                            orderByComparator);
504    
505                            Object returnObj = null;
506    
507                            try {
508                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
509                            }
510                            catch (Exception e) {
511                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
512                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
513                                    }
514    
515                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
516                            }
517    
518                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate>)returnObj;
519                    }
520                    catch (com.liferay.portal.kernel.exception.SystemException se) {
521                            _log.error(se, se);
522    
523                            throw se;
524                    }
525            }
526    
527            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
528                    long groupId, long classNameId, long classPK,
529                    java.lang.String keywords, java.lang.String type, java.lang.String mode)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    try {
532                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
533                                            "searchCount", _searchCountParameterTypes13);
534    
535                            MethodHandler methodHandler = new MethodHandler(methodKey,
536                                            companyId, groupId, classNameId, classPK, keywords, type,
537                                            mode);
538    
539                            Object returnObj = null;
540    
541                            try {
542                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
543                            }
544                            catch (Exception e) {
545                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
546                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
547                                    }
548    
549                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
550                            }
551    
552                            return ((Integer)returnObj).intValue();
553                    }
554                    catch (com.liferay.portal.kernel.exception.SystemException se) {
555                            _log.error(se, se);
556    
557                            throw se;
558                    }
559            }
560    
561            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
562                    long groupId, long classNameId, long classPK, java.lang.String name,
563                    java.lang.String description, java.lang.String type,
564                    java.lang.String mode, java.lang.String language, boolean andOperator)
565                    throws com.liferay.portal.kernel.exception.SystemException {
566                    try {
567                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
568                                            "searchCount", _searchCountParameterTypes14);
569    
570                            MethodHandler methodHandler = new MethodHandler(methodKey,
571                                            companyId, groupId, classNameId, classPK, name,
572                                            description, type, mode, language, andOperator);
573    
574                            Object returnObj = null;
575    
576                            try {
577                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
578                            }
579                            catch (Exception e) {
580                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
581                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
582                                    }
583    
584                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
585                            }
586    
587                            return ((Integer)returnObj).intValue();
588                    }
589                    catch (com.liferay.portal.kernel.exception.SystemException se) {
590                            _log.error(se, se);
591    
592                            throw se;
593                    }
594            }
595    
596            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
597                    long[] groupIds, long[] classNameIds, long classPK,
598                    java.lang.String keywords, java.lang.String type, java.lang.String mode)
599                    throws com.liferay.portal.kernel.exception.SystemException {
600                    try {
601                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
602                                            "searchCount", _searchCountParameterTypes15);
603    
604                            MethodHandler methodHandler = new MethodHandler(methodKey,
605                                            companyId, groupIds, classNameIds, classPK, keywords, type,
606                                            mode);
607    
608                            Object returnObj = null;
609    
610                            try {
611                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
612                            }
613                            catch (Exception e) {
614                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
615                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
616                                    }
617    
618                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
619                            }
620    
621                            return ((Integer)returnObj).intValue();
622                    }
623                    catch (com.liferay.portal.kernel.exception.SystemException se) {
624                            _log.error(se, se);
625    
626                            throw se;
627                    }
628            }
629    
630            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
631                    long[] groupIds, long[] classNameIds, long classPK,
632                    java.lang.String name, java.lang.String description,
633                    java.lang.String type, java.lang.String mode,
634                    java.lang.String language, boolean andOperator)
635                    throws com.liferay.portal.kernel.exception.SystemException {
636                    try {
637                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
638                                            "searchCount", _searchCountParameterTypes16);
639    
640                            MethodHandler methodHandler = new MethodHandler(methodKey,
641                                            companyId, groupIds, classNameIds, classPK, name,
642                                            description, type, mode, language, andOperator);
643    
644                            Object returnObj = null;
645    
646                            try {
647                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
648                            }
649                            catch (Exception e) {
650                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
651                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
652                                    }
653    
654                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
655                            }
656    
657                            return ((Integer)returnObj).intValue();
658                    }
659                    catch (com.liferay.portal.kernel.exception.SystemException se) {
660                            _log.error(se, se);
661    
662                            throw se;
663                    }
664            }
665    
666            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate(
667                    HttpPrincipal httpPrincipal, long templateId,
668                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
669                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
670                    java.lang.String type, java.lang.String mode,
671                    java.lang.String language, java.lang.String script, boolean cacheable,
672                    com.liferay.portal.service.ServiceContext serviceContext)
673                    throws com.liferay.portal.kernel.exception.PortalException,
674                            com.liferay.portal.kernel.exception.SystemException {
675                    try {
676                            MethodKey methodKey = new MethodKey(DDMTemplateServiceUtil.class.getName(),
677                                            "updateTemplate", _updateTemplateParameterTypes17);
678    
679                            MethodHandler methodHandler = new MethodHandler(methodKey,
680                                            templateId, nameMap, descriptionMap, type, mode, language,
681                                            script, cacheable, serviceContext);
682    
683                            Object returnObj = null;
684    
685                            try {
686                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
687                            }
688                            catch (Exception e) {
689                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
690                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
691                                    }
692    
693                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
694                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
695                                    }
696    
697                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
698                            }
699    
700                            return (com.liferay.portlet.dynamicdatamapping.model.DDMTemplate)returnObj;
701                    }
702                    catch (com.liferay.portal.kernel.exception.SystemException se) {
703                            _log.error(se, se);
704    
705                            throw se;
706                    }
707            }
708    
709            private static Log _log = LogFactoryUtil.getLog(DDMTemplateServiceHttp.class);
710            private static final Class<?>[] _addTemplateParameterTypes0 = new Class[] {
711                            long.class, long.class, long.class, java.lang.String.class,
712                            java.util.Map.class, java.util.Map.class, java.lang.String.class,
713                            java.lang.String.class, java.lang.String.class,
714                            java.lang.String.class, boolean.class,
715                            com.liferay.portal.service.ServiceContext.class
716                    };
717            private static final Class<?>[] _copyTemplatesParameterTypes1 = new Class[] {
718                            long.class, long.class, long.class, java.lang.String.class,
719                            com.liferay.portal.service.ServiceContext.class
720                    };
721            private static final Class<?>[] _deleteTemplateParameterTypes2 = new Class[] {
722                            long.class
723                    };
724            private static final Class<?>[] _fetchTemplateParameterTypes3 = new Class[] {
725                            long.class, java.lang.String.class
726                    };
727            private static final Class<?>[] _getTemplateParameterTypes4 = new Class[] {
728                            long.class
729                    };
730            private static final Class<?>[] _getTemplateParameterTypes5 = new Class[] {
731                            long.class, java.lang.String.class
732                    };
733            private static final Class<?>[] _getTemplatesParameterTypes6 = new Class[] {
734                            long.class, long.class
735                    };
736            private static final Class<?>[] _getTemplatesParameterTypes7 = new Class[] {
737                            long.class, long.class, long.class
738                    };
739            private static final Class<?>[] _getTemplatesParameterTypes8 = new Class[] {
740                            long.class, long.class, java.lang.String.class,
741                            java.lang.String.class
742                    };
743            private static final Class<?>[] _searchParameterTypes9 = new Class[] {
744                            long.class, long.class, long.class, long.class,
745                            java.lang.String.class, java.lang.String.class,
746                            java.lang.String.class, int.class, int.class,
747                            com.liferay.portal.kernel.util.OrderByComparator.class
748                    };
749            private static final Class<?>[] _searchParameterTypes10 = new Class[] {
750                            long.class, long.class, long.class, long.class,
751                            java.lang.String.class, java.lang.String.class,
752                            java.lang.String.class, java.lang.String.class,
753                            java.lang.String.class, boolean.class, int.class, int.class,
754                            com.liferay.portal.kernel.util.OrderByComparator.class
755                    };
756            private static final Class<?>[] _searchParameterTypes11 = new Class[] {
757                            long.class, long[].class, long[].class, long.class,
758                            java.lang.String.class, java.lang.String.class,
759                            java.lang.String.class, int.class, int.class,
760                            com.liferay.portal.kernel.util.OrderByComparator.class
761                    };
762            private static final Class<?>[] _searchParameterTypes12 = new Class[] {
763                            long.class, long[].class, long[].class, long.class,
764                            java.lang.String.class, java.lang.String.class,
765                            java.lang.String.class, java.lang.String.class,
766                            java.lang.String.class, boolean.class, int.class, int.class,
767                            com.liferay.portal.kernel.util.OrderByComparator.class
768                    };
769            private static final Class<?>[] _searchCountParameterTypes13 = new Class[] {
770                            long.class, long.class, long.class, long.class,
771                            java.lang.String.class, java.lang.String.class,
772                            java.lang.String.class
773                    };
774            private static final Class<?>[] _searchCountParameterTypes14 = new Class[] {
775                            long.class, long.class, long.class, long.class,
776                            java.lang.String.class, java.lang.String.class,
777                            java.lang.String.class, java.lang.String.class,
778                            java.lang.String.class, boolean.class
779                    };
780            private static final Class<?>[] _searchCountParameterTypes15 = new Class[] {
781                            long.class, long[].class, long[].class, long.class,
782                            java.lang.String.class, java.lang.String.class,
783                            java.lang.String.class
784                    };
785            private static final Class<?>[] _searchCountParameterTypes16 = new Class[] {
786                            long.class, long[].class, long[].class, long.class,
787                            java.lang.String.class, java.lang.String.class,
788                            java.lang.String.class, java.lang.String.class,
789                            java.lang.String.class, boolean.class
790                    };
791            private static final Class<?>[] _updateTemplateParameterTypes17 = new Class[] {
792                            long.class, java.util.Map.class, java.util.Map.class,
793                            java.lang.String.class, java.lang.String.class,
794                            java.lang.String.class, java.lang.String.class, boolean.class,
795                            com.liferay.portal.service.ServiceContext.class
796                    };
797    }