Ejemplo n.º 1
0
  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;
  }
Ejemplo n.º 2
0
 protected UnitSite getUnitSite(HttpServletRequest request) {
   FilterFunctionalityContext context =
       (FilterFunctionalityContext) AbstractFunctionalityContext.getCurrentContext(request);
   Container container = (Container) context.getLastContentInPath(UnitSite.class);
   return (UnitSite) container;
 }