@Override
public void addImport(String className) throws RuleBaseException {
ImportDeclaration imp = new ImportDeclaration(className);
Map<String, String> metaData = imp.toMetadata();
ImportConfiguration cnf = new ImportConfiguration(metaData, imp);
try {
if (importPersistence.load(metaData).isEmpty()) {
importPersistence.persist(cnf);
}
} catch (PersistenceException e) {
throw new RuleBaseException(e);
}
try {
builder.reloadRulebase();
} catch (RuleBaseException e) {
importPersistence.remove(cnf.getMetaData());
throw e;
}
}