protected Map<String, CsvFile> getCsvFiles() {
		if (csvFiles == null) {
			String fileName = null;
			csvFiles = Maps.newHashMap();

			Set<String> keys = configuration.keySet();
			String prefix = "dataSource." + getName() + ".";
			for (String key : keys) {
				if (key.startsWith(prefix)) {
					String dataKey = key.substring(key.indexOf(prefix) + prefix.length());
					fileName = configuration.get(key);
					if (StringUtils.isEmpty(fileName)) {
						// no CSV file configured
						continue;
					}
					log.debug("Loading file " + fileName + " for dataKey=" + dataKey);
					CsvFile csvFile = new CsvFile(fileName);
					csvFiles.put(dataKey, csvFile);
				}
			}
			if (csvFiles.isEmpty()) {
				log.warn("CsvDataSource can only be used when CSV files are correctly configured");
			}
		}
		return csvFiles;
	}
protected Map < String , CsvFile > getCsvFiles ( ) { if ( csvFiles == null ) { String fileName = null ; csvFiles = Maps . newHashMap ( ) ; Set < String > keys = configuration . keySet ( ) ; String prefix = "dataSource." + getName ( ) + "." ; for ( String key : keys ) { if ( key . startsWith ( prefix ) ) { String dataKey = key . substring ( key . indexOf ( prefix ) + prefix . length ( ) ) ; fileName = configuration . get ( key ) ; if ( StringUtils . isEmpty ( fileName ) ) { continue ; } log . debug ( "Loading file " + fileName + " for dataKey=" + dataKey ) ; CsvFile csvFile = new CsvFile ( fileName ) ; csvFiles . put ( dataKey , csvFile ) ; } } if ( csvFiles . isEmpty ( ) ) { log . warn ( "CsvDataSource can only be used when CSV files are correctly configured" ) ; } } return csvFiles ; }
CSV files are not loaded here, this is done on-access (lazy loading).