Package org.apache.velocity.tools.view

Examples of org.apache.velocity.tools.view.ToolInfo


        if ( this.toolboxManager != null && viewTools != null ) {

            Iterator<ToolInfo> toolInfoIterator = viewTools.iterator();
            while ( toolInfoIterator.hasNext() ) {

                ToolInfo toolInfo = toolInfoIterator.next();
                this.toolboxManager.removeTool( toolInfo );
                toolInfoIterator.remove();

                Logger.info( this, "Removed View Tool: " + toolInfo.getKey() );
            }
        }
    }
View Full Code Here


                        // init and store session tools map
                        stmap = new HashMap(sessionToolInfo.size());
                        Iterator i = sessionToolInfo.iterator();
                        while(i.hasNext())
                        {
                            ToolInfo ti = (ToolInfo)i.next();
                            stmap.put(ti.getKey(), ti.getInstance(ctx));
                        }
                        session.setAttribute(SESSION_TOOLS_KEY, stmap);
                    }
                    // add them to the toolbox
                    toolbox.putAll(stmap);
                }
            }
        }

        //add and initialize request tools
        Iterator i = requestToolInfo.iterator();
        while(i.hasNext())
        {
            ToolInfo info = (ToolInfo)i.next();
            toolbox.put(info.getKey(), info.getInstance(ctx));
        }

        return toolbox;
    }
View Full Code Here

        return toolbox;
    }

    public void removeTool ( ToolInfo info ) {

        ToolInfo toRemove;

        if ( info instanceof ServletToolInfo ) {

            ServletToolInfo servletToolInfo = (ServletToolInfo) info;
View Full Code Here

     * @param info
     * @return Found object
     */
    private ToolInfo searchAndCompare ( ArrayList toolInfoCollection, ToolInfo info ) {

        ToolInfo toRemove = null;
        Iterator i = toolInfoCollection.iterator();
        while ( i.hasNext() ) {
            ToolInfo info_ = (ToolInfo) i.next();
            if ( compare( info, info_ ) ) {
                toRemove = info_;
            }
        }

View Full Code Here

TOP

Related Classes of org.apache.velocity.tools.view.ToolInfo

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.