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