PentahoPlatformExporter extends ZipExportProcessor { protected boolean parseXmlaEnabled( String dataSourceInfo ) { String key = "EnableXmla="; int pos = dataSourceInfo.indexOf( key ); if ( pos == -1 ) { return false; } int end = dataSourceInfo.indexOf( ";", pos ) > -1 ? dataSourceInfo.indexOf( ";", pos ) : dataSourceInfo.length(); String xmlaEnabled = dataSourceInfo.substring( pos + key.length(), end ); return xmlaEnabled == null ? false : Boolean.parseBoolean( xmlaEnabled.replace( "\"", "" ) ); } 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 testParseXmlaEnabled() throws Exception { String dsInfo = "DataSource=SampleData;Provider=mondrian;EnableXmla=\"false\""; assertFalse( exporterSpy.parseXmlaEnabled( dsInfo ) ); dsInfo = "DataSource=SampleData;Provider=mondrian;EnableXmla=\"true\""; assertTrue( exporterSpy.parseXmlaEnabled( dsInfo ) ); dsInfo = "DataSource=SampleData;Provider=mondrian"; assertFalse( exporterSpy.parseXmlaEnabled( dsInfo ) ); dsInfo = "DataSource=SampleData;EnableXmla=\"true\";Provider=mondrian"; assertTrue( exporterSpy.parseXmlaEnabled( dsInfo ) ); }