{
Logger.info("Konto blacklisted for rewriters, skip rewriting");
return null;
}
BeanService service = Application.getBootLoader().getBootable(BeanService.class);
if (umsatzRewriters == null)
{
umsatzRewriters = new HashMap<String,Class<UmsatzRewriter>>();
try
{
ClassFinder finder = Application.getPluginLoader().getManifest(HBCI.class).getClassLoader().getClassFinder();
Class<UmsatzRewriter>[] classes = finder.findImplementors(UmsatzRewriter.class);
for (Class<UmsatzRewriter> c:classes)
{
try
{
UmsatzRewriter u = service.get(c);
List<String> blzList = u.getBlzList();
for (String s:blzList)
umsatzRewriters.put(s,c);
}
catch (Exception e)
{
Logger.error("unable to load rewriter " + c.getName() + ", skipping",e);
}
}
}
catch (Exception e)
{
Logger.warn("no umsatz rewriters found");
}
}
Class<UmsatzRewriter> c = umsatzRewriters.get(blz);
if (c == null)
return null;
return service.get(c);
}