Package com.agiletec.aps.system.services.page

Examples of com.agiletec.aps.system.services.page.IPage


   * The root nodes allow you to create blocks of selected nodes in showlet appropriate.
   * @param reqCtx The context of the current request.
   * @return The list of root nodes.
   */
  protected List<ITreeNode> getFacetRoots(RequestContext reqCtx) {
    IPage page = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
    Integer currentFrame = (Integer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_FRAME);
    Widget[] widgets = page.getWidgets();
    for (int i = 0; i < widgets.length; i++) {
      if (i == currentFrame.intValue()) continue;
      Widget widget = widgets[i];
      String configParamName = JpFacetNavSystemConstants.FACET_ROOTS_SHOWLET_PARAM_NAME;
      if (null != widget && null != widget.getConfig()
View Full Code Here


   */
  protected String createLink(String pageCode, String userName, String token, String langcode) {
    Map<String, String> params = new HashMap<String, String>();
    params.put("token", token);
    Lang lang = this.getLangManager().getLang(langcode);
    IPage page = this.getPageManager().getPage(pageCode);
    if (null == page) {
      page = this.getPageManager().getRoot();
    }
    return this.getUrlManager().createUrl(page, lang, params);
  }
View Full Code Here

  }

  public List<IPage> getPages() {
    if (this._pages==null) {
      this._pages = new ArrayList<IPage>();
      IPage root = this.getPageManager().getRoot();
      this.addPages(root, this._pages);
    }
    return this._pages;
  }
View Full Code Here

      String langCode = this.getLangManager().getDefaultLang().getCode();
      while (res.next()) {
        PageStatistic statistic = new PageStatistic();
        String code = res.getString(1);
        statistic.setCode(code);
        IPage page = pageManager.getPage(code);
        String descr = (page!=null) ? page.getTitle(langCode) : code;
        statistic.setDescr(descr);
        statistic.setVisits(new Integer(res.getInt(2)));
        visitsStats.add(statistic);
      }
    } catch (Throwable t) {
View Full Code Here

    if (null != reqCtx) {
      currentLang = (Lang) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG);
    } else {
      currentLang = this.getLangManager().getDefaultLang();
    }
    IPage pageDestCode = null;
    String pageDestCodeString = (String) this.getRequest().getSession().getAttribute(JpFastContentEditSystemConstants.FINAL_DEST_PAGE_PARAM_NAME);
    if (null == pageDestCodeString || null == (pageDestCode = this.getPageManager().getPage(pageDestCodeString))) {
      pageDestCode = this.getPageManager().getRoot();
    }
    this.getRequest().getSession().removeAttribute(JpFastContentEditSystemConstants.FINAL_DEST_PAGE_PARAM_NAME);
View Full Code Here

    //    " - POSIZIONE SUCC " + this.getTargetNextFramePos());
    if (this.getTargetFramePos() != null) {
      return super.swapFrames();
    }
    try {
      IPage currentPage = this.getCurrentPage();
      if (null == this.getTargetPrevFramePos() && null == this.getTargetNextFramePos()) {
        ApsSystemUtils.getLogger().debug("Page '" + currentPage.getCode() + "' - No swap to do");
        return SUCCESS;
      }
      Widget[] customShowlets = super.getCustomShowletConfig();
      Widget[] showletsToRender = this.getPageUserConfigManager().getShowletsToRender(currentPage, customShowlets);
      MyPortalPageModel pageModel = (MyPortalPageModel) currentPage.getModel();
      Integer[] columnFrames = this.calculateColumnFrames(pageModel);
      boolean isFrameDestBusy = this.calculateFrameDestOnSwapAjax(showletsToRender, columnFrames);
      if (this.getStartFramePos().equals(this.getTargetFramePos())) {
        //System.out.println("SPOSTAMENTO NELLA STESSA POSIZIONE - pos " + this.getStartFramePos());
        return SUCCESS;
View Full Code Here

  public String openSwapSection() {
    //System.out.println("Frame where opens section " + this.getFrameWhereOpenSection());
    List<FrameSelectItem> selectItems = new ArrayList<FrameSelectItem>();
    this.setSelectItems(selectItems);
    try {
      IPage currentPage = this.getCurrentPage();
      MyPortalPageModel pageModel = (MyPortalPageModel) currentPage.getModel();
      Integer currentColumnId = pageModel.getFrameConfigs()[this.getFrameWhereOpenSection()].getColumn();
      if (null == currentColumnId) {
        return SUCCESS;
      }
      CustomPageConfig config = this.getCustomPageConfig();
View Full Code Here

  }

  public void testGetShowletToRender() throws Throwable {
    UserDetails user = this.getUser("editorCustomers");
    PageUserConfigBean config = this._pageUserConfigManager.getUserConfig(user);
    IPage page = this._pageManager.getPage("jpmyportalplus_testpage");
    CustomPageConfig pageConfig = config.getConfig().get("jpmyportalplus_testpage");
    Widget[] showlets = this._pageUserConfigManager.getShowletsToRender(page, pageConfig.getConfig());

    assertEquals(8, showlets.length);
View Full Code Here

        RequestContext reqCtx = (RequestContext) this.pageContext.getRequest().getAttribute(RequestContext.REQCTX);
        List<WidgetCheckInfo> checkInfos = new ArrayList<WidgetCheckInfo>();
        IPageUserConfigManager pageUserConfigManager = (IPageUserConfigManager) ApsWebApplicationUtils.getBean(JpmyportalplusSystemConstants.PAGE_USER_CONFIG_MANAGER, pageContext);
        try {
            Lang currentLang = (Lang) this.pageContext.getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_LANG);
            IPage currentPage = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
            Widget[] customShowletConfig = this.getCustomShowletConfig(currentPage);
            Widget[] showletsToRender = pageUserConfigManager.getShowletsToRender(currentPage, customShowletConfig);
            List<String> allowedShowlets = new ArrayList<String>();
            Map<String, WidgetType> customizableShowlets = this.getCustomizableShowlets(pageUserConfigManager);
            allowedShowlets.addAll(customizableShowlets.keySet());
            Frame[] frames = ((MyPortalPageModel) currentPage.getModel()).getFrameConfigs();
            for (int i = 0; i < frames.length; i++) {
                Frame frame = frames[i];
                if (!frame.isLocked()) {
                    Widget showlet = showletsToRender[i];
                    if (null != showlet && allowedShowlets.contains(showlet.getType().getCode())) {
View Full Code Here

  public String swapFrames() {
    //System.out.println("Partenza " + this.getStartFramePos() +
    //    " - ARRIVO  " + this.getTargetFramePos());
    try {
      Widget[] customShowlets = super.getCustomShowletConfig();
      IPage currentPage = this.getCurrentPage();
      Widget[] showletsToRender = this.getPageUserConfigManager().getShowletsToRender(currentPage, customShowlets);

      Widget movedShowlet = showletsToRender[this.getStartFramePos()];
      Integer movedShowletStatusInteger = super.getCustomShowletStatus() != null ? super.getCustomShowletStatus()[this.getStartFramePos()] : null;
      int movedShowletStatus = (movedShowletStatusInteger == null) ? 0 : movedShowletStatusInteger;
View Full Code Here

TOP

Related Classes of com.agiletec.aps.system.services.page.IPage

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.