Examples of WGStructEntryList


Examples of de.innovationgate.webgate.api.WGStructEntryList

        if (engine == null) {
            this.addWarning("Unknown expression language: language", true);
            return null;
        }

        WGStructEntryList structsToSearch;
        if (scope.equals("siblings")) {
            structsToSearch = content.getStructEntry().getSiblingEntries();
        }
        else {
            structsToSearch = content.getStructEntry().getChildEntries();
View Full Code Here

Examples of de.innovationgate.webgate.api.WGStructEntryList

            Set newGroupInformation = new HashSet();
           
            // collect group struct entries / if any exist
            Map groupMembership = new HashMap();
            if (_groupsRootDoc != null) {
                WGStructEntryList groupStructEntries = null;
                WGContent rootContent = db.getContentByName(_groupsRootDoc);
                if (rootContent != null) {
                    groupStructEntries = rootContent.getStructEntry().getChildEntries();
                }
   
                if (groupStructEntries == null) {
                    WGArea area = db.getArea(_groupsRootDoc);
                    if (area != null) {
                        groupStructEntries = area.getRootEntries();
                    }
                }
   
                if (groupStructEntries == null) {
                    throw new WGException("Root doc name '" + _groupsRootDoc + "' is neither the unique name of a content nor an area name. Please check if the default language " + db.getDefaultLanguage() + " of this database matches the language of group documents.");
                }
   
                // Recurse through group docs
                Iterator structsIt = groupStructEntries.iterator();
                while (structsIt.hasNext()) {
                    recurseGroupDocuments((WGStructEntry) structsIt.next(), groupMembership, newGroupInformation);
                }
            }

            // Collect user struct entries {
            WGStructEntryList structEntries = null;
            WGContent rootContent = db.getContentByName(_userRootDoc);
            if (rootContent != null) {
                structEntries = rootContent.getStructEntry().getChildEntries();
            }

            if (structEntries == null) {
                WGArea area = db.getArea(_userRootDoc);
                if (area != null) {
                    structEntries = area.getRootEntries();
                }
            }

            if (structEntries == null) {
                throw new WGException("Root doc name '" + _userRootDoc + "' is neither the unique name of a content nor an area name. Please check if the default language " + db.getDefaultLanguage() + " of this database matches the language of user documents.");
            }

            // Recurse through user docs
            Iterator structsIt = structEntries.iterator();
            while (structsIt.hasNext()) {
                recurseLoginDocuments((WGStructEntry) structsIt.next(), newLoginInformation);
            }

           
View Full Code Here

Examples of de.innovationgate.webgate.api.WGStructEntryList

    }

    public static WGContent findContent(PathTitle title, WGDocument parent, WGLanguageChooser chooser) throws WGAPIException, UnsupportedEncodingException {

        // Get the candidate entries
        WGStructEntryList entries = null;
        if (parent instanceof WGArea) {
            entries = ((WGArea) parent).getRootEntries();
        }
        else if (parent instanceof WGStructEntry) {
            entries = ((WGStructEntry) parent).getChildEntries();
        }
        else if (parent instanceof WGContent) {
            entries = ((WGContent) parent).getStructEntry().getChildEntries();
        }

        Iterator entriesIt = entries.iterator();
        WGContent foundContent = null;
        while (entriesIt.hasNext()) {
            WGStructEntry entry = (WGStructEntry) entriesIt.next();
            WGContent content = chooser.selectContentForPage(entry, false);
            if (content != null) {
View Full Code Here

Examples of de.innovationgate.webgate.api.WGStructEntryList

    private WGContent findURLPathContent(TitlePath titlePath, int index, WGLanguageChooser chooser, WGDocument parent) throws WGAPIException, UnsupportedEncodingException, RemainingPathElementException {
       
        PathTitle pathTitle = parseURLPathTitle((String) titlePath.getTitles().get(index));
       
        // Get the candidate entries
        WGStructEntryList entries = null;
        if (parent instanceof WGArea) {
            entries = ((WGArea) parent).getRootEntries();
        }
        else if (parent instanceof WGStructEntry) {
            entries = ((WGStructEntry) parent).getChildEntries();
        }
        else if (parent instanceof WGContent) {
            entries = ((WGContent) parent).getStructEntry().getChildEntries();
        }

        WGContent foundContent = null;
        Iterator entriesIt = entries.iterator();
       
        // Iterate entries
        while (entriesIt.hasNext()) {
            WGStructEntry entry = (WGStructEntry) entriesIt.next();
           
View Full Code Here

Examples of de.innovationgate.webgate.api.WGStructEntryList

   
    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
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.