Interface Integration


public interface Integration
Provides an interface to the integration component of the runtime server.
  • Method Details

    • importStream

      List<IMendixObject> importStream(IContext context, InputStream stream, String importMappingName, ActionWhenNoObjectFound actionWhenNoObjectFound, IMendixObject mappingParameter, int limit, ShouldCommit shouldCommit, boolean shouldValidate)
      Import an XML or JSON stream, map this stream to domain model objects and (optionally) store those objects in the Mendix database. When import mapping is using message definitions we only allow arrays.
      Parameters:
      context - the context
      stream - the XML or JSON stream to map and store
      importMappingName - name of the mapping document, containing the mapping of the XML or JSON to domain model objects
      actionWhenNoObjectFound - indicates what should happen when no object was found
      mappingParameter - parameter object used during the mapping (optional)
      limit - the maximum number of results to be returned. This is unlimited when set to -1
      shouldCommit - indicates whether created or changed objects should be committed (stored in the database)
      shouldValidate - whether the XML should be validated (not supported for JSON)
      Returns:
      the imported objects
    • importStream

      default List<IMendixObject> importStream(IContext context, InputStream stream, String importMappingName, ActionWhenNoObjectFound actionWhenNoObjectFound, IMendixObject mappingParameter, int limit, boolean shouldValidate)
      Import an XML or JSON stream, map this stream to domain model objects and store those objects in the Mendix database. When import mapping is using message definitions we only allow arrays.
      Parameters:
      context - the context
      stream - the XML or JSON stream to map and store
      importMappingName - name of the mapping document, containing the mapping of the XML or JSON to domain model objects
      actionWhenNoObjectFound - indicates what should happen when no object was found
      mappingParameter - parameter object used during the mapping (optional)
      limit - the maximum number of results to be returned. This is unlimited when set to -1
      shouldValidate - whether the XML should be validated (not supported for JSON)
      Returns:
      the imported objects
    • importStream

      default List<IMendixObject> importStream(IContext context, InputStream stream, String importMappingName, IMendixObject mappingParameter, boolean shouldValidate)
      Import an XML or JSON stream, map this stream to domain model objects and store those objects in the Mendix database. This overload returns all results, and uses the value for "If no object was found" that is specified in the import mapping. When import mapping is using message definitions we only allow arrays.
      Parameters:
      context - the context
      stream - the XML or JSON stream to map and store
      importMappingName - name of the mapping document, containing the mapping of the XML or JSON to domain model objects
      mappingParameter - parameter object used during the mapping (optional)
      shouldValidate - whether the XML should be validated (not supported for JSON)
      Returns:
      the imported objects
    • importStream

      default List<IMendixObject> importStream(IContext context, InputStream stream, String importMappingName, IMendixObject mappingParameter, int limit, boolean shouldValidate)
      Import an XML or JSON stream, map this stream to domain model objects and store those objects in the Mendix database. This overload uses the value for "If no object was found" that is specified in the import mapping. When import mapping is using message definitions we only allow arrays.
      Parameters:
      context - the context
      stream - the XML or JSON stream to map and store
      importMappingName - name of the mapping document, containing the mapping of the XML or JSON to domain model objects
      mappingParameter - parameter object used during the mapping (optional)
      limit - the maximum number of results to be returned. This is unlimited when set to -1
      shouldValidate - whether the XML should be validated (not supported for JSON)
      Returns:
      the imported objects
    • exportToStream

      InputStream exportToStream(IContext context, String exportMappingName, IMendixObject objectToExport, boolean shouldValidate)
      Export domain model objects to an XML or JSON stream.
      Parameters:
      context - the context
      exportMappingName - name of the mapping document, containing the mapping of the domain model objects to XML or JSON
      objectToExport - Domain model object to export to JSON or XML using the specified export mapping
      shouldValidate - whether the XML should be validated (not supported for JSON)
      Returns:
      the XML or JSON stream
    • exportToStream

      InputStream exportToStream(IContext context, String exportMappingName, List<IMendixObject> objectsToExport, boolean shouldValidate)
      Export domain model objects to an XML or JSON stream.
      Parameters:
      context - the context
      exportMappingName - name of the mapping document, containing the mapping of the domain model objects to XML or JSON
      objectsToExport - Domain model objects to export to JSON or XML using the specified export mapping
      shouldValidate - whether the XML should be validated (not supported for JSON)
      Returns:
      the XML or JSON stream