* @param rules List of {@link LuceneIndexFileRule} objects to be saved
*/
public static void saveRules(Element lucene, List rules) {
Element filerules = WGUtils.getOrCreateElement(lucene, "filerules");
//remove old rules
filerules.clearContent();
Iterator itemrulesIt = rules.iterator();
while (itemrulesIt.hasNext()) {
LuceneIndexFileRule rule = (LuceneIndexFileRule) itemrulesIt.next();
Element ruleElement = filerules.addElement("filerule");
ruleElement.addAttribute("filesizelimit", new Integer(rule.getFileSizeLimit()).toString());