Class PentahoPlatformExporter
- java.lang.Object
-
- org.pentaho.platform.plugin.services.importexport.BaseExportProcessor
-
- org.pentaho.platform.plugin.services.importexport.ZipExportProcessor
-
- org.pentaho.platform.plugin.services.exporter.PentahoPlatformExporter
-
public class PentahoPlatformExporter extends ZipExportProcessor
-
-
Field Summary
Fields Modifier and Type Field Description static String
ANALYSIS_PATH_IN_ZIP
static String
CONNECTIONS_PATH_IN_ZIP
static String
DATA_SOURCES_PATH_IN_ZIP
static String
METADATA_PATH_IN_ZIP
static String
METASTORE
static String
METASTORE_BACKUP_EXT
static String
ROOT
protected ZipOutputStream
zos
-
Fields inherited from class org.pentaho.platform.plugin.services.importexport.ZipExportProcessor
exportManifest, localeExportList, path, withManifest
-
Fields inherited from class org.pentaho.platform.plugin.services.importexport.BaseExportProcessor
EXPORT_INFO_DATE_FORMAT, EXPORT_INFO_TIME_FORMAT, EXPORT_MANIFEST_FILENAME, EXPORT_TEMP_FILENAME_EXT, EXPORT_TEMP_FILENAME_PREFIX, LOCALE_EXT
-
-
Constructor Summary
Constructors Constructor Description PentahoPlatformExporter(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
exportDatasources()
protected void
exportFileContent(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile)
protected void
exportMetadataModels()
protected void
exportMetastore()
protected void
exportMondrianSchemas()
protected void
exportSchedules()
protected void
exportUsersAndRoles()
org.pentaho.platform.api.repository.datasource.IDatasourceMgmtService
getDatasourceMgmtService()
protected Map<String,InputStream>
getDomainFilesData(String domainId)
org.pentaho.metadata.repository.IMetadataDomainRepository
getMetadataDomainRepository()
MondrianCatalogRepositoryHelper
getMondrianCatalogRepositoryHelper()
IMondrianCatalogService
getMondrianCatalogService()
protected org.pentaho.metastore.api.IMetaStore
getRepoMetaStore()
org.pentaho.platform.api.scheduler2.IScheduler
getScheduler()
org.pentaho.platform.api.usersettings.IUserSettingService
getUserSettingService()
protected boolean
isExportCandidate(String path)
protected boolean
parseXmlaEnabled(String dataSourceInfo)
File
performExport()
File
performExport(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile)
Performs the export process, returns a zip File objectvoid
setDatasourceMgmtService(org.pentaho.platform.api.repository.datasource.IDatasourceMgmtService datasourceMgmtService)
void
setMetadataDomainRepository(org.pentaho.metadata.repository.IMetadataDomainRepository metadataDomainRepository)
void
setMondrianCatalogRepositoryHelper(MondrianCatalogRepositoryHelper mondrianCatalogRepositoryHelper)
void
setMondrianCatalogService(IMondrianCatalogService mondrianCatalogService)
protected void
setRepoMetaStore(org.pentaho.metastore.api.IMetaStore metastore)
void
setScheduler(org.pentaho.platform.api.scheduler2.IScheduler scheduler)
void
setUserSettingService(org.pentaho.platform.api.usersettings.IUserSettingService userSettingService)
protected void
zipFolder(File file, ZipOutputStream zos, String pathPrefixToRemove)
-
Methods inherited from class org.pentaho.platform.plugin.services.importexport.ZipExportProcessor
addToManifest, createLocales, exportDirectory, exportFile, getExportManifest, getFixedZipEntryName, getLocaleExportList, getSession, getZipEntryName, setExportManifest, setLocaleExportList
-
Methods inherited from class org.pentaho.platform.plugin.services.importexport.BaseExportProcessor
addExportHandler, getPath, getUnifiedRepository, setPath, setUnifiedRepository
-
-
-
-
Field Detail
-
ROOT
public static final String ROOT
- See Also:
- Constant Field Values
-
DATA_SOURCES_PATH_IN_ZIP
public static final String DATA_SOURCES_PATH_IN_ZIP
- See Also:
- Constant Field Values
-
METADATA_PATH_IN_ZIP
public static final String METADATA_PATH_IN_ZIP
- See Also:
- Constant Field Values
-
ANALYSIS_PATH_IN_ZIP
public static final String ANALYSIS_PATH_IN_ZIP
- See Also:
- Constant Field Values
-
CONNECTIONS_PATH_IN_ZIP
public static final String CONNECTIONS_PATH_IN_ZIP
- See Also:
- Constant Field Values
-
METASTORE
public static final String METASTORE
- See Also:
- Constant Field Values
-
METASTORE_BACKUP_EXT
public static final String METASTORE_BACKUP_EXT
- See Also:
- Constant Field Values
-
zos
protected ZipOutputStream zos
-
-
Method Detail
-
performExport
public File performExport() throws ExportException, IOException
- Throws:
ExportException
IOException
-
performExport
public File performExport(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile) throws ExportException, IOException
Performs the export process, returns a zip File object- Overrides:
performExport
in classZipExportProcessor
- Throws:
ExportException
- indicates an error in import processingIOException
-
exportDatasources
protected void exportDatasources()
-
exportMetadataModels
protected void exportMetadataModels()
-
exportMondrianSchemas
protected void exportMondrianSchemas()
-
parseXmlaEnabled
protected boolean parseXmlaEnabled(String dataSourceInfo)
-
exportSchedules
protected void exportSchedules()
-
exportUsersAndRoles
protected void exportUsersAndRoles()
-
exportMetastore
protected void exportMetastore() throws IOException
- Throws:
IOException
-
getRepoMetaStore
protected org.pentaho.metastore.api.IMetaStore getRepoMetaStore()
-
setRepoMetaStore
protected void setRepoMetaStore(org.pentaho.metastore.api.IMetaStore metastore)
-
zipFolder
protected void zipFolder(File file, ZipOutputStream zos, String pathPrefixToRemove)
-
exportFileContent
protected void exportFileContent(org.pentaho.platform.api.repository2.unified.RepositoryFile exportRepositoryFile) throws IOException, ExportException
- Throws:
IOException
ExportException
-
getDomainFilesData
protected Map<String,InputStream> getDomainFilesData(String domainId)
-
getScheduler
public org.pentaho.platform.api.scheduler2.IScheduler getScheduler()
-
setScheduler
public void setScheduler(org.pentaho.platform.api.scheduler2.IScheduler scheduler)
-
getMetadataDomainRepository
public org.pentaho.metadata.repository.IMetadataDomainRepository getMetadataDomainRepository()
-
setMetadataDomainRepository
public void setMetadataDomainRepository(org.pentaho.metadata.repository.IMetadataDomainRepository metadataDomainRepository)
-
getDatasourceMgmtService
public org.pentaho.platform.api.repository.datasource.IDatasourceMgmtService getDatasourceMgmtService()
-
setDatasourceMgmtService
public void setDatasourceMgmtService(org.pentaho.platform.api.repository.datasource.IDatasourceMgmtService datasourceMgmtService)
-
getMondrianCatalogRepositoryHelper
public MondrianCatalogRepositoryHelper getMondrianCatalogRepositoryHelper()
-
setMondrianCatalogRepositoryHelper
public void setMondrianCatalogRepositoryHelper(MondrianCatalogRepositoryHelper mondrianCatalogRepositoryHelper)
-
getMondrianCatalogService
public IMondrianCatalogService getMondrianCatalogService()
-
setMondrianCatalogService
public void setMondrianCatalogService(IMondrianCatalogService mondrianCatalogService)
-
getUserSettingService
public org.pentaho.platform.api.usersettings.IUserSettingService getUserSettingService()
-
setUserSettingService
public void setUserSettingService(org.pentaho.platform.api.usersettings.IUserSettingService userSettingService)
-
isExportCandidate
protected boolean isExportCandidate(String path)
- Overrides:
isExportCandidate
in classZipExportProcessor
-
-