LOGGER.debug("Start to getting ValuelistInfo for the tableId '" + tableId + "'.");
}
Map requestParamsMap = ValueListRequestUtil.getRequestParameterMap(request, tableId);
ValueListInfo info = null;
if (requestParamsMap.isEmpty())
{
if (LOGGER.isDebugEnabled())
{
LOGGER.debug("Try to get backup of an info from the session for the tableId '" + tableId + "'.");
}
HttpSession session = request.getSession();
if (session != null)
{
info = (ValueListInfo) session.getAttribute(tableId);
}
else
{
LOGGER.warn("ValueListInfo for tableId '" + tableId + "' was not found in the sesion due to session is null!");
}
if (LOGGER.isDebugEnabled())
{
if (info == null)
{
LOGGER.debug("Backup of the ValueListInfo for the tableId '" + tableId + "'was NOT found in the session.");
}
else
{
LOGGER.debug("Backup of the ValueListInfo for the tableId '" + tableId + "' was FOUND in the session");
}
}
}
else
{
info = ValueListRequestUtil.buildValueListInfo(request, tableId);
if (LOGGER.isDebugEnabled())
{
LOGGER.debug("ValueListInfo for the tableId '" + tableId + "' was build from the request's params.");
}
}
if (info == null)
{
if (LOGGER.isInfoEnabled())
{
LOGGER.info("Creating a default ValueListInfo for the tableId '" + tableId + "'");
}
info = new ValueListInfo();
}
return info;
}