Package com.hlcl.rql.util.as

Examples of com.hlcl.rql.util.as.PageArrayList


   * Block parent pages which aren't a physical pages are investigated further recursively. A tree upwards ending with a block page
   * will not be returned.
   */
  public Set<PhysicalPage> collectBlockPagesPhysicalParents(String filterTemplateName) throws RQLException {
    Set<PhysicalPage> result = new HashSet<PhysicalPage>();
    PageArrayList blockPages = getBlocksContainer().getChildPagesForTemplate(filterTemplateName);
    // check parent of all block pages
    for (int i = 0; i < blockPages.size(); i++) {
      Page blockPage = blockPages.getPage(i);
      collectPhysicalParentsPrim(result, blockPage);
    }
    return result;
  }
View Full Code Here


   * Returns for all block pages of this content page all physical parent pages (including this). Block parent pages which aren't a
   * physical pages are investigated further recursively. A tree upwards ending with a block page will not be returned.
   */
  public Set<PhysicalPage> collectBlockPagesPhysicalParents() throws RQLException {
    Set<PhysicalPage> result = new HashSet<PhysicalPage>();
    PageArrayList blockPages = getBlocksContainer().getChildPages();
    // check parent of all block pages
    for (int i = 0; i < blockPages.size(); i++) {
      Page blockPage = blockPages.getPage(i);
      collectPhysicalParentsPrim(result, blockPage);
    }
    return result;
  }
View Full Code Here

   * Collects all block page parent physical pages into result. Calls itself recursively.
   *
   * @throws RQLException
   */
  private void collectPhysicalParentsPrim(Set<PhysicalPage> result, Page blockPage) throws RQLException {
    PageArrayList blockParents = blockPage.getParentPages();
    for (int j = 0; j < blockParents.size(); j++) {
      PhysicalPage physPg = new PhysicalPage(blockParents.getPage(j));
      // include only physical parent pages
      if (physPg.isPhysicalPage()) {
        result.add(physPg);
      } else {
        // parent is block page, check parents
View Full Code Here

    if (multiLinks.isEmpty()) {
      return deepness;
    }
    for (Iterator iter = multiLinks.iterator(); iter.hasNext();) {
      MultiLink multiLink = (MultiLink) iter.next();
      PageArrayList childs = multiLink.getChildPages();
      if (childs.isEmpty()) {
        // ignore empty multi links (do not add them)
        continue;
      }
      if (childs.selectAllPagesNotContaining(isPhysicalPageTmpltElemName).isEmpty()) {
        // ignore all multi links with only physical pages behind
        continue;
      }
      // collect link, because it has childs
      addLast(multiLink, deepness);
      // try on every child
      deepness -= 1;
      for (int i = 0; i < childs.size(); i++) {
        Page child = (Page) childs.get(i);
        if (child.contains(isPhysicalPageTmpltElemName)) {
          // stop recursion because of next physical page reached
          continue;
        }
        // block child found
View Full Code Here

   * Löscht neue Seiten oder macht Änderung rückgängig.
   * Returns true, if at least one page was submitted.
   */
  public boolean cancelPagesSavedAsDraft(Project project) throws RQLException {

    PageArrayList draftPages = getPagesSavedAsDraft(project);
    for (int i = 0; i < draftPages.size(); i++) {
      Page draftPg = (Page) draftPages.get(i);
      draftPg.cancelDraftState();
    }
    return draftPages.size() > 0;
  }
View Full Code Here

   * Bestätigt alle Seiten dieses Benutzers im Status Entwurf.
   *
   * @return Number of submitted pages
   */
  public int submitPagesSavedAsDraft(Project project) throws RQLException {
    PageArrayList draftPages = project.getPagesByState(Project.WF_LIST_STATE_PAGES_SAVED_AS_DRAFT, this);
    draftPages.submitAllToWorkflow();
    return draftPages.size();
  }
View Full Code Here

      // remember in instance to steer next refresh
      refreshIntervalInMinutes = Integer.parseInt(parms.get("refreshIntervalInMinutes"));

      // get row pages
      Page tablePg = project.getPageById(parms.get("responsibleTablePageId"));
      PageArrayList rowPages = tablePg.getListChildPages(parms.get("departmentsListTmpltElemName"));

      // get all data and save within data holder rows
      responsibleDepartments = new ArrayList<ResponsibleTableRow>(rowPages.size());
      for (Iterator iterator = rowPages.iterator(); iterator.hasNext();) {
        Page rowPg = (Page) iterator.next();

        // copy and save data
        ResponsibleTableRow rowData = new ResponsibleTableRow(rowPg.getPageGuid(), rowPg.getStandardFieldTextValue(parms
            .get("responsibleAreaTmpltElemName")), rowPg.getStandardFieldTextValue(parms.get("responsibleRccBackupUserIdTmpltElemName")),
View Full Code Here

   * @param startPageIds
   *            path construction ends at one of the given pages, otherwise path go back to project's start page
   */
  private PageArrayList getPath(String startPageIdsOrNull, String separator, boolean includeBlocks, boolean includeNodes) throws RQLException {

    PageArrayList result = new PageArrayList();
    // collect going backwards until project start page
    Page page = this.getPage();
    boolean loop = true;
    try {
      while (loop) {
        int type = getPageType(page);
        if (type == PAGE_TYPE_PHYSICAL) {
          result.add(page);
        } else if (type == PAGE_TYPE_BLOCK) {
          if (includeBlocks) {
            result.add(page);
          }
        } else if (type == PAGE_TYPE_NODE) {
          if (includeNodes) {
            if (isContentNode(page)) {
              List pseudoList = page.getList(getParameter("nodePagePseudoListTmpltElemName"));
              if (pseudoList != null && pseudoList.hasChildPages()) {
                Page firstChild = pseudoList.getFirstChildPage();
                if (firstChild != null) {
                  result.add(firstChild);
                }
              }
            } else {
              result.add(page);
            }
          }
        }
        // always
        page = page.getMainLinkParentPage();
        // check optional end condition by given page
        if (startPageIdsOrNull != null && StringHelper.contains(startPageIdsOrNull, page.getPageId(), true)) {
          // add last page itself
          result.add(page);
          loop = false;
        }
      }
    } catch (UnlinkedPageException upe) {
      // simply end iteration
View Full Code Here

   * Startet das Vererben bei dem Container mit Namen containerTemplateElementName, das in der gegebenen Seite startPage existieren muss.
   */
  public void inheritFromMultiLink(MultiLink link) throws RQLException {
   
    // for every child do
    PageArrayList childs = link.getChildPages();
    for (int i = 0; i < childs.size(); i++) {
      Page child = (Page) childs.get(i);
      inheritRecursive(child);
    }
  }
View Full Code Here

      MultiLink link = (MultiLink) links.get(j);
      link.assignWorkflow(workflow, false);
    }
   
    // try for every link of child
    PageArrayList childs = page.getChildPages();
    for (int i = 0; i < childs.size(); i++) {
      Page child = (Page) childs.get(i);
      inheritRecursive(child);
    }
  }
View Full Code Here

TOP

Related Classes of com.hlcl.rql.util.as.PageArrayList

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.