001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.service.http;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.util.LocalizationUtil;
022    
023    import com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil;
024    
025    import java.rmi.RemoteException;
026    
027    import java.util.Locale;
028    import java.util.Map;
029    
030    /**
031     * Provides the SOAP utility for the
032     * {@link DDMStructureServiceUtil} service utility. The
033     * static methods of this class calls the same methods of the service utility.
034     * However, the signatures are different because it is difficult for SOAP to
035     * support certain types.
036     *
037     * <p>
038     * ServiceBuilder follows certain rules in translating the methods. For example,
039     * if the method in the service utility returns a {@link java.util.List}, that
040     * is translated to an array of {@link com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap}.
041     * If the method in the service utility returns a
042     * {@link com.liferay.portlet.dynamicdatamapping.model.DDMStructure}, that is translated to a
043     * {@link com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap}. Methods that SOAP cannot
044     * safely wire are skipped.
045     * </p>
046     *
047     * <p>
048     * The benefits of using the SOAP utility is that it is cross platform
049     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
050     * even Perl, to call the generated services. One drawback of SOAP is that it is
051     * slow because it needs to serialize all calls into a text format (XML).
052     * </p>
053     *
054     * <p>
055     * You can see a list of services at http://localhost:8080/api/axis. Set the
056     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
057     * security.
058     * </p>
059     *
060     * <p>
061     * The SOAP utility is only generated for remote services.
062     * </p>
063     *
064     * @author Brian Wing Shun Chan
065     * @see DDMStructureServiceHttp
066     * @see com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap
067     * @see DDMStructureServiceUtil
068     * @generated
069     */
070    @ProviderType
071    public class DDMStructureServiceSoap {
072            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
073                    long userId, long groupId, long classNameId,
074                    java.lang.String[] nameMapLanguageIds,
075                    java.lang.String[] nameMapValues,
076                    java.lang.String[] descriptionMapLanguageIds,
077                    java.lang.String[] descriptionMapValues,
078                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
079                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
080                    com.liferay.portal.service.ServiceContext serviceContext)
081                    throws RemoteException {
082                    try {
083                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
084                                            nameMapValues);
085                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
086                                            descriptionMapValues);
087    
088                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
089                                    DDMStructureServiceUtil.addStructure(userId, groupId,
090                                            classNameId, nameMap, descriptionMap, ddmForm,
091                                            ddmFormLayout, serviceContext);
092    
093                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
094                    }
095                    catch (Exception e) {
096                            _log.error(e, e);
097    
098                            throw new RemoteException(e.getMessage());
099                    }
100            }
101    
102            /**
103            * Adds a structure referencing a default parent structure, using the portal
104            * property <code>dynamic.data.lists.storage.type</code> storage type and
105            * default structure type.
106            *
107            * @param userId the primary key of the structure's creator/owner
108            * @param groupId the primary key of the group
109            * @param classNameId the primary key of the class name for the
110            structure's related model
111            * @param nameMap the structure's locales and localized names
112            * @param descriptionMap the structure's locales and localized
113            descriptions
114            * @param xsd the structure's XML schema definition
115            * @param serviceContext the service context to be applied. Can set the
116            UUID, creation date, modification date, guest permissions,
117            and group permissions for the structure.
118            * @return the structure
119            * @throws PortalException if a user with the primary key could not be
120            found, if the user did not have permission to add the
121            structure, if the XSD was not well-formed, or if a portal
122            exception occurred
123            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
124            long, Map, Map, DDMForm, DDMFormLayout, ServiceContext)}
125            */
126            @Deprecated
127            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
128                    long userId, long groupId, long classNameId,
129                    java.lang.String[] nameMapLanguageIds,
130                    java.lang.String[] nameMapValues,
131                    java.lang.String[] descriptionMapLanguageIds,
132                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
133                    com.liferay.portal.service.ServiceContext serviceContext)
134                    throws RemoteException {
135                    try {
136                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
137                                            nameMapValues);
138                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
139                                            descriptionMapValues);
140    
141                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
142                                    DDMStructureServiceUtil.addStructure(userId, groupId,
143                                            classNameId, nameMap, descriptionMap, xsd, serviceContext);
144    
145                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
146                    }
147                    catch (Exception e) {
148                            _log.error(e, e);
149    
150                            throw new RemoteException(e.getMessage());
151                    }
152            }
153    
154            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
155                    long groupId, long parentStructureId, long classNameId,
156                    java.lang.String structureKey, java.lang.String[] nameMapLanguageIds,
157                    java.lang.String[] nameMapValues,
158                    java.lang.String[] descriptionMapLanguageIds,
159                    java.lang.String[] descriptionMapValues,
160                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
161                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
162                    java.lang.String storageType, int type,
163                    com.liferay.portal.service.ServiceContext serviceContext)
164                    throws RemoteException {
165                    try {
166                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
167                                            nameMapValues);
168                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
169                                            descriptionMapValues);
170    
171                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
172                                    DDMStructureServiceUtil.addStructure(groupId,
173                                            parentStructureId, classNameId, structureKey, nameMap,
174                                            descriptionMap, ddmForm, ddmFormLayout, storageType, type,
175                                            serviceContext);
176    
177                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
178                    }
179                    catch (Exception e) {
180                            _log.error(e, e);
181    
182                            throw new RemoteException(e.getMessage());
183                    }
184            }
185    
186            /**
187            * Adds a structure referencing its parent structure.
188            *
189            * @param groupId the primary key of the group
190            * @param parentStructureId the primary key of the parent structure
191            (optionally {@link
192            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants#DEFAULT_PARENT_STRUCTURE_ID})
193            * @param classNameId the primary key of the class name for the
194            structure's related model
195            * @param structureKey the unique string identifying the structure
196            (optionally <code>null</code>)
197            * @param nameMap the structure's locales and localized names
198            * @param descriptionMap the structure's locales and localized
199            descriptions
200            * @param xsd the structure's XML schema definition
201            * @param storageType the structure's storage type. It can be "xml" or
202            "expando". For more information, see {@link
203            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
204            * @param type the structure's type. For more information, see {@link
205            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
206            * @param serviceContext the service context to be applied. Can set the
207            UUID, creation date, modification date, guest permissions,
208            and group permissions for the structure.
209            * @return the structure
210            * @throws PortalException if the user did not have permission to add
211            the structure, if the XSD is not well formed, or if a portal
212            exception occurred
213            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
214            long, String, Map, Map, DDMForm, DDMFormLayout, String, int,
215            ServiceContext)}
216            */
217            @Deprecated
218            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
219                    long groupId, long parentStructureId, long classNameId,
220                    java.lang.String structureKey, java.lang.String[] nameMapLanguageIds,
221                    java.lang.String[] nameMapValues,
222                    java.lang.String[] descriptionMapLanguageIds,
223                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
224                    java.lang.String storageType, int type,
225                    com.liferay.portal.service.ServiceContext serviceContext)
226                    throws RemoteException {
227                    try {
228                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
229                                            nameMapValues);
230                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
231                                            descriptionMapValues);
232    
233                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
234                                    DDMStructureServiceUtil.addStructure(groupId,
235                                            parentStructureId, classNameId, structureKey, nameMap,
236                                            descriptionMap, xsd, storageType, type, serviceContext);
237    
238                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
239                    }
240                    catch (Exception e) {
241                            _log.error(e, e);
242    
243                            throw new RemoteException(e.getMessage());
244                    }
245            }
246    
247            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
248                    long userId, long groupId, java.lang.String parentStructureKey,
249                    long classNameId, java.lang.String structureKey,
250                    java.lang.String[] nameMapLanguageIds,
251                    java.lang.String[] nameMapValues,
252                    java.lang.String[] descriptionMapLanguageIds,
253                    java.lang.String[] descriptionMapValues,
254                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
255                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
256                    java.lang.String storageType, int type,
257                    com.liferay.portal.service.ServiceContext serviceContext)
258                    throws RemoteException {
259                    try {
260                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
261                                            nameMapValues);
262                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
263                                            descriptionMapValues);
264    
265                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
266                                    DDMStructureServiceUtil.addStructure(userId, groupId,
267                                            parentStructureKey, classNameId, structureKey, nameMap,
268                                            descriptionMap, ddmForm, ddmFormLayout, storageType, type,
269                                            serviceContext);
270    
271                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
272                    }
273                    catch (Exception e) {
274                            _log.error(e, e);
275    
276                            throw new RemoteException(e.getMessage());
277                    }
278            }
279    
280            /**
281            * Adds a structure referencing the parent structure by its structure key.
282            * In case the parent structure is not found, it uses the default parent
283            * structure ID.
284            *
285            * @param userId the primary key of the structure's creator/owner
286            * @param groupId the primary key of the group
287            * @param parentStructureKey the unique string identifying the
288            structure
289            * @param classNameId the primary key of the class name for the
290            structure's related model
291            * @param structureKey unique string identifying the structure
292            (optionally <code>null</code>)
293            * @param nameMap the structure's locales and localized names
294            * @param descriptionMap the structure's locales and localized
295            descriptions
296            * @param xsd the XML schema definition of the structure
297            * @param storageType the storage type of the structure. It can be XML
298            or expando. For more information, see {@link
299            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
300            * @param type the structure's type. For more information, see {@link
301            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
302            * @param serviceContext the service context to be applied. Must have
303            the <code>ddmResource</code> attribute to check permissions.
304            Can set the UUID, creation date, modification date, guest
305            permissions, and group permissions for the structure.
306            * @return the structure
307            * @throws PortalException if a user with the primary key could not be
308            found, if the user did not have permission to add the
309            structure, if the XSD was not well-formed, or if a portal
310            exception occurred
311            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
312            String, long, String, Map, Map, DDMForm, DDMFormLayout,
313            String, int, ServiceContext)}
314            */
315            @Deprecated
316            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
317                    long userId, long groupId, java.lang.String parentStructureKey,
318                    long classNameId, java.lang.String structureKey,
319                    java.lang.String[] nameMapLanguageIds,
320                    java.lang.String[] nameMapValues,
321                    java.lang.String[] descriptionMapLanguageIds,
322                    java.lang.String[] descriptionMapValues, java.lang.String xsd,
323                    java.lang.String storageType, int type,
324                    com.liferay.portal.service.ServiceContext serviceContext)
325                    throws RemoteException {
326                    try {
327                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
328                                            nameMapValues);
329                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
330                                            descriptionMapValues);
331    
332                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
333                                    DDMStructureServiceUtil.addStructure(userId, groupId,
334                                            parentStructureKey, classNameId, structureKey, nameMap,
335                                            descriptionMap, xsd, storageType, type, serviceContext);
336    
337                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
338                    }
339                    catch (Exception e) {
340                            _log.error(e, e);
341    
342                            throw new RemoteException(e.getMessage());
343                    }
344            }
345    
346            /**
347            * Copies a structure, creating a new structure with all the values
348            * extracted from the original one. The new structure supports a new name
349            * and description.
350            *
351            * @param structureId the primary key of the structure to be copied
352            * @param nameMap the new structure's locales and localized names
353            * @param descriptionMap the new structure's locales and localized
354            descriptions
355            * @param serviceContext the service context to be applied. Can set the
356            UUID, creation date, modification date, guest permissions, and
357            group permissions for the structure.
358            * @return the new structure
359            * @throws PortalException if the user did not have permission to add the
360            structure or if a portal exception occurred
361            */
362            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap copyStructure(
363                    long structureId, java.lang.String[] nameMapLanguageIds,
364                    java.lang.String[] nameMapValues,
365                    java.lang.String[] descriptionMapLanguageIds,
366                    java.lang.String[] descriptionMapValues,
367                    com.liferay.portal.service.ServiceContext serviceContext)
368                    throws RemoteException {
369                    try {
370                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
371                                            nameMapValues);
372                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
373                                            descriptionMapValues);
374    
375                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
376                                    DDMStructureServiceUtil.copyStructure(structureId, nameMap,
377                                            descriptionMap, serviceContext);
378    
379                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
380                    }
381                    catch (Exception e) {
382                            _log.error(e, e);
383    
384                            throw new RemoteException(e.getMessage());
385                    }
386            }
387    
388            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap copyStructure(
389                    long structureId,
390                    com.liferay.portal.service.ServiceContext serviceContext)
391                    throws RemoteException {
392                    try {
393                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
394                                    DDMStructureServiceUtil.copyStructure(structureId,
395                                            serviceContext);
396    
397                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
398                    }
399                    catch (Exception e) {
400                            _log.error(e, e);
401    
402                            throw new RemoteException(e.getMessage());
403                    }
404            }
405    
406            /**
407            * Deletes the structure and its resources.
408            *
409            * <p>
410            * Before deleting the structure, the system verifies whether the structure
411            * is required by another entity. If it is needed, an exception is thrown.
412            * </p>
413            *
414            * @param structureId the primary key of the structure to be deleted
415            * @throws PortalException if the user did not have permission to delete the
416            structure or if a portal exception occurred
417            */
418            public static void deleteStructure(long structureId)
419                    throws RemoteException {
420                    try {
421                            DDMStructureServiceUtil.deleteStructure(structureId);
422                    }
423                    catch (Exception e) {
424                            _log.error(e, e);
425    
426                            throw new RemoteException(e.getMessage());
427                    }
428            }
429    
430            /**
431            * Returns the structure matching the class name ID, structure key, and
432            * group.
433            *
434            * @param groupId the primary key of the group
435            * @param classNameId the primary key of the class name for the structure's
436            related model
437            * @param structureKey the unique string identifying the structure
438            * @return the matching structure, or <code>null</code> if a matching
439            structure could not be found
440            * @throws PortalException if the user did not have permission to view the
441            structure or if a portal exception occurred
442            */
443            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap fetchStructure(
444                    long groupId, long classNameId, java.lang.String structureKey)
445                    throws RemoteException {
446                    try {
447                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
448                                    DDMStructureServiceUtil.fetchStructure(groupId, classNameId,
449                                            structureKey);
450    
451                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
452                    }
453                    catch (Exception e) {
454                            _log.error(e, e);
455    
456                            throw new RemoteException(e.getMessage());
457                    }
458            }
459    
460            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap fetchStructure(
461                    long groupId, long classNameId, java.lang.String structureKey,
462                    boolean includeAncestorStructures) throws RemoteException {
463                    try {
464                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
465                                    DDMStructureServiceUtil.fetchStructure(groupId, classNameId,
466                                            structureKey, includeAncestorStructures);
467    
468                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
469                    }
470                    catch (Exception e) {
471                            _log.error(e, e);
472    
473                            throw new RemoteException(e.getMessage());
474                    }
475            }
476    
477            /**
478            * Returns the structure with the ID.
479            *
480            * @param structureId the primary key of the structure
481            * @return the structure with the ID
482            * @throws PortalException if the user did not have permission to view the
483            structure or if a structure with the ID could not be found
484            */
485            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
486                    long structureId) throws RemoteException {
487                    try {
488                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
489                                    DDMStructureServiceUtil.getStructure(structureId);
490    
491                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
492                    }
493                    catch (Exception e) {
494                            _log.error(e, e);
495    
496                            throw new RemoteException(e.getMessage());
497                    }
498            }
499    
500            /**
501            * Returns the structure matching the class name ID, structure key, and
502            * group.
503            *
504            * @param groupId the primary key of the structure's group
505            * @param classNameId the primary key of the class name for the structure's
506            related model
507            * @param structureKey the unique string identifying the structure
508            * @return the matching structure
509            * @throws PortalException if the user did not have permission to view the
510            structure or if a matching structure could not be found
511            */
512            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
513                    long groupId, long classNameId, java.lang.String structureKey)
514                    throws RemoteException {
515                    try {
516                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
517                                    DDMStructureServiceUtil.getStructure(groupId, classNameId,
518                                            structureKey);
519    
520                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
521                    }
522                    catch (Exception e) {
523                            _log.error(e, e);
524    
525                            throw new RemoteException(e.getMessage());
526                    }
527            }
528    
529            /**
530            * Returns the structure matching the class name ID, structure key, and
531            * group, optionally searching ancestor sites (that have sharing enabled)
532            * and global scoped sites.
533            *
534            * <p>
535            * This method first searches in the group. If the structure is still not
536            * found and <code>includeAncestorStructures</code> is set to
537            * <code>true</code>, this method searches the group's ancestor sites (that
538            * have sharing enabled) and lastly searches global scoped sites.
539            * </p>
540            *
541            * @param groupId the primary key of the structure's group
542            * @param classNameId the primary key of the class name for the structure's
543            related model
544            * @param structureKey the unique string identifying the structure
545            * @param includeAncestorStructures whether to include ancestor sites (that
546            have sharing enabled) and include global scoped sites in the
547            search
548            * @return the matching structure
549            * @throws PortalException if the user did not have permission to view the
550            structure or if a matching structure could not be found
551            */
552            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
553                    long groupId, long classNameId, java.lang.String structureKey,
554                    boolean includeAncestorStructures) throws RemoteException {
555                    try {
556                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
557                                    DDMStructureServiceUtil.getStructure(groupId, classNameId,
558                                            structureKey, includeAncestorStructures);
559    
560                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
561                    }
562                    catch (Exception e) {
563                            _log.error(e, e);
564    
565                            throw new RemoteException(e.getMessage());
566                    }
567            }
568    
569            /**
570            * Returns all the structures in the group that the user has permission to
571            * view.
572            *
573            * @param groupId the primary key of the group
574            * @return the structures in the group that the user has permission to view
575            */
576            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] getStructures(
577                    long groupId) throws RemoteException {
578                    try {
579                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
580                                    DDMStructureServiceUtil.getStructures(groupId);
581    
582                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
583                    }
584                    catch (Exception e) {
585                            _log.error(e, e);
586    
587                            throw new RemoteException(e.getMessage());
588                    }
589            }
590    
591            /**
592            * Returns all the structures in the groups that the user has permission to
593            * view.
594            *
595            * @param groupIds the primary key of the groups
596            * @return the structures in the groups that the user has permission to view
597            */
598            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] getStructures(
599                    long[] groupIds) throws RemoteException {
600                    try {
601                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
602                                    DDMStructureServiceUtil.getStructures(groupIds);
603    
604                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
605                    }
606                    catch (Exception e) {
607                            _log.error(e, e);
608    
609                            throw new RemoteException(e.getMessage());
610                    }
611            }
612    
613            /**
614            * Returns all the structures matching the groups and class name ID that the
615            * user has permission to view.
616            *
617            * @param groupIds the primary keys of the groups
618            * @param classNameId the primary key of the class name for the structure's
619            related model
620            * @return the structures matching the groups and class name ID that the
621            user has permission to view
622            */
623            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] getStructures(
624                    long[] groupIds, long classNameId) throws RemoteException {
625                    try {
626                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
627                                    DDMStructureServiceUtil.getStructures(groupIds, classNameId);
628    
629                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
630                    }
631                    catch (Exception e) {
632                            _log.error(e, e);
633    
634                            throw new RemoteException(e.getMessage());
635                    }
636            }
637    
638            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] getStructures(
639                    long[] groupIds, long classNameId, int start, int end)
640                    throws RemoteException {
641                    try {
642                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
643                                    DDMStructureServiceUtil.getStructures(groupIds, classNameId,
644                                            start, end);
645    
646                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
647                    }
648                    catch (Exception e) {
649                            _log.error(e, e);
650    
651                            throw new RemoteException(e.getMessage());
652                    }
653            }
654    
655            public static void revertStructure(long structureId,
656                    java.lang.String version,
657                    com.liferay.portal.service.ServiceContext serviceContext)
658                    throws RemoteException {
659                    try {
660                            DDMStructureServiceUtil.revertStructure(structureId, version,
661                                    serviceContext);
662                    }
663                    catch (Exception e) {
664                            _log.error(e, e);
665    
666                            throw new RemoteException(e.getMessage());
667                    }
668            }
669    
670            /**
671            * Returns an ordered range of all the structures matching the groups and
672            * class name IDs, and matching the keywords in the structure names and
673            * descriptions.
674            *
675            * <p>
676            * Useful when paginating results. Returns a maximum of <code>end -
677            * start</code> instances. <code>start</code> and <code>end</code> are not
678            * primary keys, they are indexes in the result set. Thus, <code>0</code>
679            * refers to the first result in the set. Setting both <code>start</code>
680            * and <code>end</code> to {@link
681            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
682            * result set.
683            * </p>
684            *
685            * @param companyId the primary key of the structure's company
686            * @param groupIds the primary keys of the groups
687            * @param classNameId the primary key of the class name of the model the
688            structure is related to
689            * @param keywords the keywords (space separated), which may occur in the
690            structure's name or description (optionally <code>null</code>)
691            * @param start the lower bound of the range of structures to return
692            * @param end the upper bound of the range of structures to return (not
693            inclusive)
694            * @param orderByComparator the comparator to order the structures
695            (optionally <code>null</code>)
696            * @return the range of matching structures ordered by the comparator
697            */
698            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] search(
699                    long companyId, long[] groupIds, long classNameId,
700                    java.lang.String keywords, int start, int end,
701                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator)
702                    throws RemoteException {
703                    try {
704                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
705                                    DDMStructureServiceUtil.search(companyId, groupIds,
706                                            classNameId, keywords, start, end, orderByComparator);
707    
708                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
709                    }
710                    catch (Exception e) {
711                            _log.error(e, e);
712    
713                            throw new RemoteException(e.getMessage());
714                    }
715            }
716    
717            /**
718            * Returns an ordered range of all the structures matching the groups, class
719            * name IDs, name keyword, description keyword, storage type, and type.
720            *
721            * <p>
722            * Useful when paginating results. Returns a maximum of <code>end -
723            * start</code> instances. <code>start</code> and <code>end</code> are not
724            * primary keys, they are indexes in the result set. Thus, <code>0</code>
725            * refers to the first result in the set. Setting both <code>start</code>
726            * and <code>end</code> to {@link
727            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
728            * result set.
729            * </p>
730            *
731            * @param companyId the primary key of the structure's company
732            * @param groupIds the primary keys of the groups
733            * @param classNameId the primary key of the class name of the model the
734            structure is related to
735            * @param name the name keywords
736            * @param description the description keywords
737            * @param storageType the structure's storage type. It can be "xml" or
738            "expando". For more information, see {@link
739            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
740            * @param type the structure's type. For more information, see {@link
741            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
742            * @param andOperator whether every field must match its keywords, or just
743            one field
744            * @param start the lower bound of the range of structures to return
745            * @param end the upper bound of the range of structures to return (not
746            inclusive)
747            * @param orderByComparator the comparator to order the structures
748            (optionally <code>null</code>)
749            * @return the range of matching structures ordered by the comparator
750            */
751            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] search(
752                    long companyId, long[] groupIds, long classNameId,
753                    java.lang.String name, java.lang.String description,
754                    java.lang.String storageType, int type, boolean andOperator, int start,
755                    int end,
756                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator)
757                    throws RemoteException {
758                    try {
759                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
760                                    DDMStructureServiceUtil.search(companyId, groupIds,
761                                            classNameId, name, description, storageType, type,
762                                            andOperator, start, end, orderByComparator);
763    
764                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
765                    }
766                    catch (Exception e) {
767                            _log.error(e, e);
768    
769                            throw new RemoteException(e.getMessage());
770                    }
771            }
772    
773            /**
774            * Returns the number of structures matching the groups and class name IDs,
775            * and matching the keywords in the structure names and descriptions.
776            *
777            * @param companyId the primary key of the structure's company
778            * @param groupIds the primary keys of the groups
779            * @param classNameId the primary key of the class name of the model the
780            structure is related to
781            * @param keywords the keywords (space separated), which may occur in the
782            structure's name or description (optionally <code>null</code>)
783            * @return the number of matching structures
784            */
785            public static int searchCount(long companyId, long[] groupIds,
786                    long classNameId, java.lang.String keywords) throws RemoteException {
787                    try {
788                            int returnValue = DDMStructureServiceUtil.searchCount(companyId,
789                                            groupIds, classNameId, keywords);
790    
791                            return returnValue;
792                    }
793                    catch (Exception e) {
794                            _log.error(e, e);
795    
796                            throw new RemoteException(e.getMessage());
797                    }
798            }
799    
800            /**
801            * Returns the number of structures matching the groups, class name IDs,
802            * name keyword, description keyword, storage type, and type
803            *
804            * @param companyId the primary key of the structure's company
805            * @param groupIds the primary keys of the groups
806            * @param classNameId the primary key of the class name of the model the
807            structure is related to
808            * @param name the name keywords
809            * @param description the description keywords
810            * @param storageType the structure's storage type. It can be "xml" or
811            "expando". For more information, see {@link
812            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
813            * @param type the structure's type. For more information, see {@link
814            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
815            * @param andOperator whether every field must match its keywords, or just
816            one field
817            * @return the number of matching structures
818            */
819            public static int searchCount(long companyId, long[] groupIds,
820                    long classNameId, java.lang.String name, java.lang.String description,
821                    java.lang.String storageType, int type, boolean andOperator)
822                    throws RemoteException {
823                    try {
824                            int returnValue = DDMStructureServiceUtil.searchCount(companyId,
825                                            groupIds, classNameId, name, description, storageType,
826                                            type, andOperator);
827    
828                            return returnValue;
829                    }
830                    catch (Exception e) {
831                            _log.error(e, e);
832    
833                            throw new RemoteException(e.getMessage());
834                    }
835            }
836    
837            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
838                    long groupId, long parentStructureId, long classNameId,
839                    java.lang.String structureKey, java.lang.String[] nameMapLanguageIds,
840                    java.lang.String[] nameMapValues,
841                    java.lang.String[] descriptionMapLanguageIds,
842                    java.lang.String[] descriptionMapValues,
843                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
844                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
845                    com.liferay.portal.service.ServiceContext serviceContext)
846                    throws RemoteException {
847                    try {
848                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
849                                            nameMapValues);
850                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
851                                            descriptionMapValues);
852    
853                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
854                                    DDMStructureServiceUtil.updateStructure(groupId,
855                                            parentStructureId, classNameId, structureKey, nameMap,
856                                            descriptionMap, ddmForm, ddmFormLayout, serviceContext);
857    
858                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
859                    }
860                    catch (Exception e) {
861                            _log.error(e, e);
862    
863                            throw new RemoteException(e.getMessage());
864                    }
865            }
866    
867            /**
868            * Updates the structure matching the class name ID, structure key, and
869            * group, replacing its old parent structure, name map, description map, and
870            * XSD with new ones.
871            *
872            * @param groupId the primary key of the group
873            * @param parentStructureId the primary key of the new parent structure
874            * @param classNameId the primary key of the class name for the
875            structure's related model
876            * @param structureKey the unique string identifying the structure
877            * @param nameMap the structure's new locales and localized names
878            * @param descriptionMap the structure's new locales and localized
879            description
880            * @param definition the structure's new XML schema definition
881            * @param serviceContext the service context to be applied. Can set the
882            modification date.
883            * @return the updated structure
884            * @throws PortalException if the user did not have permission to update
885            the structure or if a portal exception occurred
886            * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long, long,
887            long, String, Map, Map, DDMForm, DDMFormLayout,
888            ServiceContext)}
889            */
890            @Deprecated
891            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
892                    long groupId, long parentStructureId, long classNameId,
893                    java.lang.String structureKey, java.lang.String[] nameMapLanguageIds,
894                    java.lang.String[] nameMapValues,
895                    java.lang.String[] descriptionMapLanguageIds,
896                    java.lang.String[] descriptionMapValues, java.lang.String definition,
897                    com.liferay.portal.service.ServiceContext serviceContext)
898                    throws RemoteException {
899                    try {
900                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
901                                            nameMapValues);
902                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
903                                            descriptionMapValues);
904    
905                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
906                                    DDMStructureServiceUtil.updateStructure(groupId,
907                                            parentStructureId, classNameId, structureKey, nameMap,
908                                            descriptionMap, definition, serviceContext);
909    
910                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
911                    }
912                    catch (Exception e) {
913                            _log.error(e, e);
914    
915                            throw new RemoteException(e.getMessage());
916                    }
917            }
918    
919            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
920                    long structureId, long parentStructureId,
921                    java.lang.String[] nameMapLanguageIds,
922                    java.lang.String[] nameMapValues,
923                    java.lang.String[] descriptionMapLanguageIds,
924                    java.lang.String[] descriptionMapValues,
925                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
926                    com.liferay.portlet.dynamicdatamapping.model.DDMFormLayout ddmFormLayout,
927                    com.liferay.portal.service.ServiceContext serviceContext)
928                    throws RemoteException {
929                    try {
930                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
931                                            nameMapValues);
932                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
933                                            descriptionMapValues);
934    
935                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
936                                    DDMStructureServiceUtil.updateStructure(structureId,
937                                            parentStructureId, nameMap, descriptionMap, ddmForm,
938                                            ddmFormLayout, serviceContext);
939    
940                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
941                    }
942                    catch (Exception e) {
943                            _log.error(e, e);
944    
945                            throw new RemoteException(e.getMessage());
946                    }
947            }
948    
949            /**
950            * Updates the structure matching the structure ID, replacing the old parent
951            * structure ID, name map, description map, and XSD with the new values.
952            *
953            * @param structureId the primary key of the structure
954            * @param parentStructureId the new parent structure primary key
955            * @param nameMap the structure's new locales and localized names
956            * @param descriptionMap the structure's new locales and localized
957            description
958            * @param definition the new XML schema definition of the structure
959            * @param serviceContext the service context to be applied. Can set the
960            modification date.
961            * @return the updated structure
962            * @throws PortalException if the user did not have permission to update
963            the structure or if a portal exception occurred
964            * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long, long,
965            Map, Map, DDMForm, DDMFormLayout, ServiceContext)}
966            */
967            @Deprecated
968            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
969                    long structureId, long parentStructureId,
970                    java.lang.String[] nameMapLanguageIds,
971                    java.lang.String[] nameMapValues,
972                    java.lang.String[] descriptionMapLanguageIds,
973                    java.lang.String[] descriptionMapValues, java.lang.String definition,
974                    com.liferay.portal.service.ServiceContext serviceContext)
975                    throws RemoteException {
976                    try {
977                            Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
978                                            nameMapValues);
979                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
980                                            descriptionMapValues);
981    
982                            com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
983                                    DDMStructureServiceUtil.updateStructure(structureId,
984                                            parentStructureId, nameMap, descriptionMap, definition,
985                                            serviceContext);
986    
987                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
988                    }
989                    catch (Exception e) {
990                            _log.error(e, e);
991    
992                            throw new RemoteException(e.getMessage());
993                    }
994            }
995    
996            private static Log _log = LogFactoryUtil.getLog(DDMStructureServiceSoap.class);
997    }