/** Filter the entities based on the specifications of the tab. */
 protected static UnaryFunctor<Individual, Boolean> getPortalFilter(Tab tab) {
   ApplicationBean appBean = new ApplicationBean();
   if (tab.getPortalId() == appBean.getSharedPortalFlagNumeric()) {
     return VitroFilterUtils.getCalsPortalFilter().getIndividualFilter();
     // } else if (tab.getPortalId() == appBean.getAllPortalFlagNumeric()){
   } else if (tab.getPortalId() == 65535) {
     return VitroFilterUtils.t;
   } else {
     return VitroFilterUtils.getFlag1ExclusiveFilter(
         FlagMathUtils.portalId2Numeric(tab.getPortalId()));
   }
 }
  private Object getApplicationName() {
    String name = "";
    try {
      WebappDaoFactory wadf = ModelAccess.on(ctx).getWebappDaoFactory();
      ApplicationBean app = wadf.getApplicationDao().getApplicationBean();
      name = app.getApplicationName();
    } catch (Exception e) {
      // deal with problems below
    }

    if ((name != null) && (!name.isEmpty())) {
      return name;
    } else {
      return getContextPath();
    }
  }