The Import Framework defines a set of interfaces and handlers that allow importing content into the BI-SERVER JCR repository from the file system based on mime types. Content can be imported individually (one file at the time) or in a bulk (zip archive). The import framework is located at the "pentaho-platform-extensions" project in the "org.pentaho.platform.plugin.services.importer" package
The import framework components are registered in the "importExport.xml" located at the "bi-server/pentaho-solutions/system" folder in the BI-SERVER.
Required changes to the "importExport.xml" during development should be propagated into both community and ee platform version projects:
pentaho-platform-assembly (https://github.com/pentaho/pentaho-platform/tree/master/assembly)
bi-platform-ee-assembly (https://github.com/pentaho/pentaho-platform-ee/tree/master/bi-platform-ee-assembly)
To create a new import handler for an specific file type the IPlatformImportHandler interface must be implemented and the new handler must be registered with its related mime type in the "importExport.xml" as an argument entry in the PentahoPlatformImporter definition.
Import framework interfaces.
The import framework is composed of the following interfaces:
IPlatformImportHandler
Implementations handle importing content into the repository.
IPlatformImporter
Implementations resolve and consume import handlers based on registered mime types.
IPlatformImportBundle
A struct-like object for bundling related objects together for import into the platform. Bundles contain all information necessary for import into the repository.
IPlatformImportMimeResolver
Implementations of this class compute mime-types based on the given IPlatformImportBundle.
Import framework handlers and components.
The concrete implementations of the import framework interfaces are:
NameBaseMimeResolver
Resolves mime-types by extension
PentahoPlatformImporter
Default implementation of IPlatformImporter. This class serves to route import requests to the appropriate IPlatformImportHandler based on the mime-type of the given content. If not supplied the mime-type will be computed by the IPlatformImportMimeResolver. The PentahoPlatformImporter definition in the "importExport.xml" defines the registration of the SolutionImportHandler, MetadataImportHandler, MondrianImportHandler and LocaleImportHandler.
RepositoryFileImportFileHandler
Default import handler. If no specific import handler is found for a given mime-type then this handler performs the import of the given content.
SolutionImportHandler (mime type: application/vnd.pentaho.solution-repository)
Solution specific import handler. This handler performs the import of the solution repository provided as a zip archive. The SolutionImportHandler definition in the "importExport.xml" contains two parameters, "whiteList" which is used to define what types are allowed to be imported and "blackList" which is used to define what types are hidden.
MetadataImportHandler (mime type: text/xmi+xml)
Import handler for xmi metadata files.
MondrianImportHandler (mime type: application/vnd.pentaho.mondrian+xml)
Import handler for mondiran.xml files.
LocaleImportHandler (mime type: text/locale)
Import handler for locale property files.