User oUsr = new User(oSes, User.forUuid(sNickName));
if (!oUsr.isActive()) {
oRes = resolve(oCls, "deactivated", oBab.getLastUrl());
} else {
if (CHKTXP.contains(oCls) && !oActive.contains(sTaxPayer)) {
TaxPayer oTxp = new TaxPayer(oSes.getDms(), sTaxPayer);
if (oTxp.getRequiresActivation()) {
oRes = new RedirectResolution(ActivateTaxPayer.class);
} else {
oActive.add(sTaxPayer);
}
}
oCredentials.add(sNickName+sPassword);
}
} catch (ElementNotFoundException enfe) {
Log.out.error("ElementNotFoundException "+enfe.getMessage(), enfe);
oRes = resolve(oCls, "userdatanotfound", oBab.getLastUrl());
}
} catch (Exception xcpt) {
Log.out.error(xcpt.getClass().getName()+" "+xcpt.getMessage(), xcpt);
oRes = resolve(oCls, "systemsecurity", oBab.getLastUrl());
} finally {
if (null!=oSes) {
if (oSes.isConnected()) oSes.disconnect();
if (oSes.isOpen()) oSes.close();
} // fi
}
} else if (oBab.getSessionAttribute("businessname").length()==32) {
if (CHKTXP.contains(oCls)) {
oSes = DAO.getSession("LoginInterceptor", sNickName, sPassword);
TaxPayer oTxp = new TaxPayer(oSes.getDms(), sTaxPayer);
oBab.setSessionAttribute("businessname", oTxp.getBusinessName());
if (oTxp.getRequiresActivation()) {
oRes = new RedirectResolution(ActivateTaxPayer.class);
} else if (!oActive.contains(sTaxPayer)) {
oActive.add(sTaxPayer);
}
oSes.disconnect();