Package com.agiletec.plugins.jpmyportalplus.aps.system.services.userconfig.model

Examples of com.agiletec.plugins.jpmyportalplus.aps.system.services.userconfig.model.CustomPageConfig


      customUserPageConfig.getStatus()[updateInfo.getFramePos()] = updateInfo.getStatus();
    }
  }

  private CustomPageConfig createNewPageConfig(WidgetUpdateInfoBean[] infos, IPage currentPage) {
    CustomPageConfig pageConfig = new CustomPageConfig(currentPage.getCode(), currentPage.getModel().getFrames().length);
    this.updatePageConfig(pageConfig, infos);
    return pageConfig;
  }
View Full Code Here


  }

  protected Widget[] getCustomShowletConfig() throws Throwable {
    Widget[] customShowlets = null;
    try {
      CustomPageConfig customPageConfig = this.getCustomPageConfig();
      if (null != customPageConfig) {
        customShowlets = customPageConfig.getConfig();
      }
    } catch (Throwable t) {
      String message = "Errore in estrazione custom showlets";
      ApsSystemUtils.logThrowable(t, this, "getCustomShowletConfig", message);
      throw new ApsSystemException(message, t);
View Full Code Here

  }

  protected Integer[] getCustomShowletStatus() throws Throwable {
    Integer[] customShowletStatus = null;
    try {
      CustomPageConfig customPageConfig = this.getCustomPageConfig();
      if (null != customPageConfig) {
        customShowletStatus = customPageConfig.getStatus();
      }
    } catch (Throwable t) {
      String message = "Errore in estrazione custom showlet status";
      ApsSystemUtils.logThrowable(t, this, "getCustomShowletStatus", message);
      throw new ApsSystemException(message, t);
View Full Code Here

    return customShowletStatus;
  }

  protected CustomPageConfig getCustomPageConfig() {
    IPage currentPage = this.getCurrentPage();
    CustomPageConfig config = (CustomPageConfig) this.getRequest().getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG);
    if (config != null && !config.getPageCode().equals(currentPage.getCode())) {
      ApsSystemUtils.getLogger().error("Current page '" + currentPage
          + "' not equals then pageCode of custom config param '" + config.getPageCode() + "'");
      return null;
    }
    return config;
  }
View Full Code Here

  }

  protected Widget[] getCustomShowletConfig(IPage currentPage, IPageUserConfigManager pageUserConfigManager) throws Throwable {
    Widget[] customShowlets = null;
    try {
      CustomPageConfig customPageConfig =
        (CustomPageConfig) this.pageContext.getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG);
      if (customPageConfig != null && !customPageConfig.getPageCode().equals(currentPage.getCode())) {
        //throw new RuntimeException("Current page '" + currentPage.getCode()
        //    + "' not equals then pageCode of custom config param '" + customPageConfig.getPageCode() + "'");
        ApsSystemUtils.getLogger().error("Current page '" + currentPage.getCode()
            + "' not equals then pageCode of custom config param '" + customPageConfig.getPageCode() + "'");
        return null;
      }
      if (null != customPageConfig) {
        customShowlets = customPageConfig.getConfig();
      }
    } catch (Throwable t) {
      String message = "Errore in estrazione custom showlets";
      ApsSystemUtils.logThrowable(t, this, "getCustomShowletConfig", message);
      throw new ApsSystemException(message, t);
View Full Code Here

    return pageUserBean;
  }

  @Override
  public CustomPageConfig getGuestPageConfig(IPage page, HttpServletRequest request) throws ApsSystemException {
    CustomPageConfig customConfig = null;
    try {
      Cookie cookie = this.getCookieGuestConfig(page, request);
      if (null == cookie
          || cookie.getValue() == null
          || cookie.getValue().trim().length() == 0) {
        ApsSystemUtils.getLogger().trace("Cookie nullo o invalido per pagina " + page.getCode());
        return null;
      }
      MyPortalConfig mPortalConfig = this.getMyPortalConfigManager().getConfig();
      customConfig = new CustomPageConfig(cookie, page, this.getWidgetTypeManager(),
          mPortalConfig.getAllowedShowlets(), this.getVoidShowletCode());
      for (int i = 0; i < customConfig.getConfig().length; i++) {
        Widget showlet = customConfig.getConfig()[i];
        if (null != showlet) {
          if (null != showlet.getType()) {
            String mainGroup = showlet.getType().getMainGroup();
            if (null != mainGroup && !mainGroup.equals(Group.FREE_GROUP_NAME)) {
              customConfig.getConfig()[i] = null;
              customConfig.getStatus()[i] = null;
            }
          } else {
            customConfig.getConfig()[i] = null;
            customConfig.getStatus()[i] = null;
          }
        }
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getGuestPageConfig");
View Full Code Here

  }

  @Override
  public void updateGuestPageConfig(IPage page, WidgetUpdateInfoBean[] updateInfos, HttpServletRequest request, HttpServletResponse response) throws ApsSystemException {
    try {
      CustomPageConfig pageConfig = this.getGuestPageConfig(page, request);
      if (null == pageConfig) {
        pageConfig = new CustomPageConfig(page.getCode(), page.getModel().getFrames().length);
      }
      pageConfig.update(updateInfos);
      String cookieName = this.getCookieName(page);
      Cookie newCookie = pageConfig.toCookie(cookieName);
      response.addCookie(newCookie);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "updateGuestPageConfig");
      throw new ApsSystemException("Error building Guest Page Config", t);
    }
View Full Code Here

  @Override
  public int doStartTag() throws JspException {
    HttpServletRequest req =  (HttpServletRequest) this.pageContext.getRequest();
    Integer[] customShowletStatus = null;
    try {
      CustomPageConfig customPageConfig =
        (CustomPageConfig) req.getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG);
      if (null != customPageConfig) {
        customShowletStatus = customPageConfig.getStatus();
      }
      RequestContext reqCtx = (RequestContext) req.getAttribute(RequestContext.REQCTX);
      Integer currentFrame = (Integer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME);
      if (customShowletStatus != null) {
        int status = customShowletStatus[currentFrame] == null ? 0 : customShowletStatus[currentFrame].intValue();
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpmyportalplus.aps.system.services.userconfig.model.CustomPageConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.