public void doView(RenderRequest request, RenderResponse response)
      throws PortletException, IOException {
    Context context = getContext(request);

    context.put(
        "enableContents",
        PortalConfig.getInstance()
            .getBoolean("portal.enable.search.ext.env.area.contents", Boolean.TRUE));
    context.put(
        "enableSources",
        PortalConfig.getInstance()
            .getBoolean("portal.enable.search.ext.env.area.sources", Boolean.TRUE));
    context.put(
        "enablePartner",
        PortalConfig.getInstance()
            .getBoolean("portal.enable.search.ext.env.area.partner", Boolean.TRUE));

    // set positions in main and sub tab
    context.put(VAR_MAIN_TAB, PARAMV_TAB_AREA);
    context.put(VAR_SUB_TAB, PARAMV_TAB_PARTNER);

    UtilsSearch.doViewForPartnerPortlet(request, context);

    super.doView(request, response);
  }
Пример #2
0
  public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
      throws PortletException, IOException {
    Context context = getContext(request);
    IngridResourceBundle messages =
        new IngridResourceBundle(
            getPortletConfig().getResourceBundle(request.getLocale()), request.getLocale());
    context.put("MESSAGES", messages);

    // enable/disable providers drop down
    String selectedDS =
        SearchState.getSearchStateObjectAsString(request, Settings.PARAM_DATASOURCE);
    if (PortalConfig.getInstance().getBoolean(PortalConfig.PORTAL_SEARCH_DISPLAY_PROVIDERS)
        || selectedDS.equals(Settings.PARAMV_DATASOURCE_ENVINFO)
            && PortalConfig.getInstance()
                .getBoolean(PortalConfig.PORTAL_SEARCH_DISPLAY_PROVIDERS_ENVINFO)) {
      String partner =
          PortalConfig.getInstance().getString(PortalConfig.PORTAL_SEARCH_RESTRICT_PARTNER);
      List providers;
      if (partner == null || partner.length() == 0) {
        providers = UtilsDB.getProviders();
      } else {
        providers = UtilsDB.getProvidersFromPartnerKey(partner);
      }
      context.put("displayProviders", Boolean.TRUE);
      context.put("providers", providers);
      context.put("UtilsString", new UtilsString());

      // get selected provider
      IngridSessionPreferences sessionPrefs =
          Utils.getSessionPreferences(
              request, IngridSessionPreferences.SESSION_KEY, IngridSessionPreferences.class);
      String provider = request.getParameter(Settings.PARAM_PROVIDER);
      if (provider != null) {
        sessionPrefs.put(IngridSessionPreferences.RESTRICTING_PROVIDER, provider);
      }
      context.put(
          "selectedProviderIdent", sessionPrefs.get(IngridSessionPreferences.RESTRICTING_PROVIDER));
    }

    super.doView(request, response);
  }
Пример #3
0
 protected void processTab(ActionResponse actionResponse, String tab)
     throws PortletException, IOException {
   if (tab.equals(PARAMV_TAB_TOPIC)) {
     actionResponse.sendRedirect(actionResponse.encodeURL(PAGE_TOPIC));
   } else if (tab.equals(PARAMV_TAB_PLACE)) {
     actionResponse.sendRedirect(actionResponse.encodeURL(PAGE_PLACE));
   } else if (tab.equals(PARAMV_TAB_TIME)) {
     actionResponse.sendRedirect(actionResponse.encodeURL(PAGE_TIME));
   } else if (tab.equals(PARAMV_TAB_AREA)) {
     if (PortalConfig.getInstance()
         .getBoolean("portal.enable.search.ext.env.area.contents", true)) {
       actionResponse.sendRedirect(actionResponse.encodeURL(PAGE_AREA_CONTENTS));
     } else if (PortalConfig.getInstance()
         .getBoolean("portal.enable.search.ext.env.area.sources", true)) {
       actionResponse.sendRedirect(actionResponse.encodeURL(PAGE_AREA_SOURCES));
     } else if (PortalConfig.getInstance()
         .getBoolean("portal.enable.search.ext.env.area.partner", true)) {
       actionResponse.sendRedirect(actionResponse.encodeURL(PAGE_AREA_PARTNER));
     }
   }
 }
  /**
   * @see
   *     org.apache.portals.bridges.velocity.GenericVelocityPortlet#doView(javax.portlet.RenderRequest,
   *     javax.portlet.RenderResponse)
   */
  public void doView(RenderRequest request, RenderResponse response)
      throws PortletException, IOException {
    Context context = getContext(request);

    IngridResourceBundle messages =
        new IngridResourceBundle(
            getPortletConfig().getResourceBundle(request.getLocale()), request.getLocale());
    context.put("MESSAGES", messages);

    // set localized title for this page
    response.setTitle(messages.getString("admin.statistics.headline"));

    context.put(
        "apacheStatisticsURL",
        PortalConfig.getInstance().getString(PortalConfig.APACHE_STATISTICS_URL, ""));

    super.doView(request, response);
  }