Package org.apache.jetspeed.portalsite.menu

Examples of org.apache.jetspeed.portalsite.menu.DefaultMenuOptionsDefinition


                    parentNode = parentNode.getParent();
                }
            }
           
            // convert elements proxies into menu elements
            DefaultMenuOptionsDefinition defaultMenuOptionsDefinition = null;
            ListIterator elementProxiesIter = elementProxies.listIterator();
            while (elementProxiesIter.hasNext())
            {
                Node elementProxy = (Node)elementProxiesIter.next();
                MenuElement menuElement = null;

                // convert folders into nested menus if depth specified
                // with no paths expansion, (negative depth values are
                // interpreted as complete menu expansion)
                if ((elementProxy instanceof Folder) && ((depth < 0) || (depth > 1)) && !paths)
                {
                    // construct menu definition and associated menu
                    MenuDefinition nestedMenuDefinition = new DefaultMenuDefinition(elementProxy.getUrl(), depth - 1, locatorName);
                    menuElement = new MenuImpl(this, nestedMenuDefinition, context, null);
                }
                else
                {
                    // construct shared default menu option definition and menu option
                    if (defaultMenuOptionsDefinition == null)
                    {
                        defaultMenuOptionsDefinition = new DefaultMenuOptionsDefinition(options, depth, paths, regexp, locatorName, order);
                    }
                    menuElement = new MenuOptionImpl(this, elementProxy, defaultMenuOptionsDefinition);
                }

                // replace element proxy with menu element
View Full Code Here


                    parentNode = parentNode.getParent();
                }
            }
           
            // convert elements proxies into menu elements
            DefaultMenuOptionsDefinition defaultMenuOptionsDefinition = null;
            ListIterator elementProxiesIter = elementProxies.listIterator();
            while (elementProxiesIter.hasNext())
            {
                Node elementProxy = (Node)elementProxiesIter.next();
                MenuElement menuElement = null;

                // convert folders into nested menus if depth specified
                // with no paths expansion, (negative depth values are
                // interpreted as complete menu expansion)
                if ((elementProxy instanceof Folder) && ((depth < 0) || (depth > 1)) && !paths)
                {
                    // construct menu definition and associated menu
                    MenuDefinition nestedMenuDefinition = new DefaultMenuDefinition(elementProxy.getUrl(), depth - 1, locatorName);
                    menuElement = new MenuImpl(this, nestedMenuDefinition, context, null);
                }
                else
                {
                    // construct shared default menu option definition and menu option
                    if (defaultMenuOptionsDefinition == null)
                    {
                        defaultMenuOptionsDefinition = new DefaultMenuOptionsDefinition(options, depth, paths, regexp, locatorName, order);
                    }
                    menuElement = new MenuOptionImpl(this, elementProxy, defaultMenuOptionsDefinition);
                }

                // replace element proxy with menu element
View Full Code Here

                    parentNode = parentNode.getParent();
                }
            }
           
            // convert elements proxies into menu elements
            DefaultMenuOptionsDefinition defaultMenuOptionsDefinition = null;
            ListIterator elementProxiesIter = elementProxies.listIterator();
            while (elementProxiesIter.hasNext())
            {
                Node elementProxy = (Node)elementProxiesIter.next();
                MenuElement menuElement = null;

                // convert folders into nested menus if depth specified
                // with no paths expansion, (negative depth values are
                // interpreted as complete menu expansion)
                if ((elementProxy instanceof Folder) && ((depth < 0) || (depth > 1)) && !paths)
                {
                    // construct menu definition and associated menu
                    MenuDefinition nestedMenuDefinition = new DefaultMenuDefinition(elementProxy.getUrl(), depth - 1, locatorName);
                    menuElement = new MenuImpl(this, nestedMenuDefinition, context, null);
                }
                else
                {
                    // construct shared default menu option definition and menu option
                    if (defaultMenuOptionsDefinition == null)
                    {
                        defaultMenuOptionsDefinition = new DefaultMenuOptionsDefinition(options, depth, paths, regexp, locatorName, order);
                    }
                    menuElement = new MenuOptionImpl(this, elementProxy, defaultMenuOptionsDefinition);
                }

                // replace element proxy with menu element
View Full Code Here

                    parentNode = parentNode.getParent();
                }
            }
           
            // convert elements views into menu elements
            DefaultMenuOptionsDefinition defaultMenuOptionsDefinition = null;
            ListIterator elementViewsIter = elementViews.listIterator();
            while (elementViewsIter.hasNext())
            {
                Node elementView = (Node)elementViewsIter.next();
                MenuElement menuElement = null;

                // convert folders into nested menus if depth specified
                // with no paths expansion, (negative depth values are
                // interpreted as complete menu expansion)
                if ((elementView instanceof Folder) && ((depth < 0) || (depth > 1)) && !paths)
                {
                    // construct menu definition and associated menu
                    MenuDefinition nestedMenuDefinition = new DefaultMenuDefinition(elementView.getUrl(), depth - 1, locatorName);
                    menuElement = new MenuImpl(view, this, nestedMenuDefinition, null, context, null);
                }
                else
                {
                    // construct shared default menu option definition and menu option
                    if (defaultMenuOptionsDefinition == null)
                    {
                        defaultMenuOptionsDefinition = new DefaultMenuOptionsDefinition(options, depth, paths, regexp, locatorName, order);
                    }
                    menuElement = new MenuOptionImpl(view, this, elementView, defaultMenuOptionsDefinition);
                }

                // replace element view with menu element
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portalsite.menu.DefaultMenuOptionsDefinition

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.