code: List<MonitoringHandlerRun> extractRuleSections( File file, String fileContent, Properties params ) {
  
  		// Find rules sections
  		StringBuilder sb = new StringBuilder();
  		List<String> sections = new ArrayList<String>();
  		for( String s : Arrays.asList( fileContent.trim().split( "\n" ))) {
  			s = s.trim();
  			if( s.length() == 0
  					|| s.startsWith( COMMENT_DELIMITER ))
  				continue;
  
  			if( s.toLowerCase().startsWith( RULE_BEGINNING )) {
  				addSectionIfNotEmpty(sections, sb.toString());
  				sb.setLength( 0 );
  			}
  
  			sb.append( Utils.expandTemplate(s, params) + "\n" );
  		}
  
  		addSectionIfNotEmpty(sections, sb.toString());
  
  		// Now, prepare handler invocations
  		List<MonitoringHandlerRun> result = new ArrayList<MonitoringHandlerRun> ();
  		for( String s : sections ) {
  
  			Matcher m = this.eventPattern.matcher( s );
  			if( ! m.find())
  				continue;
  
  			s = s.substring( m.end()).trim();
  			MonitoringHandlerRun bean = new MonitoringHandlerRun();
  			bean.handlerName = m.group( 1 );
  			bean.eventId = m.group( 2 );
  			bean.rawRulesText = s;
  
  			result.add( bean );
  		}
  
  		return result;
  	}
docs: Reads the file content, extracts rules sections and prepares the handler invocations.
  @param file
  @param fileContent
  @param params
  @return a non-null list of handler parameters (may be empty)