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