protected Unit getUnit(HttpServletRequest request) { Unit unit = (Unit) request.getAttribute("unit"); if (unit == null) { FilterFunctionalityContext context = (FilterFunctionalityContext) AbstractFunctionalityContext.getCurrentContext(request); UnitSite site = (UnitSite) context.getSelectedContainer(); unit = site.getUnit(); } return unit; }
protected UnitSite getUnitSite(HttpServletRequest request) { FilterFunctionalityContext context = (FilterFunctionalityContext) AbstractFunctionalityContext.getCurrentContext(request); Container container = (Container) context.getLastContentInPath(UnitSite.class); return (UnitSite) container; }