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.LocalizationUtil;
020    
021    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    import java.util.Locale;
026    import java.util.Map;
027    
028    /**
029     * Provides the SOAP utility for the
030     * {@link com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil} service utility. The
031     * static methods of this class calls the same methods of the service utility.
032     * However, the signatures are different because it is difficult for SOAP to
033     * support certain types.
034     *
035     * <p>
036     * ServiceBuilder follows certain rules in translating the methods. For example,
037     * if the method in the service utility returns a {@link java.util.List}, that
038     * is translated to an array of {@link com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap}.
039     * If the method in the service utility returns a
040     * {@link com.liferay.portlet.dynamicdatamapping.model.DDMStructure}, that is translated to a
041     * {@link com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap}. Methods that SOAP cannot
042     * safely wire are skipped.
043     * </p>
044     *
045     * <p>
046     * The benefits of using the SOAP utility is that it is cross platform
047     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
048     * even Perl, to call the generated services. One drawback of SOAP is that it is
049     * slow because it needs to serialize all calls into a text format (XML).
050     * </p>
051     *
052     * <p>
053     * You can see a list of services at http://localhost:8080/api/axis. Set the
054     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
055     * security.
056     * </p>
057     *
058     * <p>
059     * The SOAP utility is only generated for remote services.
060     * </p>
061     *
062     * @author Brian Wing Shun Chan
063     * @see DDMStructureServiceHttp
064     * @see com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap
065     * @see com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil
066     * @generated
067     */
068    public class DDMStructureServiceSoap {
069            /**
070            * Adds a structure referencing a default parent structure, using the portal
071            * property <code>dynamic.data.lists.storage.type</code> storage type and
072            * default structure type.
073            *
074            * @param userId the primary key of the structure's creator/owner
075            * @param groupId the primary key of the group
076            * @param classNameId the primary key of the class name for the structure's
077            related model
078            * @param nameMap the structure's locales and localized names
079            * @param descriptionMap the structure's locales and localized descriptions
080            * @param xsd the structure's XML schema definition
081            * @param serviceContext the service context to be applied. Can set the
082            UUID, creation date, modification date, guest permissions, and
083            group permissions for the structure.
084            * @return the structure
085            * @throws PortalException if a user with the primary key could not be
086            found, if the user did not have permission to add the structure,
087            if the XSD was not well-formed, or if a portal exception occurred
088            * @throws SystemException if a system exception occurred
089            */
090            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
091                    long userId, long groupId, long classNameId,
092                    java.lang.String[] nameMapLanguageIds,
093                    java.lang.String[] nameMapValues,
094                    java.lang.String[] descriptionMapLanguageIds,
095                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws RemoteException {
098                    try {
099                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
100                                            nameMapValues);
101                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
102                                            descriptionMapValues);
103    
104                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
105                                    DDMStructureServiceUtil.addStructure(userId, groupId,
106                                            classNameId, nameMap, descriptionMap, xsd, serviceContext);
107    
108                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
109                    }
110                    catch (Exception e) {
111                            _log.error(e, e);
112    
113                            throw new RemoteException(e.getMessage());
114                    }
115            }
116    
117            /**
118            * Adds a structure referencing its parent structure.
119            *
120            * @param groupId the primary key of the group
121            * @param parentStructureId the primary key of the parent structure
122            (optionally {@link
123            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants#DEFAULT_PARENT_STRUCTURE_ID})
124            * @param classNameId the primary key of the class name for the structure's
125            related model
126            * @param structureKey the unique string identifying the structure
127            (optionally <code>null</code>)
128            * @param nameMap the structure's locales and localized names
129            * @param descriptionMap the structure's locales and localized descriptions
130            * @param xsd the structure's XML schema definition
131            * @param storageType the structure's storage type. It can be "xml" or
132            "expando". For more information, see {@link
133            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
134            * @param type the structure's type. For more information, see {@link
135            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
136            * @param serviceContext the service context to be applied. Can set the
137            UUID, creation date, modification date, guest permissions, and
138            group permissions for the structure.
139            * @return the structure
140            * @throws PortalException if the user did not have permission to add the
141            structure, if the XSD is not well formed, or if a portal
142            exception occurred
143            * @throws SystemException if a system exception occurred
144            */
145            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
146                    long groupId, long parentStructureId, long classNameId,
147                    java.lang.String structureKey, java.lang.String[] nameMapLanguageIds,
148                    java.lang.String[] nameMapValues,
149                    java.lang.String[] descriptionMapLanguageIds,
150                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
151                    java.lang.String storageType, int type,
152                    com.liferay.portal.service.ServiceContext serviceContext)
153                    throws RemoteException {
154                    try {
155                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
156                                            nameMapValues);
157                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
158                                            descriptionMapValues);
159    
160                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
161                                    DDMStructureServiceUtil.addStructure(groupId,
162                                            parentStructureId, classNameId, structureKey, nameMap,
163                                            descriptionMap, xsd, storageType, type, serviceContext);
164    
165                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
166                    }
167                    catch (Exception e) {
168                            _log.error(e, e);
169    
170                            throw new RemoteException(e.getMessage());
171                    }
172            }
173    
174            /**
175            * Adds a structure referencing the parent structure by its structure key.
176            * In case the parent structure is not found, it uses the default parent
177            * structure ID.
178            *
179            * @param userId the primary key of the structure's creator/owner
180            * @param groupId the primary key of the group
181            * @param parentStructureKey the unique string identifying the structure
182            * @param classNameId the primary key of the class name for the structure's
183            related model
184            * @param structureKey unique string identifying the structure (optionally
185            <code>null</code>)
186            * @param nameMap the structure's locales and localized names
187            * @param descriptionMap the structure's locales and localized descriptions
188            * @param xsd the XML schema definition of the structure
189            * @param storageType the storage type of the structure. It can be XML or
190            expando. For more information, see {@link
191            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
192            * @param type the structure's type. For more information, see {@link
193            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
194            * @param serviceContext the service context to be applied. Must have the
195            <code>ddmResource</code> attribute to check permissions. Can set
196            the UUID, creation date, modification date, guest permissions,
197            and group permissions for the structure.
198            * @return the structure
199            * @throws PortalException if a user with the primary key could not be
200            found, if the user did not have permission to add the structure,
201            if the XSD was not well-formed, or if a portal exception occurred
202            * @throws SystemException if a system exception occurred
203            */
204            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
205                    long userId, long groupId, java.lang.String parentStructureKey,
206                    long classNameId, java.lang.String structureKey,
207                    java.lang.String[] nameMapLanguageIds,
208                    java.lang.String[] nameMapValues,
209                    java.lang.String[] descriptionMapLanguageIds,
210                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
211                    java.lang.String storageType, int type,
212                    com.liferay.portal.service.ServiceContext serviceContext)
213                    throws RemoteException {
214                    try {
215                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
216                                            nameMapValues);
217                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
218                                            descriptionMapValues);
219    
220                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
221                                    DDMStructureServiceUtil.addStructure(userId, groupId,
222                                            parentStructureKey, classNameId, structureKey, nameMap,
223                                            descriptionMap, xsd, storageType, type, serviceContext);
224    
225                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
226                    }
227                    catch (Exception e) {
228                            _log.error(e, e);
229    
230                            throw new RemoteException(e.getMessage());
231                    }
232            }
233    
234            /**
235            * Copies a structure, creating a new structure with all the values
236            * extracted from the original one. The new structure supports a new name
237            * and description.
238            *
239            * @param structureId the primary key of the structure to be copied
240            * @param nameMap the new structure's locales and localized names
241            * @param descriptionMap the new structure's locales and localized
242            descriptions
243            * @param serviceContext the service context to be applied. Can set the
244            UUID, creation date, modification date, guest permissions, and
245            group permissions for the structure.
246            * @return the new structure
247            * @throws PortalException if the user did not have permission to add the
248            structure or if a portal exception occurred
249            * @throws SystemException if a system exception occurred
250            */
251            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap copyStructure(
252                    long structureId, java.lang.String[] nameMapLanguageIds,
253                    java.lang.String[] nameMapValues,
254                    java.lang.String[] descriptionMapLanguageIds,
255                    java.lang.String[] descriptionMapValues,
256                    com.liferay.portal.service.ServiceContext serviceContext)
257                    throws RemoteException {
258                    try {
259                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
260                                            nameMapValues);
261                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
262                                            descriptionMapValues);
263    
264                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
265                                    DDMStructureServiceUtil.copyStructure(structureId, nameMap,
266                                            descriptionMap, serviceContext);
267    
268                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
269                    }
270                    catch (Exception e) {
271                            _log.error(e, e);
272    
273                            throw new RemoteException(e.getMessage());
274                    }
275            }
276    
277            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap copyStructure(
278                    long structureId,
279                    com.liferay.portal.service.ServiceContext serviceContext)
280                    throws RemoteException {
281                    try {
282                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
283                                    DDMStructureServiceUtil.copyStructure(structureId,
284                                            serviceContext);
285    
286                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
287                    }
288                    catch (Exception e) {
289                            _log.error(e, e);
290    
291                            throw new RemoteException(e.getMessage());
292                    }
293            }
294    
295            /**
296            * Deletes the structure and its resources.
297            *
298            * <p>
299            * Before deleting the structure, the system verifies whether the structure
300            * is required by another entity. If it is needed, an exception is thrown.
301            * </p>
302            *
303            * @param structureId the primary key of the structure to be deleted
304            * @throws PortalException if the user did not have permission to delete the
305            structure or if a portal exception occurred
306            * @throws SystemException if a system exception occurred
307            */
308            public static void deleteStructure(long structureId)
309                    throws RemoteException {
310                    try {
311                            DDMStructureServiceUtil.deleteStructure(structureId);
312                    }
313                    catch (Exception e) {
314                            _log.error(e, e);
315    
316                            throw new RemoteException(e.getMessage());
317                    }
318            }
319    
320            /**
321            * Returns the structure matching the class name ID, structure key, and
322            * group.
323            *
324            * @param groupId the primary key of the group
325            * @param classNameId the primary key of the class name for the structure's
326            related model
327            * @param structureKey the unique string identifying the structure
328            * @return the matching structure, or <code>null</code> if a matching
329            structure could not be found
330            * @throws PortalException if the user did not have permission to view the
331            structure or if a portal exception occurred
332            * @throws SystemException if a system exception occurred
333            */
334            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap fetchStructure(
335                    long groupId, long classNameId, java.lang.String structureKey)
336                    throws RemoteException {
337                    try {
338                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
339                                    DDMStructureServiceUtil.fetchStructure(groupId, classNameId,
340                                            structureKey);
341    
342                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
343                    }
344                    catch (Exception e) {
345                            _log.error(e, e);
346    
347                            throw new RemoteException(e.getMessage());
348                    }
349            }
350    
351            /**
352            * Returns the structure with the ID.
353            *
354            * @param structureId the primary key of the structure
355            * @return the structure with the ID
356            * @throws PortalException if the user did not have permission to view the
357            structure or if a structure with the ID could not be found
358            * @throws SystemException if a system exception occurred
359            */
360            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
361                    long structureId) throws RemoteException {
362                    try {
363                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
364                                    DDMStructureServiceUtil.getStructure(structureId);
365    
366                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
367                    }
368                    catch (Exception e) {
369                            _log.error(e, e);
370    
371                            throw new RemoteException(e.getMessage());
372                    }
373            }
374    
375            /**
376            * Returns the structure matching the class name ID, structure key, and
377            * group.
378            *
379            * @param groupId the primary key of the structure's group
380            * @param classNameId the primary key of the class name for the structure's
381            related model
382            * @param structureKey the unique string identifying the structure
383            * @return the matching structure
384            * @throws PortalException if the user did not have permission to view the
385            structure or if a matching structure could not be found
386            * @throws SystemException if a system exception occurred
387            */
388            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
389                    long groupId, long classNameId, java.lang.String structureKey)
390                    throws RemoteException {
391                    try {
392                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
393                                    DDMStructureServiceUtil.getStructure(groupId, classNameId,
394                                            structureKey);
395    
396                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
397                    }
398                    catch (Exception e) {
399                            _log.error(e, e);
400    
401                            throw new RemoteException(e.getMessage());
402                    }
403            }
404    
405            /**
406            * Returns the structure matching the class name ID, structure key, and
407            * group, optionally in the global scope.
408            *
409            * <p>
410            * This method first searches in the group. If the structure is still not
411            * found and <code>includeGlobalStructures</code> is set to
412            * <code>true</code>, this method searches the global group.
413            * </p>
414            *
415            * @param groupId the primary key of the structure's group
416            * @param classNameId the primary key of the class name for the structure's
417            related model
418            * @param structureKey the unique string identifying the structure
419            * @param includeGlobalStructures whether to include the global scope in
420            the search
421            * @return the matching structure
422            * @throws PortalException if the user did not have permission to view the
423            structure or if a matching structure could not be found
424            * @throws SystemException if a system exception occurred
425            */
426            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
427                    long groupId, long classNameId, java.lang.String structureKey,
428                    boolean includeGlobalStructures) throws RemoteException {
429                    try {
430                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
431                                    DDMStructureServiceUtil.getStructure(groupId, classNameId,
432                                            structureKey, includeGlobalStructures);
433    
434                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
435                    }
436                    catch (Exception e) {
437                            _log.error(e, e);
438    
439                            throw new RemoteException(e.getMessage());
440                    }
441            }
442    
443            /**
444            * Returns all the structures in the group that the user has permission to
445            * view.
446            *
447            * @param groupId the primary key of the group
448            * @return the structures in the group that the user has permission to view
449            * @throws SystemException if a system exception occurred
450            */
451            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] getStructures(
452                    long groupId) throws RemoteException {
453                    try {
454                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
455                                    DDMStructureServiceUtil.getStructures(groupId);
456    
457                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
458                    }
459                    catch (Exception e) {
460                            _log.error(e, e);
461    
462                            throw new RemoteException(e.getMessage());
463                    }
464            }
465    
466            /**
467            * Returns all the structures in the groups that the user has permission to
468            * view.
469            *
470            * @param groupIds the primary key of the groups
471            * @return the structures in the groups that the user has permission to view
472            * @throws SystemException if a system exception occurred
473            */
474            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] getStructures(
475                    long[] groupIds) throws RemoteException {
476                    try {
477                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
478                                    DDMStructureServiceUtil.getStructures(groupIds);
479    
480                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
481                    }
482                    catch (Exception e) {
483                            _log.error(e, e);
484    
485                            throw new RemoteException(e.getMessage());
486                    }
487            }
488    
489            /**
490            * Returns an ordered range of all the structures matching the groups and
491            * class name IDs, and matching the keywords in the structure names and
492            * descriptions.
493            *
494            * <p>
495            * Useful when paginating results. Returns a maximum of <code>end -
496            * start</code> instances. <code>start</code> and <code>end</code> are not
497            * primary keys, they are indexes in the result set. Thus, <code>0</code>
498            * refers to the first result in the set. Setting both <code>start</code>
499            * and <code>end</code> to {@link
500            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
501            * result set.
502            * </p>
503            *
504            * @param companyId the primary key of the structure's company
505            * @param groupIds the primary keys of the groups
506            * @param classNameIds the primary keys of the class names of the models
507            the structures are related to
508            * @param keywords the keywords (space separated), which may occur in the
509            structure's name or description (optionally <code>null</code>)
510            * @param start the lower bound of the range of structures to return
511            * @param end the upper bound of the range of structures to return (not
512            inclusive)
513            * @param orderByComparator the comparator to order the structures
514            (optionally <code>null</code>)
515            * @return the range of matching structures ordered by the comparator
516            * @throws SystemException if a system exception occurred
517            */
518            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] search(
519                    long companyId, long[] groupIds, long[] classNameIds,
520                    java.lang.String keywords, int start, int end,
521                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
522                    throws RemoteException {
523                    try {
524                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
525                                    DDMStructureServiceUtil.search(companyId, groupIds,
526                                            classNameIds, keywords, start, end, orderByComparator);
527    
528                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
529                    }
530                    catch (Exception e) {
531                            _log.error(e, e);
532    
533                            throw new RemoteException(e.getMessage());
534                    }
535            }
536    
537            /**
538            * Returns an ordered range of all the structures matching the groups, class
539            * name IDs, name keyword, description keyword, storage type, and type.
540            *
541            * <p>
542            * Useful when paginating results. Returns a maximum of <code>end -
543            * start</code> instances. <code>start</code> and <code>end</code> are not
544            * primary keys, they are indexes in the result set. Thus, <code>0</code>
545            * refers to the first result in the set. Setting both <code>start</code>
546            * and <code>end</code> to {@link
547            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
548            * result set.
549            * </p>
550            *
551            * @param companyId the primary key of the structure's company
552            * @param groupIds the primary keys of the groups
553            * @param classNameIds the primary keys of the class names of the models
554            the structures are related to
555            * @param name the name keywords
556            * @param description the description keywords
557            * @param storageType the structure's storage type. It can be "xml" or
558            "expando". For more information, see {@link
559            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
560            * @param type the structure's type. For more information, see {@link
561            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
562            * @param andOperator whether every field must match its keywords, or just
563            one field
564            * @param start the lower bound of the range of structures to return
565            * @param end the upper bound of the range of structures to return (not
566            inclusive)
567            * @param orderByComparator the comparator to order the structures
568            (optionally <code>null</code>)
569            * @return the range of matching structures ordered by the comparator
570            * @throws SystemException if a system exception occurred
571            */
572            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] search(
573                    long companyId, long[] groupIds, long[] classNameIds,
574                    java.lang.String name, java.lang.String description,
575                    java.lang.String storageType, int type, boolean andOperator, int start,
576                    int end,
577                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
578                    throws RemoteException {
579                    try {
580                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
581                                    DDMStructureServiceUtil.search(companyId, groupIds,
582                                            classNameIds, name, description, storageType, type,
583                                            andOperator, start, end, orderByComparator);
584    
585                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
586                    }
587                    catch (Exception e) {
588                            _log.error(e, e);
589    
590                            throw new RemoteException(e.getMessage());
591                    }
592            }
593    
594            /**
595            * Returns the number of structures matching the groups and class name IDs,
596            * and matching the keywords in the structure names and descriptions.
597            *
598            * @param companyId the primary key of the structure's company
599            * @param groupIds the primary keys of the groups
600            * @param classNameIds the primary keys of the class names of the models
601            the structures are related to
602            * @param keywords the keywords (space separated), which may occur in the
603            structure's name or description (optionally <code>null</code>)
604            * @return the number of matching structures
605            * @throws SystemException if a system exception occurred
606            */
607            public static int searchCount(long companyId, long[] groupIds,
608                    long[] classNameIds, java.lang.String keywords)
609                    throws RemoteException {
610                    try {
611                            int returnValue = DDMStructureServiceUtil.searchCount(companyId,
612                                            groupIds, classNameIds, keywords);
613    
614                            return returnValue;
615                    }
616                    catch (Exception e) {
617                            _log.error(e, e);
618    
619                            throw new RemoteException(e.getMessage());
620                    }
621            }
622    
623            /**
624            * Returns the number of structures matching the groups, class name IDs,
625            * name keyword, description keyword, storage type, and type
626            *
627            * @param companyId the primary key of the structure's company
628            * @param groupIds the primary keys of the groups
629            * @param classNameIds the primary keys of the class names of the models
630            the structure's are related to
631            * @param name the name keywords
632            * @param description the description keywords
633            * @param storageType the structure's storage type. It can be "xml" or
634            "expando". For more information, see {@link
635            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
636            * @param type the structure's type. For more information, see {@link
637            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
638            * @param andOperator whether every field must match its keywords, or just
639            one field
640            * @return the number of matching structures
641            * @throws SystemException if a system exception occurred
642            */
643            public static int searchCount(long companyId, long[] groupIds,
644                    long[] classNameIds, java.lang.String name,
645                    java.lang.String description, java.lang.String storageType, int type,
646                    boolean andOperator) throws RemoteException {
647                    try {
648                            int returnValue = DDMStructureServiceUtil.searchCount(companyId,
649                                            groupIds, classNameIds, name, description, storageType,
650                                            type, andOperator);
651    
652                            return returnValue;
653                    }
654                    catch (Exception e) {
655                            _log.error(e, e);
656    
657                            throw new RemoteException(e.getMessage());
658                    }
659            }
660    
661            /**
662            * Updates the structure matching the class name ID, structure key, and
663            * group, replacing its old parent structure, name map, description map, and
664            * XSD with new ones.
665            *
666            * @param groupId the primary key of the group
667            * @param parentStructureId the primary key of the new parent structure
668            * @param classNameId the primary key of the class name for the structure's
669            related model
670            * @param structureKey the unique string identifying the structure
671            * @param nameMap the structure's new locales and localized names
672            * @param descriptionMap the structure's new locales and localized
673            description
674            * @param xsd the structure's new XML schema definition
675            * @param serviceContext the service context to be applied. Can set the
676            modification date.
677            * @return the updated structure
678            * @throws PortalException if the user did not have permission to update the
679            structure or if a portal exception occurred
680            * @throws SystemException if a system exception occurred
681            */
682            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
683                    long groupId, long parentStructureId, long classNameId,
684                    java.lang.String structureKey, java.lang.String[] nameMapLanguageIds,
685                    java.lang.String[] nameMapValues,
686                    java.lang.String[] descriptionMapLanguageIds,
687                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
688                    com.liferay.portal.service.ServiceContext serviceContext)
689                    throws RemoteException {
690                    try {
691                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
692                                            nameMapValues);
693                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
694                                            descriptionMapValues);
695    
696                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
697                                    DDMStructureServiceUtil.updateStructure(groupId,
698                                            parentStructureId, classNameId, structureKey, nameMap,
699                                            descriptionMap, xsd, serviceContext);
700    
701                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
702                    }
703                    catch (Exception e) {
704                            _log.error(e, e);
705    
706                            throw new RemoteException(e.getMessage());
707                    }
708            }
709    
710            /**
711            * Updates the structure matching the structure ID, replacing the old parent
712            * structure ID, name map, description map, and XSD with the new values.
713            *
714            * @param structureId the primary key of the structure
715            * @param parentStructureId the new parent structure primary key
716            * @param nameMap the structure's new locales and localized names
717            * @param descriptionMap the structure's new locales and localized
718            description
719            * @param xsd the new XML schema definition of the structure
720            * @param serviceContext the service context to be applied. Can set the
721            modification date.
722            * @return the updated structure
723            * @throws PortalException if the user did not have permission to update the
724            structure or if a portal exception occurred
725            * @throws SystemException if a system exception occurred
726            */
727            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
728                    long structureId, long parentStructureId,
729                    java.lang.String[] nameMapLanguageIds,
730                    java.lang.String[] nameMapValues,
731                    java.lang.String[] descriptionMapLanguageIds,
732                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
733                    com.liferay.portal.service.ServiceContext serviceContext)
734                    throws RemoteException {
735                    try {
736                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
737                                            nameMapValues);
738                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
739                                            descriptionMapValues);
740    
741                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
742                                    DDMStructureServiceUtil.updateStructure(structureId,
743                                            parentStructureId, nameMap, descriptionMap, xsd,
744                                            serviceContext);
745    
746                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
747                    }
748                    catch (Exception e) {
749                            _log.error(e, e);
750    
751                            throw new RemoteException(e.getMessage());
752                    }
753            }
754    
755            private static Log _log = LogFactoryUtil.getLog(DDMStructureServiceSoap.class);
756    }