コード例 #1
0
 /** 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()));
   }
 }
コード例 #2
0
  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();
    }
  }