Package com.mendix.integration
Interface Integration
public interface Integration
Provides an interface to the integration component of the runtime server.
-
Method Summary
Modifier and TypeMethodDescriptionexportToStream
(IContext context, String exportMappingName, IMendixObject objectToExport, boolean shouldValidate) Export domain model objects to an XML or JSON stream.exportToStream
(IContext context, String exportMappingName, List<IMendixObject> objectsToExport, boolean shouldValidate) Export domain model objects to an XML or JSON stream.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.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.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.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.
-
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 contextstream
- the XML or JSON stream to map and storeimportMappingName
- name of the mapping document, containing the mapping of the XML or JSON to domain model objectsactionWhenNoObjectFound
- indicates what should happen when no object was foundmappingParameter
- parameter object used during the mapping (optional)limit
- the maximum number of results to be returned. This is unlimited when set to -1shouldCommit
- 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 contextstream
- the XML or JSON stream to map and storeimportMappingName
- name of the mapping document, containing the mapping of the XML or JSON to domain model objectsactionWhenNoObjectFound
- indicates what should happen when no object was foundmappingParameter
- parameter object used during the mapping (optional)limit
- the maximum number of results to be returned. This is unlimited when set to -1shouldValidate
- 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 contextstream
- the XML or JSON stream to map and storeimportMappingName
- name of the mapping document, containing the mapping of the XML or JSON to domain model objectsmappingParameter
- 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 contextstream
- the XML or JSON stream to map and storeimportMappingName
- name of the mapping document, containing the mapping of the XML or JSON to domain model objectsmappingParameter
- parameter object used during the mapping (optional)limit
- the maximum number of results to be returned. This is unlimited when set to -1shouldValidate
- 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 contextexportMappingName
- name of the mapping document, containing the mapping of the domain model objects to XML or JSONobjectToExport
- Domain model object to export to JSON or XML using the specified export mappingshouldValidate
- whether the XML should be validated (not supported for JSON)
-
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 contextexportMappingName
- name of the mapping document, containing the mapping of the domain model objects to XML or JSONobjectsToExport
- Domain model objects to export to JSON or XML using the specified export mappingshouldValidate
- whether the XML should be validated (not supported for JSON)
-