log.audit("+---------------------------------------------------------------+");
Manager secMgr = ManagerFactory.getManager();
List<Identity> identitiesList = secMgr.getIdentitiesByPowerSearch(null, null, true, null, null, null,
null, null, null);
HomePageConfigManager hpcm = HomePageConfigManagerImpl.getInstance();
int counter = 0;
if (log.isDebug()) log.info("Migrating homepage-bio for " + identitiesList.size() + " identities.");
for (Identity identity : identitiesList) {
try{
HomePageConfig hpcfg = hpcm.loadConfigFor(identity.getName());
String oldBio = hpcfg.getTextAboutMe();
if (StringHelper.containsNonWhitespace(oldBio)){
String newBio = migrateStringSavely(oldBio);
hpcfg.setTextAboutMe(newBio);
hpcm.saveConfigTo(identity.getName(), hpcfg);
counter++;
}
DBFactory.getInstance().intermediateCommit();
} catch (Exception e) {
log.error("Error during Migration: "+e, e);