blob: 48004bebebda2def5cdfe633a7a5efaa28b0a52e [file] [log] [blame]
<!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:31 CEST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SafeConfig (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="SafeConfig (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};
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/SafeConfig.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/generic/ResourceTool.Key.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/velocity/tools/generic/SortTool.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/velocity/tools/generic/SafeConfig.html" target="_top">Frames</a></li>
<li><a href="SafeConfig.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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.generic</div>
<h2 title="Class SafeConfig" class="title">Class SafeConfig</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>org.apache.velocity.tools.generic.SafeConfig</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/velocity/tools/generic/AlternatorTool.html" title="class in org.apache.velocity.tools.generic">AlternatorTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/ClassTool.html" title="class in org.apache.velocity.tools.generic">ClassTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/CollectionTool.html" title="class in org.apache.velocity.tools.generic">CollectionTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/ContextTool.html" title="class in org.apache.velocity.tools.generic">ContextTool</a>, <a href="../../../../../org/apache/velocity/tools/view/CookieTool.html" title="class in org.apache.velocity.tools.view">CookieTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/EscapeTool.html" title="class in org.apache.velocity.tools.generic">EscapeTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/FieldTool.html" title="class in org.apache.velocity.tools.generic">FieldTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/ImportSupport.html" title="class in org.apache.velocity.tools.generic">ImportSupport</a>, <a href="../../../../../org/apache/velocity/tools/generic/ImportTool.html" title="class in org.apache.velocity.tools.generic">ImportTool</a>, <a href="../../../../../org/apache/velocity/tools/view/IncludeTool.html" title="class in org.apache.velocity.tools.view">IncludeTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/LinkTool.html" title="class in org.apache.velocity.tools.generic">LinkTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html" title="class in org.apache.velocity.tools.generic">LocaleConfig</a>, <a href="../../../../../org/apache/velocity/tools/generic/LogTool.html" title="class in org.apache.velocity.tools.generic">LogTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/LoopTool.html" title="class in org.apache.velocity.tools.generic">LoopTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/MarkupTool.html" title="class in org.apache.velocity.tools.generic">MarkupTool</a>, <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html" title="class in org.apache.velocity.tools.view">PagerTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/RenderTool.html" title="class in org.apache.velocity.tools.generic">RenderTool</a>, <a href="../../../../../org/apache/velocity/tools/view/UiDependencyTool.html" title="class in org.apache.velocity.tools.view">UiDependencyTool</a>, <a href="../../../../../org/apache/velocity/tools/generic/XmlTool.html" title="class in org.apache.velocity.tools.generic">XmlTool</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">SafeConfig</span>
extends <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></pre>
<div class="block"><p>Implements common logic and constants for tools which automatically
locks down the <code>public void configure(Map params)</code> method after
it is called once.
This keeps application or session scoped tools thread-safe in templates,
which generally have access to the tool after configuration has happened.
</p><p>
It also provides for a separate "safe mode" setting which tells
tools to block any functions that may pose a security threat. This,
of course, is set to <code>true</code> by default.
</p><p>
Once "locked down", the <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-java.util.Map-"><code>configure(Map)</code></a> may still be called,
however it will do nothing (unless some subclass is foolish enough to
override it and not check if <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked--"><code>isConfigLocked()</code></a> before changing
configurations. The proper method for subclasses to override is
<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-org.apache.velocity.tools.generic.ValueParser-"><code>configure(ValueParser)</code></a> which will only be called by
<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-java.util.Map-"><code>configure(Map)</code></a> when the <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked--"><code>isConfigLocked()</code></a> is false
(i.e. the first time only).
</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>VelocityTools 2.0</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>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>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOCK_CONFIG_KEY">LOCK_CONFIG_KEY</a></span></code>
<div class="block">The key used for specifying whether or not to prevent templates
from reconfiguring this tool.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected org.slf4j.Logger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#log">log</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOGGER_NAME_KEY">LOGGER_NAME_KEY</a></span></code>
<div class="block">Key used to explicitely specify the logger name</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#SAFE_MODE_KEY">SAFE_MODE_KEY</a></span></code>
<div class="block">Many tools interested in locking configure() also have other
things they wish to secure.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#USE_CLASS_LOGGER_KEY">USE_CLASS_LOGGER_KEY</a></span></code>
<div class="block">Key used to specify whether or not tools shall use loggers
named after the tools classes.</div>
</td>
</tr>
</table>
</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">&nbsp;</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/generic/SafeConfig.html#SafeConfig--">SafeConfig</a></span>()</code>&nbsp;</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-java.util.Map-">configure</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;params)</code>
<div class="block">If <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked--"><code>isConfigLocked()</code></a> returns <code>true</code>, then this method
does nothing; otherwise, if <code>false</code>, this will create a new
<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic"><code>ValueParser</code></a> from the specified Map of params and call
<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-org.apache.velocity.tools.generic.ValueParser-"><code>configure(ValueParser)</code></a> with it.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-org.apache.velocity.tools.generic.ValueParser-">configure</a></span>(<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</a>&nbsp;values)</code>
<div class="block">Does the actual configuration.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected org.slf4j.Logger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#getLog--">getLog</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#initLogger-org.apache.velocity.tools.generic.ValueParser-">initLogger</a></span>(<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</a>&nbsp;params)</code>
<div class="block">Initialize logger.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked--">isConfigLocked</a></span>()</code>
<div class="block">Returns <code>true</code> if the <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-java.util.Map-"><code>configure(Map)</code></a> method
has been locked.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isSafeMode--">isSafeMode</a></span>()</code>
<div class="block">Returns <code>true</code> if this tool is in "safe mode".</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setLockConfig-boolean-">setLockConfig</a></span>(boolean&nbsp;lock)</code>
<div class="block">Only allow subclass access to this.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setSafeMode-boolean-">setSafeMode</a></span>(boolean&nbsp;safe)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="LOCK_CONFIG_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOCK_CONFIG_KEY</h4>
<pre>public static final&nbsp;<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> LOCK_CONFIG_KEY</pre>
<div class="block">The key used for specifying whether or not to prevent templates
from reconfiguring this tool. The default is true.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.SafeConfig.LOCK_CONFIG_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SAFE_MODE_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAFE_MODE_KEY</h4>
<pre>public static final&nbsp;<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> SAFE_MODE_KEY</pre>
<div class="block">Many tools interested in locking configure() also have other
things they wish to secure. This key controls that property.
The default value is true, of course.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.SafeConfig.SAFE_MODE_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LOGGER_NAME_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOGGER_NAME_KEY</h4>
<pre>public static final&nbsp;<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> LOGGER_NAME_KEY</pre>
<div class="block">Key used to explicitely specify the logger name</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.SafeConfig.LOGGER_NAME_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="USE_CLASS_LOGGER_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>USE_CLASS_LOGGER_KEY</h4>
<pre>public static final&nbsp;<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> USE_CLASS_LOGGER_KEY</pre>
<div class="block">Key used to specify whether or not tools shall use loggers
named after the tools classes.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.SafeConfig.USE_CLASS_LOGGER_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="log">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>log</h4>
<pre>protected&nbsp;org.slf4j.Logger log</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="SafeConfig--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SafeConfig</h4>
<pre>public&nbsp;SafeConfig()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setLockConfig-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLockConfig</h4>
<pre>protected&nbsp;void&nbsp;setLockConfig(boolean&nbsp;lock)</pre>
<div class="block">Only allow subclass access to this.</div>
</li>
</ul>
<a name="setSafeMode-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSafeMode</h4>
<pre>protected&nbsp;void&nbsp;setSafeMode(boolean&nbsp;safe)</pre>
</li>
</ul>
<a name="isConfigLocked--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isConfigLocked</h4>
<pre>public&nbsp;boolean&nbsp;isConfigLocked()</pre>
<div class="block">Returns <code>true</code> if the <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-java.util.Map-"><code>configure(Map)</code></a> method
has been locked.</div>
</li>
</ul>
<a name="isSafeMode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSafeMode</h4>
<pre>public&nbsp;boolean&nbsp;isSafeMode()</pre>
<div class="block">Returns <code>true</code> if this tool is in "safe mode".</div>
</li>
</ul>
<a name="configure-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>configure</h4>
<pre>public&nbsp;void&nbsp;configure(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;params)</pre>
<div class="block">If <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked--"><code>isConfigLocked()</code></a> returns <code>true</code>, then this method
does nothing; otherwise, if <code>false</code>, this will create a new
<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic"><code>ValueParser</code></a> from the specified Map of params and call
<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-org.apache.velocity.tools.generic.ValueParser-"><code>configure(ValueParser)</code></a> with it. Then this will check
the parameters itself to find out whether or not the configuration
for this tool should be put into safe mode or have its config locked.
The safe mode value should be a boolean under the key
<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#SAFE_MODE_KEY"><code>SAFE_MODE_KEY</code></a> and the lock value should be a boolean
under the key <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOCK_CONFIG_KEY"><code>LOCK_CONFIG_KEY</code></a>.</div>
</li>
</ul>
<a name="configure-org.apache.velocity.tools.generic.ValueParser-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>configure</h4>
<pre>protected&nbsp;void&nbsp;configure(<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</a>&nbsp;values)</pre>
<div class="block">Does the actual configuration. This is protected, so
subclasses may share the same ValueParser and call configure
at any time, while preventing templates from doing so when
configure(Map) is locked.</div>
</li>
</ul>
<a name="initLogger-org.apache.velocity.tools.generic.ValueParser-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initLogger</h4>
<pre>protected&nbsp;void&nbsp;initLogger(<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</a>&nbsp;params)</pre>
<div class="block">Initialize logger. Default implementation will try to get a Velocity engine
from the configuration parameters, then try to use either the configured logger
instance, or the configured logger name suffixed by 'tools.&lt;key&gt;'</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>params</code> - configuration parameters</dd>
</dl>
</li>
</ul>
<a name="getLog--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getLog</h4>
<pre>protected&nbsp;org.slf4j.Logger&nbsp;getLog()</pre>
</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/SafeConfig.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/generic/ResourceTool.Key.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/velocity/tools/generic/SortTool.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/velocity/tools/generic/SafeConfig.html" target="_top">Frames</a></li>
<li><a href="SafeConfig.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2002&#x2013;2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>