| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_171) on Wed Jun 20 14:25:32 CEST 2018 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>ViewToolContext (VelocityTools 3.0-SNAPSHOT API)</title> |
| <meta name="date" content="2018-06-20"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ViewToolContext (VelocityTools 3.0-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ViewToolContext.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/velocity/tools/view/ViewImportSupport.SafeClosingHttpURLConnectionReader.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/velocity/tools/view/ViewToolManager.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/velocity/tools/view/ViewToolContext.html" target="_top">Frames</a></li> |
| <li><a href="ViewToolContext.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#fields.inherited.from.class.org.apache.velocity.tools.ToolContext">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.velocity.tools.view</div> |
| <h2 title="Class ViewToolContext" class="title">Class ViewToolContext</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools">org.apache.velocity.tools.ToolContext</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.velocity.tools.view.ViewToolContext</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>org.apache.velocity.context.Context, <a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../org/apache/velocity/tools/view/jsp/JspToolContext.html" title="class in org.apache.velocity.tools.view.jsp">JspToolContext</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">ViewToolContext</span> |
| extends <a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools">ToolContext</a> |
| implements <a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></pre> |
| <div class="block"><p><a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools"><code>ToolContext</code></a> implementation specific to the servlet environment.</p> |
| |
| <p>It provides the following special features:</p> |
| <ul> |
| <li>puts the request, response, session, and servlet context objects |
| into the Velocity context for direct access, and keeps them |
| read-only</li> |
| <li>supports a read-only toolbox of view tools</li> |
| <li>auto-searches servlet request attributes, session attributes and |
| servlet context attribues for objects</li> |
| </ul> |
| |
| <p>The <a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#get-java.lang.String-"><code>get(String key)</code></a> method implements the following search order |
| for objects:</p> |
| <ol> |
| <li>tool in a request scoped toolbox</li> |
| <li>tool in a session scoped toolbox</li> |
| <li>tool in a application scoped toolbox</li> |
| <li>request, response, session, or servlet context</li> |
| <li>object in the local map of objects (traditional use)</li> |
| <li>request attributes, session attributes, servlet context attributes</li> |
| </ol> |
| |
| <p>The purpose of this class is to make it easy for web designer to work |
| with Java servlet based web applications. They do not need to be concerned |
| with the concepts of request, session or application attributes and the |
| lifetime of objects in these scopes.</p> |
| |
| <p>Note that the put() method always puts objects into the local map |
| and does not allow tools or servlet classes to be overridden. |
| </p></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Version:</span></dt> |
| <dd>$Id: ViewContext.java 514727 2007-03-05 16:49:03Z nbubna $</dd> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd><a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>, <a href="mailto:sidler@teamup.com">Gabe Sidler</a>, Nathan Bubna</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.velocity.tools.ToolContext"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.velocity.tools.<a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools">ToolContext</a></h3> |
| <code><a href="../../../../../org/apache/velocity/tools/ToolContext.html#CATCH_EXCEPTIONS_KEY">CATCH_EXCEPTIONS_KEY</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#CONTEXT_KEY">CONTEXT_KEY</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#ENGINE_KEY">ENGINE_KEY</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#LOCALE_KEY">LOCALE_KEY</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#LOG_KEY">LOG_KEY</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#PATH_KEY">PATH_KEY</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#TOOLKEY_KEY">TOOLKEY_KEY</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.velocity.tools.view.ViewContext"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from interface org.apache.velocity.tools.view.<a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></h3> |
| <code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#APPLICATION">APPLICATION</a>, <a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#DEFAULT_TOOLBOX_KEY">DEFAULT_TOOLBOX_KEY</a>, <a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#REQUEST">REQUEST</a>, <a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#RESPONSE">RESPONSE</a>, <a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#SERVLET_CONTEXT_KEY">SERVLET_CONTEXT_KEY</a>, <a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#SESSION">SESSION</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#ViewToolContext-org.apache.velocity.app.VelocityEngine-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-javax.servlet.ServletContext-">ViewToolContext</a></span>(org.apache.velocity.app.VelocityEngine velocity, |
| javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response, |
| javax.servlet.ServletContext application)</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#addToolboxesUnderKey-java.lang.String-">addToolboxesUnderKey</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toolboxKey)</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#containsKey-java.lang.String-">containsKey</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Indicates whether the specified key is in the context.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#get-java.lang.String-">get</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Looks up and returns the object with the specified key.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getAttribute-java.lang.String-">getAttribute</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Searches for the named attribute in request, session (if valid), |
| and application scope(s) in order and returns the value associated |
| or null.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>javax.servlet.http.HttpServletRequest</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getRequest--">getRequest</a></span>()</code> |
| <div class="block">Returns the current servlet request.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>javax.servlet.http.HttpServletResponse</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getResponse--">getResponse</a></span>()</code> |
| <div class="block">Returns the current servlet response.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getServletApi-java.lang.String-">getServletApi</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Returns the current matching servlet request, response, session, |
| or servlet context instance, or null if the key matches none of those |
| keys.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>javax.servlet.ServletContext</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getServletContext--">getServletContext</a></span>()</code> |
| <div class="block">Returns the servlet context.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>javax.servlet.http.HttpSession</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getSession--">getSession</a></span>()</code> |
| <div class="block">Returns the current session, if any.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/velocity/tools/Toolbox.html" title="class in org.apache.velocity.tools">Toolbox</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getToolboxes--">getToolboxes</a></span>()</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getToolVar-java.lang.String-">getToolVar</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Finds the automatically provided values, either configured |
| tools or servlet API objects (request, response, etc).</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getUserVar-java.lang.String-">getUserVar</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> |
| <div class="block">Finds "user" set values, either in the local context |
| or in the scoped attributes if none is in the local context.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>org.apache.velocity.context.Context</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getVelocityContext--">getVelocityContext</a></span>()</code> |
| <div class="block">Returns a reference to the Velocity context (this object).</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>org.apache.velocity.app.VelocityEngine</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getVelocityEngine--">getVelocityEngine</a></span>()</code> |
| <div class="block">Returns a reference to the VelocityEngine.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#putToolProperties--">putToolProperties</a></span>()</code> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#setToolboxKey-java.lang.String-">setToolboxKey</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.velocity.tools.ToolContext"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.velocity.tools.<a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools">ToolContext</a></h3> |
| <code><a href="../../../../../org/apache/velocity/tools/ToolContext.html#addToolbox-org.apache.velocity.tools.Toolbox-">addToolbox</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#findTool-java.lang.String-">findTool</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#getKeys--">getKeys</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#getToolbox--">getToolbox</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#getToolClassMap--">getToolClassMap</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#getToolProperties--">getToolProperties</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#getUserCanOverwriteTools--">getUserCanOverwriteTools</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#internalGet-java.lang.String-">internalGet</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#keySet--">keySet</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#put-java.lang.String-java.lang.Object-">put</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#putAll-java.util.Map-">putAll</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#putToolProperties-java.util.Map-">putToolProperties</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#putToolProperty-java.lang.String-java.lang.Object-">putToolProperty</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#putVelocityEngine-org.apache.velocity.app.VelocityEngine-">putVelocityEngine</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#remove-java.lang.String-">remove</a>, <a href="../../../../../org/apache/velocity/tools/ToolContext.html#setUserCanOverwriteTools-boolean-">setUserCanOverwriteTools</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="ViewToolContext-org.apache.velocity.app.VelocityEngine-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-javax.servlet.ServletContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ViewToolContext</h4> |
| <pre>public ViewToolContext(org.apache.velocity.app.VelocityEngine velocity, |
| javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response, |
| javax.servlet.ServletContext application)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setToolboxKey-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setToolboxKey</h4> |
| <pre>protected void setToolboxKey(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> |
| </li> |
| </ul> |
| <a name="putToolProperties--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putToolProperties</h4> |
| <pre>protected void putToolProperties()</pre> |
| </li> |
| </ul> |
| <a name="getToolboxes--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getToolboxes</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/velocity/tools/Toolbox.html" title="class in org.apache.velocity.tools">Toolbox</a>> getToolboxes()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/ToolContext.html#getToolboxes--">getToolboxes</a></code> in class <code><a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools">ToolContext</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addToolboxesUnderKey-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addToolboxesUnderKey</h4> |
| <pre>protected void addToolboxesUnderKey(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toolboxKey)</pre> |
| </li> |
| </ul> |
| <a name="get-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> get(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> |
| <div class="block"><p>Looks up and returns the object with the specified key.</p> |
| <p>See the class documentation for more details.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>get</code> in interface <code>org.apache.velocity.context.Context</code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/ToolContext.html#get-java.lang.String-">get</a></code> in class <code><a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools">ToolContext</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - the key of the object requested</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the requested object or null if not found</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/velocity/tools/ToolContext.html#setUserCanOverwriteTools-boolean-"><code>ToolContext.setUserCanOverwriteTools(boolean)</code></a>, |
| <a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getUserVar-java.lang.String-"><code>getUserVar(java.lang.String)</code></a>, |
| <a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getToolVar-java.lang.String-"><code>getToolVar(java.lang.String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getUserVar-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUserVar</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getUserVar(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> |
| <div class="block">Finds "user" set values, either in the local context |
| or in the scoped attributes if none is in the local context.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/velocity/tools/ToolContext.html#internalGet-java.lang.String-"><code>ToolContext.internalGet(java.lang.String)</code></a>, |
| <a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getAttribute-java.lang.String-"><code>getAttribute(java.lang.String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getToolVar-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getToolVar</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getToolVar(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> |
| <div class="block">Finds the automatically provided values, either configured |
| tools or servlet API objects (request, response, etc).</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/velocity/tools/ToolContext.html#findTool-java.lang.String-"><code>ToolContext.findTool(java.lang.String)</code></a>, |
| <a href="../../../../../org/apache/velocity/tools/view/ViewToolContext.html#getServletApi-java.lang.String-"><code>getServletApi(java.lang.String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getServletApi-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServletApi</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getServletApi(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> |
| <div class="block">Returns the current matching servlet request, response, session, |
| or servlet context instance, or null if the key matches none of those |
| keys.</div> |
| </li> |
| </ul> |
| <a name="getAttribute-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttribute</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> getAttribute(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> |
| <div class="block"><p>Searches for the named attribute in request, session (if valid), |
| and application scope(s) in order and returns the value associated |
| or null.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#getAttribute-java.lang.String-">getAttribute</a></code> in interface <code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></code></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>VelocityTools 1.1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRequest--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRequest</h4> |
| <pre>public javax.servlet.http.HttpServletRequest getRequest()</pre> |
| <div class="block"><p>Returns the current servlet request.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#getRequest--">getRequest</a></code> in interface <code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getResponse--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResponse</h4> |
| <pre>public javax.servlet.http.HttpServletResponse getResponse()</pre> |
| <div class="block"><p>Returns the current servlet response.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#getResponse--">getResponse</a></code> in interface <code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSession--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSession</h4> |
| <pre>public javax.servlet.http.HttpSession getSession()</pre> |
| <div class="block"><p>Returns the current session, if any.</p></div> |
| </li> |
| </ul> |
| <a name="getServletContext--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServletContext</h4> |
| <pre>public javax.servlet.ServletContext getServletContext()</pre> |
| <div class="block"><p>Returns the servlet context.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#getServletContext--">getServletContext</a></code> in interface <code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getVelocityContext--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVelocityContext</h4> |
| <pre>public org.apache.velocity.context.Context getVelocityContext()</pre> |
| <div class="block"><p>Returns a reference to the Velocity context (this object).</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#getVelocityContext--">getVelocityContext</a></code> in interface <code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getVelocityEngine--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVelocityEngine</h4> |
| <pre>public org.apache.velocity.app.VelocityEngine getVelocityEngine()</pre> |
| <div class="block"><p>Returns a reference to the VelocityEngine.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html#getVelocityEngine--">getVelocityEngine</a></code> in interface <code><a href="../../../../../org/apache/velocity/tools/view/ViewContext.html" title="interface in org.apache.velocity.tools.view">ViewContext</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="containsKey-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>containsKey</h4> |
| <pre>public boolean containsKey(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> |
| <div class="block">Indicates whether the specified key is in the context.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>containsKey</code> in interface <code>org.apache.velocity.context.Context</code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/velocity/tools/ToolContext.html#containsKey-java.lang.String-">containsKey</a></code> in class <code><a href="../../../../../org/apache/velocity/tools/ToolContext.html" title="class in org.apache.velocity.tools">ToolContext</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The key to look for.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether the key is in the context.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ViewToolContext.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/velocity/tools/view/ViewImportSupport.SafeClosingHttpURLConnectionReader.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/velocity/tools/view/ViewToolManager.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/velocity/tools/view/ViewToolContext.html" target="_top">Frames</a></li> |
| <li><a href="ViewToolContext.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#fields.inherited.from.class.org.apache.velocity.tools.ToolContext">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2002–2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |