001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil;
025    
026    /**
027     * Provides the HTTP utility for the
028     * {@link com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it requires an additional
031     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
032     *
033     * <p>
034     * The benefits of using the HTTP utility is that it is fast and allows for
035     * tunneling without the cost of serializing to text. The drawback is that it
036     * only works with Java.
037     * </p>
038     *
039     * <p>
040     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
041     * configure security.
042     * </p>
043     *
044     * <p>
045     * The HTTP utility is only generated for remote services.
046     * </p>
047     *
048     * @author Brian Wing Shun Chan
049     * @see DDMStructureServiceSoap
050     * @see com.liferay.portal.security.auth.HttpPrincipal
051     * @see com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil
052     * @generated
053     */
054    public class DDMStructureServiceHttp {
055            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
056                    HttpPrincipal httpPrincipal, long userId, long groupId,
057                    long classNameId,
058                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
059                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
060                    java.lang.String xsd,
061                    com.liferay.portal.service.ServiceContext serviceContext)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    try {
065                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
066                                            "addStructure", _addStructureParameterTypes0);
067    
068                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
069                                            groupId, classNameId, nameMap, descriptionMap, xsd,
070                                            serviceContext);
071    
072                            Object returnObj = null;
073    
074                            try {
075                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
076                            }
077                            catch (Exception e) {
078                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
079                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
080                                    }
081    
082                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
083                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
084                                    }
085    
086                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
087                            }
088    
089                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
090                    }
091                    catch (com.liferay.portal.kernel.exception.SystemException se) {
092                            _log.error(se, se);
093    
094                            throw se;
095                    }
096            }
097    
098            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
099                    HttpPrincipal httpPrincipal, long groupId, long parentStructureId,
100                    long classNameId, java.lang.String structureKey,
101                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
102                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
103                    java.lang.String xsd, java.lang.String storageType, int 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(DDMStructureServiceUtil.class,
109                                            "addStructure", _addStructureParameterTypes1);
110    
111                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
112                                            parentStructureId, classNameId, structureKey, nameMap,
113                                            descriptionMap, xsd, storageType, type, serviceContext);
114    
115                            Object returnObj = null;
116    
117                            try {
118                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
119                            }
120                            catch (Exception e) {
121                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
122                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
123                                    }
124    
125                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
126                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
127                                    }
128    
129                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
130                            }
131    
132                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
133                    }
134                    catch (com.liferay.portal.kernel.exception.SystemException se) {
135                            _log.error(se, se);
136    
137                            throw se;
138                    }
139            }
140    
141            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
142                    HttpPrincipal httpPrincipal, long userId, long groupId,
143                    java.lang.String parentStructureKey, long classNameId,
144                    java.lang.String structureKey,
145                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
146                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
147                    java.lang.String xsd, java.lang.String storageType, int type,
148                    com.liferay.portal.service.ServiceContext serviceContext)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    try {
152                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
153                                            "addStructure", _addStructureParameterTypes2);
154    
155                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
156                                            groupId, parentStructureKey, classNameId, structureKey,
157                                            nameMap, descriptionMap, xsd, storageType, type,
158                                            serviceContext);
159    
160                            Object returnObj = null;
161    
162                            try {
163                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
164                            }
165                            catch (Exception e) {
166                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
167                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
168                                    }
169    
170                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
171                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
172                                    }
173    
174                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
175                            }
176    
177                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
178                    }
179                    catch (com.liferay.portal.kernel.exception.SystemException se) {
180                            _log.error(se, se);
181    
182                            throw se;
183                    }
184            }
185    
186            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
187                    HttpPrincipal httpPrincipal, long structureId,
188                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
189                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
190                    com.liferay.portal.service.ServiceContext serviceContext)
191                    throws com.liferay.portal.kernel.exception.PortalException,
192                            com.liferay.portal.kernel.exception.SystemException {
193                    try {
194                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
195                                            "copyStructure", _copyStructureParameterTypes3);
196    
197                            MethodHandler methodHandler = new MethodHandler(methodKey,
198                                            structureId, nameMap, descriptionMap, serviceContext);
199    
200                            Object returnObj = null;
201    
202                            try {
203                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
204                            }
205                            catch (Exception e) {
206                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
207                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
208                                    }
209    
210                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
211                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
212                                    }
213    
214                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
215                            }
216    
217                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
218                    }
219                    catch (com.liferay.portal.kernel.exception.SystemException se) {
220                            _log.error(se, se);
221    
222                            throw se;
223                    }
224            }
225    
226            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
227                    HttpPrincipal httpPrincipal, long structureId,
228                    com.liferay.portal.service.ServiceContext serviceContext)
229                    throws com.liferay.portal.kernel.exception.PortalException,
230                            com.liferay.portal.kernel.exception.SystemException {
231                    try {
232                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
233                                            "copyStructure", _copyStructureParameterTypes4);
234    
235                            MethodHandler methodHandler = new MethodHandler(methodKey,
236                                            structureId, serviceContext);
237    
238                            Object returnObj = null;
239    
240                            try {
241                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
242                            }
243                            catch (Exception e) {
244                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
245                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
246                                    }
247    
248                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
249                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
250                                    }
251    
252                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
253                            }
254    
255                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
256                    }
257                    catch (com.liferay.portal.kernel.exception.SystemException se) {
258                            _log.error(se, se);
259    
260                            throw se;
261                    }
262            }
263    
264            public static void deleteStructure(HttpPrincipal httpPrincipal,
265                    long structureId)
266                    throws com.liferay.portal.kernel.exception.PortalException,
267                            com.liferay.portal.kernel.exception.SystemException {
268                    try {
269                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
270                                            "deleteStructure", _deleteStructureParameterTypes5);
271    
272                            MethodHandler methodHandler = new MethodHandler(methodKey,
273                                            structureId);
274    
275                            try {
276                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
277                            }
278                            catch (Exception e) {
279                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
280                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
281                                    }
282    
283                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
284                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
285                                    }
286    
287                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
288                            }
289                    }
290                    catch (com.liferay.portal.kernel.exception.SystemException se) {
291                            _log.error(se, se);
292    
293                            throw se;
294                    }
295            }
296    
297            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
298                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
299                    java.lang.String structureKey)
300                    throws com.liferay.portal.kernel.exception.PortalException,
301                            com.liferay.portal.kernel.exception.SystemException {
302                    try {
303                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
304                                            "fetchStructure", _fetchStructureParameterTypes6);
305    
306                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
307                                            classNameId, structureKey);
308    
309                            Object returnObj = null;
310    
311                            try {
312                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
313                            }
314                            catch (Exception e) {
315                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
316                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
317                                    }
318    
319                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
320                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
321                                    }
322    
323                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
324                            }
325    
326                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
327                    }
328                    catch (com.liferay.portal.kernel.exception.SystemException se) {
329                            _log.error(se, se);
330    
331                            throw se;
332                    }
333            }
334    
335            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
336                    HttpPrincipal httpPrincipal, long structureId)
337                    throws com.liferay.portal.kernel.exception.PortalException,
338                            com.liferay.portal.kernel.exception.SystemException {
339                    try {
340                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
341                                            "getStructure", _getStructureParameterTypes7);
342    
343                            MethodHandler methodHandler = new MethodHandler(methodKey,
344                                            structureId);
345    
346                            Object returnObj = null;
347    
348                            try {
349                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
350                            }
351                            catch (Exception e) {
352                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
353                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
354                                    }
355    
356                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
357                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
358                                    }
359    
360                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
361                            }
362    
363                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
364                    }
365                    catch (com.liferay.portal.kernel.exception.SystemException se) {
366                            _log.error(se, se);
367    
368                            throw se;
369                    }
370            }
371    
372            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
373                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
374                    java.lang.String structureKey)
375                    throws com.liferay.portal.kernel.exception.PortalException,
376                            com.liferay.portal.kernel.exception.SystemException {
377                    try {
378                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
379                                            "getStructure", _getStructureParameterTypes8);
380    
381                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
382                                            classNameId, structureKey);
383    
384                            Object returnObj = null;
385    
386                            try {
387                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
388                            }
389                            catch (Exception e) {
390                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
391                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
392                                    }
393    
394                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
395                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
396                                    }
397    
398                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
399                            }
400    
401                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
402                    }
403                    catch (com.liferay.portal.kernel.exception.SystemException se) {
404                            _log.error(se, se);
405    
406                            throw se;
407                    }
408            }
409    
410            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
411                    HttpPrincipal httpPrincipal, long groupId, long classNameId,
412                    java.lang.String structureKey, boolean includeGlobalStructures)
413                    throws com.liferay.portal.kernel.exception.PortalException,
414                            com.liferay.portal.kernel.exception.SystemException {
415                    try {
416                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
417                                            "getStructure", _getStructureParameterTypes9);
418    
419                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
420                                            classNameId, structureKey, includeGlobalStructures);
421    
422                            Object returnObj = null;
423    
424                            try {
425                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
426                            }
427                            catch (Exception e) {
428                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
429                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
430                                    }
431    
432                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
433                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
434                                    }
435    
436                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
437                            }
438    
439                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
440                    }
441                    catch (com.liferay.portal.kernel.exception.SystemException se) {
442                            _log.error(se, se);
443    
444                            throw se;
445                    }
446            }
447    
448            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
449                    HttpPrincipal httpPrincipal, long groupId)
450                    throws com.liferay.portal.kernel.exception.SystemException {
451                    try {
452                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
453                                            "getStructures", _getStructuresParameterTypes10);
454    
455                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
456    
457                            Object returnObj = null;
458    
459                            try {
460                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
461                            }
462                            catch (Exception e) {
463                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
464                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
465                                    }
466    
467                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
468                            }
469    
470                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure>)returnObj;
471                    }
472                    catch (com.liferay.portal.kernel.exception.SystemException se) {
473                            _log.error(se, se);
474    
475                            throw se;
476                    }
477            }
478    
479            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
480                    HttpPrincipal httpPrincipal, long[] groupIds)
481                    throws com.liferay.portal.kernel.exception.SystemException {
482                    try {
483                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
484                                            "getStructures", _getStructuresParameterTypes11);
485    
486                            MethodHandler methodHandler = new MethodHandler(methodKey, groupIds);
487    
488                            Object returnObj = null;
489    
490                            try {
491                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
492                            }
493                            catch (Exception e) {
494                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
495                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
496                                    }
497    
498                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
499                            }
500    
501                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure>)returnObj;
502                    }
503                    catch (com.liferay.portal.kernel.exception.SystemException se) {
504                            _log.error(se, se);
505    
506                            throw se;
507                    }
508            }
509    
510            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
511                    HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
512                    long[] classNameIds, java.lang.String keywords, int start, int end,
513                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
514                    throws com.liferay.portal.kernel.exception.SystemException {
515                    try {
516                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
517                                            "search", _searchParameterTypes12);
518    
519                            MethodHandler methodHandler = new MethodHandler(methodKey,
520                                            companyId, groupIds, classNameIds, keywords, start, end,
521                                            orderByComparator);
522    
523                            Object returnObj = null;
524    
525                            try {
526                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
527                            }
528                            catch (Exception e) {
529                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
530                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
531                                    }
532    
533                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
534                            }
535    
536                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure>)returnObj;
537                    }
538                    catch (com.liferay.portal.kernel.exception.SystemException se) {
539                            _log.error(se, se);
540    
541                            throw se;
542                    }
543            }
544    
545            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
546                    HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
547                    long[] classNameIds, java.lang.String name,
548                    java.lang.String description, java.lang.String storageType, int type,
549                    boolean andOperator, int start, int end,
550                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
551                    throws com.liferay.portal.kernel.exception.SystemException {
552                    try {
553                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
554                                            "search", _searchParameterTypes13);
555    
556                            MethodHandler methodHandler = new MethodHandler(methodKey,
557                                            companyId, groupIds, classNameIds, name, description,
558                                            storageType, type, andOperator, start, end,
559                                            orderByComparator);
560    
561                            Object returnObj = null;
562    
563                            try {
564                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
565                            }
566                            catch (Exception e) {
567                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
568                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
569                                    }
570    
571                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
572                            }
573    
574                            return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure>)returnObj;
575                    }
576                    catch (com.liferay.portal.kernel.exception.SystemException se) {
577                            _log.error(se, se);
578    
579                            throw se;
580                    }
581            }
582    
583            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
584                    long[] groupIds, long[] classNameIds, java.lang.String keywords)
585                    throws com.liferay.portal.kernel.exception.SystemException {
586                    try {
587                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
588                                            "searchCount", _searchCountParameterTypes14);
589    
590                            MethodHandler methodHandler = new MethodHandler(methodKey,
591                                            companyId, groupIds, classNameIds, keywords);
592    
593                            Object returnObj = null;
594    
595                            try {
596                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
597                            }
598                            catch (Exception e) {
599                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
600                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
601                                    }
602    
603                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
604                            }
605    
606                            return ((Integer)returnObj).intValue();
607                    }
608                    catch (com.liferay.portal.kernel.exception.SystemException se) {
609                            _log.error(se, se);
610    
611                            throw se;
612                    }
613            }
614    
615            public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
616                    long[] groupIds, long[] classNameIds, java.lang.String name,
617                    java.lang.String description, java.lang.String storageType, int type,
618                    boolean andOperator)
619                    throws com.liferay.portal.kernel.exception.SystemException {
620                    try {
621                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
622                                            "searchCount", _searchCountParameterTypes15);
623    
624                            MethodHandler methodHandler = new MethodHandler(methodKey,
625                                            companyId, groupIds, classNameIds, name, description,
626                                            storageType, type, andOperator);
627    
628                            Object returnObj = null;
629    
630                            try {
631                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
632                            }
633                            catch (Exception e) {
634                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
635                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
636                                    }
637    
638                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
639                            }
640    
641                            return ((Integer)returnObj).intValue();
642                    }
643                    catch (com.liferay.portal.kernel.exception.SystemException se) {
644                            _log.error(se, se);
645    
646                            throw se;
647                    }
648            }
649    
650            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
651                    HttpPrincipal httpPrincipal, long groupId, long parentStructureId,
652                    long classNameId, java.lang.String structureKey,
653                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
654                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
655                    java.lang.String xsd,
656                    com.liferay.portal.service.ServiceContext serviceContext)
657                    throws com.liferay.portal.kernel.exception.PortalException,
658                            com.liferay.portal.kernel.exception.SystemException {
659                    try {
660                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
661                                            "updateStructure", _updateStructureParameterTypes16);
662    
663                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
664                                            parentStructureId, classNameId, structureKey, nameMap,
665                                            descriptionMap, xsd, serviceContext);
666    
667                            Object returnObj = null;
668    
669                            try {
670                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
671                            }
672                            catch (Exception e) {
673                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
674                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
675                                    }
676    
677                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
678                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
679                                    }
680    
681                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
682                            }
683    
684                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
685                    }
686                    catch (com.liferay.portal.kernel.exception.SystemException se) {
687                            _log.error(se, se);
688    
689                            throw se;
690                    }
691            }
692    
693            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
694                    HttpPrincipal httpPrincipal, long structureId, long parentStructureId,
695                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
696                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
697                    java.lang.String xsd,
698                    com.liferay.portal.service.ServiceContext serviceContext)
699                    throws com.liferay.portal.kernel.exception.PortalException,
700                            com.liferay.portal.kernel.exception.SystemException {
701                    try {
702                            MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class,
703                                            "updateStructure", _updateStructureParameterTypes17);
704    
705                            MethodHandler methodHandler = new MethodHandler(methodKey,
706                                            structureId, parentStructureId, nameMap, descriptionMap,
707                                            xsd, serviceContext);
708    
709                            Object returnObj = null;
710    
711                            try {
712                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
713                            }
714                            catch (Exception e) {
715                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
716                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
717                                    }
718    
719                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
720                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
721                                    }
722    
723                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
724                            }
725    
726                            return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
727                    }
728                    catch (com.liferay.portal.kernel.exception.SystemException se) {
729                            _log.error(se, se);
730    
731                            throw se;
732                    }
733            }
734    
735            private static Log _log = LogFactoryUtil.getLog(DDMStructureServiceHttp.class);
736            private static final Class<?>[] _addStructureParameterTypes0 = new Class[] {
737                            long.class, long.class, long.class, java.util.Map.class,
738                            java.util.Map.class, java.lang.String.class,
739                            com.liferay.portal.service.ServiceContext.class
740                    };
741            private static final Class<?>[] _addStructureParameterTypes1 = new Class[] {
742                            long.class, long.class, long.class, java.lang.String.class,
743                            java.util.Map.class, java.util.Map.class, java.lang.String.class,
744                            java.lang.String.class, int.class,
745                            com.liferay.portal.service.ServiceContext.class
746                    };
747            private static final Class<?>[] _addStructureParameterTypes2 = new Class[] {
748                            long.class, long.class, java.lang.String.class, long.class,
749                            java.lang.String.class, java.util.Map.class, java.util.Map.class,
750                            java.lang.String.class, java.lang.String.class, int.class,
751                            com.liferay.portal.service.ServiceContext.class
752                    };
753            private static final Class<?>[] _copyStructureParameterTypes3 = new Class[] {
754                            long.class, java.util.Map.class, java.util.Map.class,
755                            com.liferay.portal.service.ServiceContext.class
756                    };
757            private static final Class<?>[] _copyStructureParameterTypes4 = new Class[] {
758                            long.class, com.liferay.portal.service.ServiceContext.class
759                    };
760            private static final Class<?>[] _deleteStructureParameterTypes5 = new Class[] {
761                            long.class
762                    };
763            private static final Class<?>[] _fetchStructureParameterTypes6 = new Class[] {
764                            long.class, long.class, java.lang.String.class
765                    };
766            private static final Class<?>[] _getStructureParameterTypes7 = new Class[] {
767                            long.class
768                    };
769            private static final Class<?>[] _getStructureParameterTypes8 = new Class[] {
770                            long.class, long.class, java.lang.String.class
771                    };
772            private static final Class<?>[] _getStructureParameterTypes9 = new Class[] {
773                            long.class, long.class, java.lang.String.class, boolean.class
774                    };
775            private static final Class<?>[] _getStructuresParameterTypes10 = new Class[] {
776                            long.class
777                    };
778            private static final Class<?>[] _getStructuresParameterTypes11 = new Class[] {
779                            long[].class
780                    };
781            private static final Class<?>[] _searchParameterTypes12 = new Class[] {
782                            long.class, long[].class, long[].class, java.lang.String.class,
783                            int.class, int.class,
784                            com.liferay.portal.kernel.util.OrderByComparator.class
785                    };
786            private static final Class<?>[] _searchParameterTypes13 = new Class[] {
787                            long.class, long[].class, long[].class, java.lang.String.class,
788                            java.lang.String.class, java.lang.String.class, int.class,
789                            boolean.class, int.class, int.class,
790                            com.liferay.portal.kernel.util.OrderByComparator.class
791                    };
792            private static final Class<?>[] _searchCountParameterTypes14 = new Class[] {
793                            long.class, long[].class, long[].class, java.lang.String.class
794                    };
795            private static final Class<?>[] _searchCountParameterTypes15 = new Class[] {
796                            long.class, long[].class, long[].class, java.lang.String.class,
797                            java.lang.String.class, java.lang.String.class, int.class,
798                            boolean.class
799                    };
800            private static final Class<?>[] _updateStructureParameterTypes16 = new Class[] {
801                            long.class, long.class, long.class, java.lang.String.class,
802                            java.util.Map.class, java.util.Map.class, java.lang.String.class,
803                            com.liferay.portal.service.ServiceContext.class
804                    };
805            private static final Class<?>[] _updateStructureParameterTypes17 = new Class[] {
806                            long.class, long.class, java.util.Map.class, java.util.Map.class,
807                            java.lang.String.class,
808                            com.liferay.portal.service.ServiceContext.class
809                    };
810    }