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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for DDMStructure. This utility wraps
024     * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DDMStructureService
032     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMStructureServiceBaseImpl
033     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DDMStructureServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
044                    long groupId, long parentStructureId, long classNameId,
045                    java.lang.String structureKey,
046                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
047                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
048                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
049                    java.lang.String storageType, int type,
050                    com.liferay.portal.service.ServiceContext serviceContext)
051                    throws com.liferay.portal.kernel.exception.PortalException {
052                    return getService()
053                                       .addStructure(groupId, parentStructureId, classNameId,
054                            structureKey, nameMap, descriptionMap, ddmForm, storageType, type,
055                            serviceContext);
056            }
057    
058            /**
059            * Adds a structure referencing its parent structure.
060            *
061            * @param groupId the primary key of the group
062            * @param parentStructureId the primary key of the parent structure
063            (optionally {@link
064            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants#DEFAULT_PARENT_STRUCTURE_ID})
065            * @param classNameId the primary key of the class name for the
066            structure's related model
067            * @param structureKey the unique string identifying the structure
068            (optionally <code>null</code>)
069            * @param nameMap the structure's locales and localized names
070            * @param descriptionMap the structure's locales and localized
071            descriptions
072            * @param xsd the structure's XML schema definition
073            * @param storageType the structure's storage type. It can be "xml" or
074            "expando". For more information, see {@link
075            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
076            * @param type the structure's type. For more information, see {@link
077            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
078            * @param serviceContext the service context to be applied. Can set the
079            UUID, creation date, modification date, guest permissions,
080            and group permissions for the structure.
081            * @return the structure
082            * @throws PortalException if the user did not have permission to add
083            the structure, if the XSD is not well formed, or if a portal
084            exception occurred
085            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
086            long, String, Map, Map, DDMForm, String, int,
087            ServiceContext)}
088            */
089            @Deprecated
090            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
091                    long groupId, long parentStructureId, long classNameId,
092                    java.lang.String structureKey,
093                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
094                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
095                    java.lang.String xsd, java.lang.String storageType, int type,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    return getService()
099                                       .addStructure(groupId, parentStructureId, classNameId,
100                            structureKey, nameMap, descriptionMap, xsd, storageType, type,
101                            serviceContext);
102            }
103    
104            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
105                    long userId, long groupId, long classNameId,
106                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
107                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
108                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
109                    com.liferay.portal.service.ServiceContext serviceContext)
110                    throws com.liferay.portal.kernel.exception.PortalException {
111                    return getService()
112                                       .addStructure(userId, groupId, classNameId, nameMap,
113                            descriptionMap, ddmForm, serviceContext);
114            }
115    
116            /**
117            * Adds a structure referencing a default parent structure, using the portal
118            * property <code>dynamic.data.lists.storage.type</code> storage type and
119            * default structure type.
120            *
121            * @param userId the primary key of the structure's creator/owner
122            * @param groupId the primary key of the group
123            * @param classNameId the primary key of the class name for the
124            structure's related model
125            * @param nameMap the structure's locales and localized names
126            * @param descriptionMap the structure's locales and localized
127            descriptions
128            * @param xsd the structure's XML schema definition
129            * @param serviceContext the service context to be applied. Can set the
130            UUID, creation date, modification date, guest permissions,
131            and group permissions for the structure.
132            * @return the structure
133            * @throws PortalException if a user with the primary key could not be
134            found, if the user did not have permission to add the
135            structure, if the XSD was not well-formed, or if a portal
136            exception occurred
137            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
138            long, Map, Map, DDMForm, ServiceContext)}
139            */
140            @Deprecated
141            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
142                    long userId, long groupId, long classNameId,
143                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
144                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
145                    java.lang.String xsd,
146                    com.liferay.portal.service.ServiceContext serviceContext)
147                    throws com.liferay.portal.kernel.exception.PortalException {
148                    return getService()
149                                       .addStructure(userId, groupId, classNameId, nameMap,
150                            descriptionMap, xsd, serviceContext);
151            }
152    
153            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
154                    long userId, long groupId, java.lang.String parentStructureKey,
155                    long classNameId, java.lang.String structureKey,
156                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
157                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
158                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
159                    java.lang.String storageType, int type,
160                    com.liferay.portal.service.ServiceContext serviceContext)
161                    throws com.liferay.portal.kernel.exception.PortalException {
162                    return getService()
163                                       .addStructure(userId, groupId, parentStructureKey,
164                            classNameId, structureKey, nameMap, descriptionMap, ddmForm,
165                            storageType, type, serviceContext);
166            }
167    
168            /**
169            * Adds a structure referencing the parent structure by its structure key.
170            * In case the parent structure is not found, it uses the default parent
171            * structure ID.
172            *
173            * @param userId the primary key of the structure's creator/owner
174            * @param groupId the primary key of the group
175            * @param parentStructureKey the unique string identifying the
176            structure
177            * @param classNameId the primary key of the class name for the
178            structure's related model
179            * @param structureKey unique string identifying the structure
180            (optionally <code>null</code>)
181            * @param nameMap the structure's locales and localized names
182            * @param descriptionMap the structure's locales and localized
183            descriptions
184            * @param xsd the XML schema definition of the structure
185            * @param storageType the storage type of the structure. It can be XML
186            or expando. For more information, see {@link
187            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
188            * @param type the structure's type. For more information, see {@link
189            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
190            * @param serviceContext the service context to be applied. Must have
191            the <code>ddmResource</code> attribute to check permissions.
192            Can set the UUID, creation date, modification date, guest
193            permissions, and group permissions for the structure.
194            * @return the structure
195            * @throws PortalException if a user with the primary key could not be
196            found, if the user did not have permission to add the
197            structure, if the XSD was not well-formed, or if a portal
198            exception occurred
199            * @deprecated As of 7.0.0, replaced by {@link #addStructure(long, long,
200            String, long, String, Map, Map, DDMForm, String, int,
201            ServiceContext)}
202            */
203            @Deprecated
204            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
205                    long userId, long groupId, java.lang.String parentStructureKey,
206                    long classNameId, java.lang.String structureKey,
207                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
208                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
209                    java.lang.String xsd, java.lang.String storageType, int type,
210                    com.liferay.portal.service.ServiceContext serviceContext)
211                    throws com.liferay.portal.kernel.exception.PortalException {
212                    return getService()
213                                       .addStructure(userId, groupId, parentStructureKey,
214                            classNameId, structureKey, nameMap, descriptionMap, xsd,
215                            storageType, type, serviceContext);
216            }
217    
218            /**
219            * Copies a structure, creating a new structure with all the values
220            * extracted from the original one. The new structure supports a new name
221            * and description.
222            *
223            * @param structureId the primary key of the structure to be copied
224            * @param nameMap the new structure's locales and localized names
225            * @param descriptionMap the new structure's locales and localized
226            descriptions
227            * @param serviceContext the service context to be applied. Can set the
228            UUID, creation date, modification date, guest permissions, and
229            group permissions for the structure.
230            * @return the new structure
231            * @throws PortalException if the user did not have permission to add the
232            structure or if a portal exception occurred
233            */
234            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
235                    long structureId,
236                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
237                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
238                    com.liferay.portal.service.ServiceContext serviceContext)
239                    throws com.liferay.portal.kernel.exception.PortalException {
240                    return getService()
241                                       .copyStructure(structureId, nameMap, descriptionMap,
242                            serviceContext);
243            }
244    
245            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
246                    long structureId,
247                    com.liferay.portal.service.ServiceContext serviceContext)
248                    throws com.liferay.portal.kernel.exception.PortalException {
249                    return getService().copyStructure(structureId, serviceContext);
250            }
251    
252            /**
253            * Deletes the structure and its resources.
254            *
255            * <p>
256            * Before deleting the structure, the system verifies whether the structure
257            * is required by another entity. If it is needed, an exception is thrown.
258            * </p>
259            *
260            * @param structureId the primary key of the structure to be deleted
261            * @throws PortalException if the user did not have permission to delete the
262            structure or if a portal exception occurred
263            */
264            public static void deleteStructure(long structureId)
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    getService().deleteStructure(structureId);
267            }
268    
269            /**
270            * Returns the structure matching the class name ID, structure key, and
271            * group.
272            *
273            * @param groupId the primary key of the group
274            * @param classNameId the primary key of the class name for the structure's
275            related model
276            * @param structureKey the unique string identifying the structure
277            * @return the matching structure, or <code>null</code> if a matching
278            structure could not be found
279            * @throws PortalException if the user did not have permission to view the
280            structure or if a portal exception occurred
281            */
282            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
283                    long groupId, long classNameId, java.lang.String structureKey)
284                    throws com.liferay.portal.kernel.exception.PortalException {
285                    return getService().fetchStructure(groupId, classNameId, structureKey);
286            }
287    
288            /**
289            * Returns the Spring bean ID for this bean.
290            *
291            * @return the Spring bean ID for this bean
292            */
293            public static java.lang.String getBeanIdentifier() {
294                    return getService().getBeanIdentifier();
295            }
296    
297            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getJournalFolderStructures(
298                    long[] groupIds, long journalFolderId, int restrictionType)
299                    throws com.liferay.portal.kernel.exception.PortalException {
300                    return getService()
301                                       .getJournalFolderStructures(groupIds, journalFolderId,
302                            restrictionType);
303            }
304    
305            /**
306            * Returns the structure matching the class name ID, structure key, and
307            * group.
308            *
309            * @param groupId the primary key of the structure's group
310            * @param classNameId the primary key of the class name for the structure's
311            related model
312            * @param structureKey the unique string identifying the structure
313            * @return the matching structure
314            * @throws PortalException if the user did not have permission to view the
315            structure or if a matching structure could not be found
316            */
317            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
318                    long groupId, long classNameId, java.lang.String structureKey)
319                    throws com.liferay.portal.kernel.exception.PortalException {
320                    return getService().getStructure(groupId, classNameId, structureKey);
321            }
322    
323            /**
324            * Returns the structure matching the class name ID, structure key, and
325            * group, optionally searching ancestor sites (that have sharing enabled)
326            * and global scoped sites.
327            *
328            * <p>
329            * This method first searches in the group. If the structure is still not
330            * found and <code>includeAncestorStructures</code> is set to
331            * <code>true</code>, this method searches the group's ancestor sites (that
332            * have sharing enabled) and lastly searches global scoped sites.
333            * </p>
334            *
335            * @param groupId the primary key of the structure's group
336            * @param classNameId the primary key of the class name for the structure's
337            related model
338            * @param structureKey the unique string identifying the structure
339            * @param includeAncestorStructures whether to include ancestor sites (that
340            have sharing enabled) and include global scoped sites in the
341            search
342            * @return the matching structure
343            * @throws PortalException if the user did not have permission to view the
344            structure or if a matching structure could not be found
345            */
346            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
347                    long groupId, long classNameId, java.lang.String structureKey,
348                    boolean includeAncestorStructures)
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    return getService()
351                                       .getStructure(groupId, classNameId, structureKey,
352                            includeAncestorStructures);
353            }
354    
355            /**
356            * Returns the structure with the ID.
357            *
358            * @param structureId the primary key of the structure
359            * @return the structure with the ID
360            * @throws PortalException if the user did not have permission to view the
361            structure or if a structure with the ID could not be found
362            */
363            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
364                    long structureId)
365                    throws com.liferay.portal.kernel.exception.PortalException {
366                    return getService().getStructure(structureId);
367            }
368    
369            /**
370            * Returns all the structures in the group that the user has permission to
371            * view.
372            *
373            * @param groupId the primary key of the group
374            * @return the structures in the group that the user has permission to view
375            */
376            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
377                    long groupId) {
378                    return getService().getStructures(groupId);
379            }
380    
381            /**
382            * Returns all the structures in the groups that the user has permission to
383            * view.
384            *
385            * @param groupIds the primary key of the groups
386            * @return the structures in the groups that the user has permission to view
387            */
388            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
389                    long[] groupIds) {
390                    return getService().getStructures(groupIds);
391            }
392    
393            /**
394            * Returns all the structures matching the groups and class name ID that the
395            * user has permission to view.
396            *
397            * @param groupIds the primary keys of the groups
398            * @param classNameId the primary key of the class name for the structure's
399            related model
400            * @return the structures matching the groups and class name ID that the
401            user has permission to view
402            */
403            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
404                    long[] groupIds, long classNameId) {
405                    return getService().getStructures(groupIds, classNameId);
406            }
407    
408            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> getStructures(
409                    long[] groupIds, long classNameId, int start, int end) {
410                    return getService().getStructures(groupIds, classNameId, start, end);
411            }
412    
413            /**
414            * Returns an ordered range of all the structures matching the groups and
415            * class name IDs, and matching the keywords in the structure names and
416            * descriptions.
417            *
418            * <p>
419            * Useful when paginating results. Returns a maximum of <code>end -
420            * start</code> instances. <code>start</code> and <code>end</code> are not
421            * primary keys, they are indexes in the result set. Thus, <code>0</code>
422            * refers to the first result in the set. Setting both <code>start</code>
423            * and <code>end</code> to {@link
424            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
425            * result set.
426            * </p>
427            *
428            * @param companyId the primary key of the structure's company
429            * @param groupIds the primary keys of the groups
430            * @param classNameIds the primary keys of the class names of the models
431            the structures are related to
432            * @param keywords the keywords (space separated), which may occur in the
433            structure's name or description (optionally <code>null</code>)
434            * @param start the lower bound of the range of structures to return
435            * @param end the upper bound of the range of structures to return (not
436            inclusive)
437            * @param orderByComparator the comparator to order the structures
438            (optionally <code>null</code>)
439            * @return the range of matching structures ordered by the comparator
440            */
441            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
442                    long companyId, long[] groupIds, long[] classNameIds,
443                    java.lang.String keywords, int start, int end,
444                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
445                    return getService()
446                                       .search(companyId, groupIds, classNameIds, keywords, start,
447                            end, orderByComparator);
448            }
449    
450            /**
451            * Returns an ordered range of all the structures matching the groups, class
452            * name IDs, name keyword, description keyword, storage type, and type.
453            *
454            * <p>
455            * Useful when paginating results. Returns a maximum of <code>end -
456            * start</code> instances. <code>start</code> and <code>end</code> are not
457            * primary keys, they are indexes in the result set. Thus, <code>0</code>
458            * refers to the first result in the set. Setting both <code>start</code>
459            * and <code>end</code> to {@link
460            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
461            * result set.
462            * </p>
463            *
464            * @param companyId the primary key of the structure's company
465            * @param groupIds the primary keys of the groups
466            * @param classNameIds the primary keys of the class names of the models
467            the structures are related to
468            * @param name the name keywords
469            * @param description the description keywords
470            * @param storageType the structure's storage type. It can be "xml" or
471            "expando". For more information, see {@link
472            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
473            * @param type the structure's type. For more information, see {@link
474            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
475            * @param andOperator whether every field must match its keywords, or just
476            one field
477            * @param start the lower bound of the range of structures to return
478            * @param end the upper bound of the range of structures to return (not
479            inclusive)
480            * @param orderByComparator the comparator to order the structures
481            (optionally <code>null</code>)
482            * @return the range of matching structures ordered by the comparator
483            */
484            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
485                    long companyId, long[] groupIds, long[] classNameIds,
486                    java.lang.String name, java.lang.String description,
487                    java.lang.String storageType, int type, boolean andOperator, int start,
488                    int end,
489                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> orderByComparator) {
490                    return getService()
491                                       .search(companyId, groupIds, classNameIds, name,
492                            description, storageType, type, andOperator, start, end,
493                            orderByComparator);
494            }
495    
496            /**
497            * Returns the number of structures matching the groups and class name IDs,
498            * and matching the keywords in the structure names and descriptions.
499            *
500            * @param companyId the primary key of the structure's company
501            * @param groupIds the primary keys of the groups
502            * @param classNameIds the primary keys of the class names of the models
503            the structures are related to
504            * @param keywords the keywords (space separated), which may occur in the
505            structure's name or description (optionally <code>null</code>)
506            * @return the number of matching structures
507            */
508            public static int searchCount(long companyId, long[] groupIds,
509                    long[] classNameIds, java.lang.String keywords) {
510                    return getService()
511                                       .searchCount(companyId, groupIds, classNameIds, keywords);
512            }
513    
514            /**
515            * Returns the number of structures matching the groups, class name IDs,
516            * name keyword, description keyword, storage type, and type
517            *
518            * @param companyId the primary key of the structure's company
519            * @param groupIds the primary keys of the groups
520            * @param classNameIds the primary keys of the class names of the models
521            the structure's are related to
522            * @param name the name keywords
523            * @param description the description keywords
524            * @param storageType the structure's storage type. It can be "xml" or
525            "expando". For more information, see {@link
526            com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
527            * @param type the structure's type. For more information, see {@link
528            com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
529            * @param andOperator whether every field must match its keywords, or just
530            one field
531            * @return the number of matching structures
532            */
533            public static int searchCount(long companyId, long[] groupIds,
534                    long[] classNameIds, java.lang.String name,
535                    java.lang.String description, java.lang.String storageType, int type,
536                    boolean andOperator) {
537                    return getService()
538                                       .searchCount(companyId, groupIds, classNameIds, name,
539                            description, storageType, type, andOperator);
540            }
541    
542            /**
543            * Sets the Spring bean ID for this bean.
544            *
545            * @param beanIdentifier the Spring bean ID for this bean
546            */
547            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
548                    getService().setBeanIdentifier(beanIdentifier);
549            }
550    
551            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
552                    long groupId, long parentStructureId, long classNameId,
553                    java.lang.String structureKey,
554                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
555                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
556                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
557                    com.liferay.portal.service.ServiceContext serviceContext)
558                    throws com.liferay.portal.kernel.exception.PortalException {
559                    return getService()
560                                       .updateStructure(groupId, parentStructureId, classNameId,
561                            structureKey, nameMap, descriptionMap, ddmForm, serviceContext);
562            }
563    
564            /**
565            * Updates the structure matching the class name ID, structure key, and
566            * group, replacing its old parent structure, name map, description map, and
567            * XSD with new ones.
568            *
569            * @param groupId the primary key of the group
570            * @param parentStructureId the primary key of the new parent structure
571            * @param classNameId the primary key of the class name for the
572            structure's related model
573            * @param structureKey the unique string identifying the structure
574            * @param nameMap the structure's new locales and localized names
575            * @param descriptionMap the structure's new locales and localized
576            description
577            * @param definition the structure's new XML schema definition
578            * @param serviceContext the service context to be applied. Can set the
579            modification date.
580            * @return the updated structure
581            * @throws PortalException if the user did not have permission to update
582            the structure or if a portal exception occurred
583            * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long, long,
584            long, String, Map, Map, DDMForm, ServiceContext)}
585            */
586            @Deprecated
587            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
588                    long groupId, long parentStructureId, long classNameId,
589                    java.lang.String structureKey,
590                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
591                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
592                    java.lang.String definition,
593                    com.liferay.portal.service.ServiceContext serviceContext)
594                    throws com.liferay.portal.kernel.exception.PortalException {
595                    return getService()
596                                       .updateStructure(groupId, parentStructureId, classNameId,
597                            structureKey, nameMap, descriptionMap, definition, serviceContext);
598            }
599    
600            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
601                    long structureId, long parentStructureId,
602                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
603                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
604                    com.liferay.portlet.dynamicdatamapping.model.DDMForm ddmForm,
605                    com.liferay.portal.service.ServiceContext serviceContext)
606                    throws com.liferay.portal.kernel.exception.PortalException {
607                    return getService()
608                                       .updateStructure(structureId, parentStructureId, nameMap,
609                            descriptionMap, ddmForm, serviceContext);
610            }
611    
612            /**
613            * Updates the structure matching the structure ID, replacing the old parent
614            * structure ID, name map, description map, and XSD with the new values.
615            *
616            * @param structureId the primary key of the structure
617            * @param parentStructureId the new parent structure primary key
618            * @param nameMap the structure's new locales and localized names
619            * @param descriptionMap the structure's new locales and localized
620            description
621            * @param definition the new XML schema definition of the structure
622            * @param serviceContext the service context to be applied. Can set the
623            modification date.
624            * @return the updated structure
625            * @throws PortalException if the user did not have permission to update
626            the structure or if a portal exception occurred
627            * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long, long,
628            Map, Map, DDMForm, ServiceContext)}
629            */
630            @Deprecated
631            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
632                    long structureId, long parentStructureId,
633                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
634                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
635                    java.lang.String definition,
636                    com.liferay.portal.service.ServiceContext serviceContext)
637                    throws com.liferay.portal.kernel.exception.PortalException {
638                    return getService()
639                                       .updateStructure(structureId, parentStructureId, nameMap,
640                            descriptionMap, definition, serviceContext);
641            }
642    
643            public static DDMStructureService getService() {
644                    if (_service == null) {
645                            _service = (DDMStructureService)PortalBeanLocatorUtil.locate(DDMStructureService.class.getName());
646    
647                            ReferenceRegistry.registerReference(DDMStructureServiceUtil.class,
648                                    "_service");
649                    }
650    
651                    return _service;
652            }
653    
654            /**
655             * @deprecated As of 6.2.0
656             */
657            @Deprecated
658            public void setService(DDMStructureService service) {
659            }
660    
661            private static DDMStructureService _service;
662    }