/**
   * Updates the structure matching the structure ID, replacing the old parent structure ID, name
   * map, description map, and XSD with the new values.
   *
   * @param structureId the primary key of the structure
   * @param parentStructureId the new parent structure primary key
   * @param nameMap the structure's new locales and localized names
   * @param descriptionMap the structure's new locales and localized description
   * @param definition the new XML schema definition of the structure
   * @param serviceContext the service context to be applied. Can set the modification date.
   * @return the updated structure
   * @throws PortalException if the user did not have permission to update the structure or if a
   *     portal exception occurred
   * @deprecated As of 7.0.0, replaced by {@link #updateStructure(long, long, Map, Map, DDMForm,
   *     DDMFormLayout, ServiceContext)}
   */
  @Deprecated
  public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
      long structureId,
      long parentStructureId,
      java.lang.String[] nameMapLanguageIds,
      java.lang.String[] nameMapValues,
      java.lang.String[] descriptionMapLanguageIds,
      java.lang.String[] descriptionMapValues,
      java.lang.String definition,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      Map<Locale, String> nameMap =
          LocalizationUtil.getLocalizationMap(nameMapLanguageIds, nameMapValues);
      Map<Locale, String> descriptionMap =
          LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, descriptionMapValues);

      com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
          DDMStructureServiceUtil.updateStructure(
              structureId, parentStructureId, nameMap, descriptionMap, definition, serviceContext);

      return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  /**
   * Adds a structure referencing a default parent structure, using the portal property <code>
   * dynamic.data.lists.storage.type</code> storage type and default structure type.
   *
   * @param userId the primary key of the structure's creator/owner
   * @param groupId the primary key of the group
   * @param classNameId the primary key of the class name for the structure's related model
   * @param nameMap the structure's locales and localized names
   * @param descriptionMap the structure's locales and localized descriptions
   * @param xsd the structure's XML schema definition
   * @param serviceContext the structure's service context. Can set the UUID, creation date,
   *     modification date, guest permissions, and group permissions for the structure.
   * @return the structure
   * @throws PortalException if a user with the primary key could not be found, if the user did not
   *     have permission to add the structure, if the XSD was not well-formed, or if a portal
   *     exception occurred
   * @throws SystemException if a system exception occurred
   */
  public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
      long userId,
      long groupId,
      long classNameId,
      java.lang.String[] nameMapLanguageIds,
      java.lang.String[] nameMapValues,
      java.lang.String[] descriptionMapLanguageIds,
      java.lang.String[] descriptionMapValues,
      java.lang.String xsd,
      com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      Map<Locale, String> nameMap =
          LocalizationUtil.getLocalizationMap(nameMapLanguageIds, nameMapValues);
      Map<Locale, String> descriptionMap =
          LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, descriptionMapValues);

      com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
          DDMStructureServiceUtil.addStructure(
              userId, groupId, classNameId, nameMap, descriptionMap, xsd, serviceContext);

      return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  /**
   * Returns the structure matching the class name ID, structure key, and group.
   *
   * @param groupId the primary key of the structure's group
   * @param classNameId the primary key of the class name for the structure's related model
   * @param structureKey the unique string identifying the structure
   * @return the matching structure
   * @throws PortalException if the user did not have permission to view the structure or if a
   *     matching structure could not be found
   */
  public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
      long groupId, long classNameId, java.lang.String structureKey) throws RemoteException {
    try {
      com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
          DDMStructureServiceUtil.getStructure(groupId, classNameId, structureKey);

      return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }
  public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap copyStructure(
      long structureId, com.liferay.portal.service.ServiceContext serviceContext)
      throws RemoteException {
    try {
      com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
          DDMStructureServiceUtil.copyStructure(structureId, serviceContext);

      return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
    } catch (Exception e) {
      _log.error(e, e);

      throw new RemoteException(e.getMessage());
    }
  }