Package org.apache.velocity.tools.view

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


        //add and initialize request tools
        Iterator i = requestToolInfo.iterator();
        while(i.hasNext())
        {
            ToolInfo info = (ToolInfo)i.next();
            if (info instanceof ServletToolInfo)
            {
                ServletToolInfo sti = (ServletToolInfo)info;
                if (!sti.allowsRequestPath(requestPath))
                {
                    continue;
                }
            }
            toolbox.put(info.getKey(), info.getInstance(ctx));
        }

        return toolbox;
    }
View Full Code Here


        //add and initialize request tools
        Iterator i = requestToolInfo.iterator();
        while(i.hasNext())
        {
            ToolInfo info = (ToolInfo)i.next();
            if (info instanceof ServletToolInfo)
            {
                ServletToolInfo sti = (ServletToolInfo)info;
                if (!sti.allowsRequestPath(requestPath))
                {
                    continue;
                }
            }
            toolbox.put(info.getKey(), info.getInstance(ctx));
        }

        return toolbox;
    }
View Full Code Here

     */
    protected boolean readElement(Element e) throws Exception
    {
        String name = e.getName();

        ToolInfo info = null;

        if (name.equalsIgnoreCase(ELEMENT_TOOL))
        {
            info = readToolInfo(e);
        }
        else if (name.equalsIgnoreCase(ELEMENT_DATA))
        {
            info = readDataInfo(e);
        }
        else if (name.equalsIgnoreCase(ELEMENT_CREATE_SESSION))
        {
            readCreateSession(e);
            return true;
        }
        else
        {
            log("Unreadable element: "+name);
            return false;
        }

        addTool(info);
        log("Added "+info.getClassname()+" as "+info.getKey());
        return true;
    }
View Full Code Here

                    {
                        stmap = new HashMap(sessionToolInfo.size());
                        Iterator i = sessionToolInfo.iterator();
                        while(i.hasNext())
                        {
                            ToolInfo info = (ToolInfo)i.next();
                            stmap.put(info.getKey(), info.getInstance(ctx));
                        }
                        session.setAttribute(SESSION_TOOLS_KEY, stmap);
                    }

                    //add the initialized session tools 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 new ToolboxContext(toolbox);
    }
View Full Code Here

        //add and initialize request tools
        Iterator i = requestToolInfo.iterator();
        while(i.hasNext())
        {
            ToolInfo info = (ToolInfo)i.next();
            if (info instanceof ServletToolInfo)
            {
                ServletToolInfo sti = (ServletToolInfo)info;
                if (!sti.allowsRequestPath(requestPath))
                {
                    continue;
                }
            }
            toolbox.put(info.getKey(), info.getInstance(ctx));
        }

        return toolbox;
    }
View Full Code Here

        //add and initialize request tools
        Iterator i = requestToolInfo.iterator();
        while(i.hasNext())
        {
            ToolInfo info = (ToolInfo)i.next();
            if (info instanceof ServletToolInfo)
            {
                ServletToolInfo sti = (ServletToolInfo)info;
                if (!sti.allowsRequestPath(requestPath))
                {
                    continue;
                }
            }
            toolbox.put(info.getKey(), info.getInstance(ctx));
        }

        return toolbox;
    }
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 new ToolboxContext(toolbox);
    }
View Full Code Here

        //add and initialize request tools
        Iterator i = requestToolInfo.iterator();
        while(i.hasNext())
        {
            ToolInfo info = (ToolInfo)i.next();
            if (info instanceof ServletToolInfo)
            {
                ServletToolInfo sti = (ServletToolInfo)info;
                if (!sti.allowsRequestPath(requestPath))
                {
                    continue;
                }
            }
            toolbox.put(info.getKey(), info.getInstance(ctx));
        }

        return toolbox;
    }
View Full Code Here

                    {
                        stmap = new HashMap(sessionToolInfo.size());
                        Iterator i = sessionToolInfo.iterator();
                        while(i.hasNext())
                        {
                            ToolInfo info = (ToolInfo)i.next();
                            stmap.put(info.getKey(), info.getInstance(ctx));
                        }
                        session.setAttribute(SESSION_TOOLS_KEY, stmap);
                    }

                    //add the initialized session tools 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 new ToolboxContext(toolbox);
    }
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

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.