private Map < String , String > getRuleParameters ( ) throws CliExecutionException { Map < String , String > ruleParameters ; if ( ruleParametersFile == null ) { ruleParameters = Collections . emptyMap ( ) ; } else { Properties properties = new Properties ( ) ; try { properties . load ( new FileInputStream ( ruleParametersFile ) ) ; } catch ( IOException e ) { throw new CliExecutionException ( "Cannot read rule parameters file '" + ruleParametersFile . getPath ( ) + "'." ) ; } ruleParameters = new TreeMap <> ( ) ; for ( String name : properties . stringPropertyNames ( ) ) { ruleParameters . put ( name , properties . getProperty ( name ) ) ; } } return ruleParameters ; }
Reads the given rule parameters file .