Class PentahoPlatformImporter
- java.lang.Object
-
- org.pentaho.platform.plugin.services.importer.PentahoPlatformImporter
-
- All Implemented Interfaces:
IPlatformImporter
public class PentahoPlatformImporter extends Object implements IPlatformImporter
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 IPlatformMimeResolver. User: nbaker Date: 5/29/12
-
-
Constructor Summary
Constructors Constructor Description PentahoPlatformImporter(List<IPlatformImportHandler> handlerList, org.pentaho.platform.api.repository2.unified.IRepositoryContentConverterHandler repositoryContentConverterHandler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHandler(String mimeType, IPlatformImportHandler handler)
To be consumed mainly by platform plugins who want to treat importing artifacts different.void
addHandler(IPlatformImportHandler platformImportHandler)
Add a new IPlatformImportHandler to process the MimeTypes given by that import handler.static String
checkAndSanitize(String in)
Performs one-way conversion on incoming String to produce a syntactically valid JCR path (section 4.6 Path Syntax).static String
computeBundlePath(String bundlePath)
IPlatformImportHandler
getDefaultHandler()
Map<String,IPlatformImportHandler>
getHandlers()
Returns the platform importer's map of registered handlersIRepositoryImportLogger
getRepositoryImportLogger()
void
importFile(org.pentaho.platform.api.repository2.unified.IPlatformImportBundle file)
this is the main method that uses the mime time (from Spring) to determine which handler to invoke.void
setDefaultHandler(IPlatformImportHandler defaultHandler)
void
setRepositoryImportLogger(IRepositoryImportLogger repositoryImportLogger)
-
-
-
Constructor Detail
-
PentahoPlatformImporter
public PentahoPlatformImporter(List<IPlatformImportHandler> handlerList, org.pentaho.platform.api.repository2.unified.IRepositoryContentConverterHandler repositoryContentConverterHandler)
-
-
Method Detail
-
getDefaultHandler
public IPlatformImportHandler getDefaultHandler()
-
setDefaultHandler
public void setDefaultHandler(IPlatformImportHandler defaultHandler)
-
addHandler
public void addHandler(String mimeType, IPlatformImportHandler handler)
To be consumed mainly by platform plugins who want to treat importing artifacts different.
-
addHandler
public void addHandler(IPlatformImportHandler platformImportHandler)
Description copied from interface:IPlatformImporter
Add a new IPlatformImportHandler to process the MimeTypes given by that import handler. An Import Handler registers what MimeTypes it processes via the getMimeTypes() method. This IPlatformImporter then adds the MimeTypes to its master list, and, adds the extensions handled by the mimetypes to the IPlatformImportResolver managed by this class.- Specified by:
addHandler
in interfaceIPlatformImporter
-
importFile
public void importFile(org.pentaho.platform.api.repository2.unified.IPlatformImportBundle file) throws PlatformImportException
this is the main method that uses the mime time (from Spring) to determine which handler to invoke.- Specified by:
importFile
in interfaceIPlatformImporter
- Throws:
PlatformImportException
-
checkAndSanitize
public static String checkAndSanitize(String in)
Performs one-way conversion on incoming String to produce a syntactically valid JCR path (section 4.6 Path Syntax).
-
getRepositoryImportLogger
public IRepositoryImportLogger getRepositoryImportLogger()
- Specified by:
getRepositoryImportLogger
in interfaceIPlatformImporter
-
setRepositoryImportLogger
public void setRepositoryImportLogger(IRepositoryImportLogger repositoryImportLogger)
-
getHandlers
public Map<String,IPlatformImportHandler> getHandlers()
Description copied from interface:IPlatformImporter
Returns the platform importer's map of registered handlers- Specified by:
getHandlers
in interfaceIPlatformImporter
-
-