Interface Integration


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

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.io.InputStream exportToStream​(IContext context, java.lang.String exportMappingName, IMendixObject objectToExport, boolean shouldValidate)
      Export domain model objects to an XML or JSON stream.
      java.io.InputStream exportToStream​(IContext context, java.lang.String exportMappingName, java.util.List<IMendixObject> objectsToExport, boolean shouldValidate)
      Export domain model objects to an XML or JSON stream.
      default java.util.List<IMendixObject> importStream​(IContext context, java.io.InputStream stream, java.lang.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.
      java.util.List<IMendixObject> importStream​(IContext context, java.io.InputStream stream, java.lang.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.
      default java.util.List<IMendixObject> importStream​(IContext context, java.io.InputStream stream, java.lang.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.
      default java.util.List<IMendixObject> importStream​(IContext context, java.io.InputStream stream, java.lang.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.
    • Method Detail

      • importStream

        java.util.List<IMendixObject> importStream​(IContext context,
                                                   java.io.InputStream stream,
                                                   java.lang.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 java.util.List<IMendixObject> importStream​(IContext context,
                                                           java.io.InputStream stream,
                                                           java.lang.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 java.util.List<IMendixObject> importStream​(IContext context,
                                                           java.io.InputStream stream,
                                                           java.lang.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 java.util.List<IMendixObject> importStream​(IContext context,
                                                           java.io.InputStream stream,
                                                           java.lang.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

        java.io.InputStream exportToStream​(IContext context,
                                           java.lang.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)
      • exportToStream

        java.io.InputStream exportToStream​(IContext context,
                                           java.lang.String exportMappingName,
                                           java.util.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)