/**
  * Retrieve actual data which was saved - called by Filter. Chose to keep all logic here for
  * saving and retrieving data TODO find away of purging stuff *when* it is reasonable to do so
  *
  * @param request
  * @param id
  * @return Map containing details of previous pages visited
  * @throws IllegalStateException
  */
 public static Map[] getCallerPageData(HttpServletRequest request, String id) {
   Map callerPageHistory = (Map) request.getSession().getAttribute("callerPageHistory");
   if (callerPageHistory == null || !callerPageHistory.containsKey(id)) {
     CallerPageException e = new CallerPageException("No caller page data for ID=" + id);
     throw (CallerPageException) NavExceptionHelper.fillInStacktrace(e);
   }
   return (Map[]) callerPageHistory.get(id);
 }