<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0_14) on Mon Apr 26 10:16:13 PDT 2010 --> | |
<TITLE> | |
SafeConfig (VelocityTools 2.0 Documentation) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.velocity.tools.generic.SafeConfig class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="SafeConfig (VelocityTools 2.0 Documentation)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/velocity/tools/generic/ResourceTool.Key.html" title="class in org.apache.velocity.tools.generic"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/velocity/tools/generic/SortTool.html" title="class in org.apache.velocity.tools.generic"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/velocity/tools/generic/SafeConfig.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="SafeConfig.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.velocity.tools.generic</FONT> | |
<BR> | |
Class SafeConfig</H2> | |
<PRE> | |
java.lang.Object | |
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.velocity.tools.generic.SafeConfig</B> | |
</PRE> | |
<DL> | |
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/velocity/tools/generic/AbstractLockConfig.html" title="class in org.apache.velocity.tools.generic">AbstractLockConfig</A>, <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/ContextTool.html" title="class in org.apache.velocity.tools.generic">ContextTool</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/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/MarkupTool.html" title="class in org.apache.velocity.tools.generic">MarkupTool</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/generic/XmlTool.html" title="class in org.apache.velocity.tools.generic">XmlTool</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>SafeConfig</B><DT>extends java.lang.Object</DL> | |
</PRE> | |
<P> | |
<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> | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 2.0</DD> | |
<DT><B>Author:</B></DT> | |
<DD>Nathan Bubna</DD> | |
</DL> | |
<HR> | |
<P> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<A NAME="field_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Field Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configLocked">configLocked</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOCK_CONFIG_KEY">LOCK_CONFIG_KEY</A></B></CODE> | |
<BR> | |
The key used for specifying whether or not to prevent templates | |
from reconfiguring this tool.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#OLD_LOCK_CONFIG_KEY">OLD_LOCK_CONFIG_KEY</A></B></CODE> | |
<BR> | |
<B>Deprecated.</B> </TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#SAFE_MODE_KEY">SAFE_MODE_KEY</A></B></CODE> | |
<BR> | |
Many tools interested in locking configure() also have other | |
things they wish to secure.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#safeMode">safeMode</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#SafeConfig()">SafeConfig</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure(java.util.Map)">configure</A></B>(java.util.Map params)</CODE> | |
<BR> | |
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.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure(org.apache.velocity.tools.generic.ValueParser)">configure</A></B>(<A HREF="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</A> values)</CODE> | |
<BR> | |
Does the actual configuration.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked()">isConfigLocked</A></B>()</CODE> | |
<BR> | |
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.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isSafeMode()">isSafeMode</A></B>()</CODE> | |
<BR> | |
Returns <code>true</code> if this tool is in "safe mode".</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setLockConfig(boolean)">setLockConfig</A></B>(boolean lock)</CODE> | |
<BR> | |
Only allow subclass access to this.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setSafeMode(boolean)">setSafeMode</A></B>(boolean safe)</CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ FIELD DETAIL =========== --> | |
<A NAME="field_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Field Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="LOCK_CONFIG_KEY"><!-- --></A><H3> | |
LOCK_CONFIG_KEY</H3> | |
<PRE> | |
public static final java.lang.String <B>LOCK_CONFIG_KEY</B></PRE> | |
<DL> | |
<DD>The key used for specifying whether or not to prevent templates | |
from reconfiguring this tool. The default is true. | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.tools.generic.SafeConfig.LOCK_CONFIG_KEY">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="OLD_LOCK_CONFIG_KEY"><!-- --></A><H3> | |
OLD_LOCK_CONFIG_KEY</H3> | |
<PRE> | |
<FONT SIZE="-1">@Deprecated | |
</FONT>public static final java.lang.String <B>OLD_LOCK_CONFIG_KEY</B></PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.tools.generic.SafeConfig.OLD_LOCK_CONFIG_KEY">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="SAFE_MODE_KEY"><!-- --></A><H3> | |
SAFE_MODE_KEY</H3> | |
<PRE> | |
public static final java.lang.String <B>SAFE_MODE_KEY</B></PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.tools.generic.SafeConfig.SAFE_MODE_KEY">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="configLocked"><!-- --></A><H3> | |
configLocked</H3> | |
<PRE> | |
private boolean <B>configLocked</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="safeMode"><!-- --></A><H3> | |
safeMode</H3> | |
<PRE> | |
private boolean <B>safeMode</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="SafeConfig()"><!-- --></A><H3> | |
SafeConfig</H3> | |
<PRE> | |
public <B>SafeConfig</B>()</PRE> | |
<DL> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="setLockConfig(boolean)"><!-- --></A><H3> | |
setLockConfig</H3> | |
<PRE> | |
protected void <B>setLockConfig</B>(boolean lock)</PRE> | |
<DL> | |
<DD>Only allow subclass access to this. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSafeMode(boolean)"><!-- --></A><H3> | |
setSafeMode</H3> | |
<PRE> | |
protected void <B>setSafeMode</B>(boolean safe)</PRE> | |
<DL> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isConfigLocked()"><!-- --></A><H3> | |
isConfigLocked</H3> | |
<PRE> | |
public boolean <B>isConfigLocked</B>()</PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isSafeMode()"><!-- --></A><H3> | |
isSafeMode</H3> | |
<PRE> | |
public boolean <B>isSafeMode</B>()</PRE> | |
<DL> | |
<DD>Returns <code>true</code> if this tool is in "safe mode". | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="configure(java.util.Map)"><!-- --></A><H3> | |
configure</H3> | |
<PRE> | |
public void <B>configure</B>(java.util.Map params)</PRE> | |
<DL> | |
<DD>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>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="configure(org.apache.velocity.tools.generic.ValueParser)"><!-- --></A><H3> | |
configure</H3> | |
<PRE> | |
protected void <B>configure</B>(<A HREF="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</A> values)</PRE> | |
<DL> | |
<DD>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. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/velocity/tools/generic/ResourceTool.Key.html" title="class in org.apache.velocity.tools.generic"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/velocity/tools/generic/SortTool.html" title="class in org.apache.velocity.tools.generic"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/velocity/tools/generic/SafeConfig.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="SafeConfig.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright (c) 2003-2007 Apache Software Foundation | |
</BODY> | |
</HTML> |