Examples of WGContentNavigator


Examples of de.innovationgate.webgate.api.WGContentNavigator

            if (getRole() != null) {
                navRole = getRole();
            }
           
            // Build content navigator
            WGContentNavigator navigator = new WGContentNavigator(navRole, _languageChooser);
            navigator.setOnlyPublished(!context.isbrowserinterface());
   
            // Process by expression type
            if (getType() == EXPRESSIONTYPE_PATH) {
                return processExpressionPath(context, errorReturnContext);
            }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGContentNavigator

 
 
  public void tmlStartTag() throws TMLException, WGAPIException {
   
      Status status = (Status) getStatus();
    WGContentNavigator navigator;
   
    if (this.allowdefaultlang != null) {
        addWarning("Attribute \"allowdefaultlang\" is deprecated and inoperable since OpenWGA 5.1");
    }
   
    WGContent relContent = this.getTMLContext().content();
        // IF the relContent is a dummy, use the first released content of this database
        if (relContent.isDummy()) {
            relContent = relContent.getDatabase().getFirstReleasedContent((String) getTMLContext().meta("language"), true);
            if (relContent == null) {
                addWarning("No content in context and cannot find released content of language " +  getTMLContext().meta("language") + " in the current database", true);
                return;
            }
        }
       
    String theRole = this.getRole();
   
    String type = status.navType;
      
    if (type.equals("children")) {
      navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
      WGStructEntryList childEntries = relContent.getStructEntry().getChildEntries();
      status.contentList = WGContentList.create(navigator.collectRelevantContents(childEntries));
    }
    else if (type.equals("siblings")) {
      navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
      WGStructEntryList siblingEntries = relContent.getStructEntry().getSiblingEntries();
      status.contentList = WGContentList.create(navigator.collectRelevantContents(siblingEntries));
    }
    else if (type.equals("parent") || type.equals("parents")) {
      navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
            WGStructEntryList parentEntries = relContent.getStructEntry().getParentEntry().getSiblingEntries();
            status.contentList = WGContentList.create(navigator.collectRelevantContents(parentEntries));
    }
    else if (type.equals("path")) {
      navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
      status.contentList = this.getPathListFor(relContent, navigator);
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGContentNavigator

  }

    private WGContentNavigator createContentNavigator(String theRole, String defaultRole) throws WGAPIException {
       
        Status status = (Status) getStatus();
        WGContentNavigator navigator = new WGContentNavigator((theRole != null ? theRole : defaultRole), new WebTMLLanguageChooser(getTMLContext().db(), getTMLContext()));
       
        // Set if this navigator should only return published documents
        if (!isCollectionsShowReleasedOnly()) {
            status.onlyPublished = false;
        }
        navigator.setOnlyPublished(status.onlyPublished);

        return navigator;
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGContentNavigator

          throw new TMLException("Foreach with type loop but without attribute count", true);
        }
        count = stringToInteger(strCount, 0);
      }
      else if (status.forEachType.equals("level")) {
          WGContentNavigator nav = new WGContentNavigator(null, new WebTMLLanguageChooser(getTMLContext().db(), getTMLContext()));
        count = nav.getContentLevel(this.getTMLContext().content()).intValue();
      }
      List objects = new java.util.ArrayList();
      for (int idx = 0; idx < count; idx++) {
        objects.add(new Integer(idx + 1));
      }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGContentNavigator

            else {
                return "";
            }
    }
    else if (name.equals("level")) {
        WGContentNavigator nav = new WGContentNavigator(null, new WebTMLLanguageChooser(db(), this));
      return nav.getContentLevel(content);
    }
    else if (name.equals("index")) {
        WGContentNavigator nav = new WGContentNavigator(null, new WebTMLLanguageChooser(db(), this));
      return nav.getSiblingsIndex(content);
    }
        else if (name.equals("navindex")) {
            WGContentNavigator nav = new WGContentNavigator(WGContent.DISPLAYTYPE_NAVIGATOR, new WebTMLLanguageChooser(db(), this));
            return nav.getSiblingsIndex(content);
        }
    else if (name.equals("language")) {
      return content.getLanguage().getName();
    }
    else if (name.equals("languagetitle")) {
      return content.getLanguage().getTitle();
    }
    else if (name.equals("attachments")) {
      return content.getFileNames();
    }
    else if (name.equals("doctype") || name.equals("contenttype")) {
        if (!content.isDummy()) {
            return content.getStructEntry().getContentType().getName();
        }
        else {
            return null;
        }
    }
        else if (name.equals("contenttypetitle")) {
            return content.getStructEntry().getContentType().getNameForLanguage(getpreferredlanguage());
        }
        else if (name.equals("contenttypedescription")) {
            return content.getStructEntry().getContentType().getDescriptionForLanguage(getpreferredlanguage());
        }
    else if (name.equals("siblings")) {
        WGContentNavigator nav = new WGContentNavigator(null, new WebTMLLanguageChooser(db(), this));
      return new Integer(nav.getSiblingsCount(content));
    }
    else if (name.equals("workflow")) {
      //return content.getStructEntry().getContentType().getMetaData(WGContentType.META_WORKFLOW);
      return content.getStructEntry().getWorkflowName();
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGContentNavigator

    WGContent pageContent = getmaincontext().content();
    if (pageContent.getDatabase() != this.document.getDatabase()) {
      return false;
    }

    WGContentNavigator navigator = new WGContentNavigator(this.role, new WebTMLLanguageChooser(db(), this));
    navigator.setOnlyPublished(!isbrowserinterface());
    while (pageContent != null) {
      if (pageContent.getStructKey().equals(this.content().getStructKey())) {
        isSelected = true;
        break;
      }

      if (pageContent.hasCompleteRelationships() && !pageContent.getStructEntry().isRoot()) {
        pageContent = navigator.getParentContent(pageContent);
      }
      else {
        pageContent = null;
      }
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGContentNavigator

    }
    return isSelected;
  }

  public boolean haschildren() throws WGAPIException {
    WGContentNavigator navigator = new WGContentNavigator(this.role, new WebTMLLanguageChooser(db(), this));
        return navigator.hasContentChildren(getcontent());
  }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGContentNavigator

    WGContentNavigator navigator = new WGContentNavigator(this.role, new WebTMLLanguageChooser(db(), this));
        return navigator.hasContentChildren(getcontent());
  }

  public boolean hassiblings() throws WGAPIException {
    WGContentNavigator navigator = new WGContentNavigator(this.role, new WebTMLLanguageChooser(db(), this));
        return navigator.getSiblingsCount(getcontent())!=0;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.