/* Deploying CSV configuration */ public void processDeployStreamConfig(DeploymentFileData deploymentFileData) throws DeploymentException { CSVFileInfo csvFileInfo = DeploymentHelper.getCSVFileInfo( deploymentFileData.getFile(), configurationContext.getAxisConfiguration()); CarbonEventSimulator eventSimulator = EventSimulatorValueHolder.getEventSimulator(); eventSimulator.addCSVFileInfo(csvFileInfo); }
/* Deploying datasource configuration */ public void processDeployDatasourceConfig(DeploymentFileData deploymentFileData) throws DeploymentException { File xmlFile = deploymentFileData.getFile(); DataSourceTableAndStreamInfo dataSourceTableAndStreamInfo = DeploymentHelper.getEventMappingConfiguration(xmlFile); dataSourceTableAndStreamInfo.setFileName(xmlFile.getName()); dataSourceTableAndStreamInfo.setFilePath(xmlFile.getAbsolutePath()); dataSourceTableAndStreamInfo.setStatus(DataSourceTableAndStreamInfo.Status.STOPPED); CarbonEventSimulator eventSimulator = EventSimulatorValueHolder.getEventSimulator(); if (dataSourceTableAndStreamInfo != null) { eventSimulator.addDataSourceTableAndStreamInfo(dataSourceTableAndStreamInfo); } }