PentahoPlatformExporter extends ZipExportProcessor { @Override protected boolean isExportCandidate( String path ) { if ( path == null ) { return false; } String etc = ClientRepositoryPaths.getEtcFolderPath(); if ( path.startsWith( etc ) ) { String etc_operations_mart = etc + RepositoryFile.SEPARATOR + "operations_mart"; if ( path.equals( etc ) ) { return true; } else if ( path.startsWith( etc_operations_mart ) ) { return true; } else { return false; } } return true; } PentahoPlatformExporter( IUnifiedRepository repository ); File performExport(); @Override File performExport( RepositoryFile exportRepositoryFile ); IScheduler getScheduler(); void setScheduler( IScheduler scheduler ); IMetadataDomainRepository getMetadataDomainRepository(); void setMetadataDomainRepository( IMetadataDomainRepository metadataDomainRepository ); IDatasourceMgmtService getDatasourceMgmtService(); void setDatasourceMgmtService( IDatasourceMgmtService datasourceMgmtService ); MondrianCatalogRepositoryHelper getMondrianCatalogRepositoryHelper(); void setMondrianCatalogRepositoryHelper(
    MondrianCatalogRepositoryHelper mondrianCatalogRepositoryHelper ); IMondrianCatalogService getMondrianCatalogService(); void setMondrianCatalogService(
    IMondrianCatalogService mondrianCatalogService ); IUserSettingService getUserSettingService(); void setUserSettingService( IUserSettingService userSettingService ); static final String ROOT; static final String DATA_SOURCES_PATH_IN_ZIP; static final String METADATA_PATH_IN_ZIP; static final String ANALYSIS_PATH_IN_ZIP; static final String CONNECTIONS_PATH_IN_ZIP; static final String METASTORE; static final String METASTORE_BACKUP_EXT; }
@Test public void testIsExportCandidate() throws Exception { assertTrue( exporter.isExportCandidate( "/etc" ) ); assertTrue( exporter.isExportCandidate( "/etc/operations_mart" ) ); assertTrue( exporter.isExportCandidate( "/etc/operations_mart/someSubFolder" ) ); assertTrue( exporter.isExportCandidate( "/public" ) ); assertTrue( exporter.isExportCandidate( "/home" ) ); assertFalse( exporter.isExportCandidate( "/etc/someRandomFolder" ) ); assertFalse( exporter.isExportCandidate( "/etc/someRandomFolder/someSubFOlder" ) ); assertFalse( exporter.isExportCandidate( "/etc/mondrian" ) ); assertFalse( exporter.isExportCandidate( "/etc/metadata" ) ); assertFalse( exporter.isExportCandidate( "/etc/metastore" ) ); assertFalse( exporter.isExportCandidate( "/etc/olap-servers" ) ); assertFalse( exporter.isExportCandidate( "/etc/models" ) ); assertFalse( exporter.isExportCandidate( "/etc/pdi" ) ); }