📄 turbineresourceservice.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:08 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class TurbineResourceService</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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="class-use/TurbineResourceService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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/turbine/services/resources/TurbineResources.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="TurbineResourceService.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_org.apache.turbine.services.BaseService">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: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.services.resources</FONT><BR>Class TurbineResourceService</H2><PRE>java.lang.Object | +--<A HREF="../../../../../org/apache/turbine/services/BaseInitable.html">org.apache.turbine.services.BaseInitable</A> | +--<A HREF="../../../../../org/apache/turbine/services/BaseService.html">org.apache.turbine.services.BaseService</A> | +--<A HREF="../../../../../org/apache/turbine/services/TurbineBaseService.html">org.apache.turbine.services.TurbineBaseService</A> | +--<B>org.apache.turbine.services.resources.TurbineResourceService</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/turbine/services/Initable.html">Initable</A>, <A HREF="../../../../../org/apache/turbine/services/resources/ResourceService.html">ResourceService</A>, <A HREF="../../../../../org/apache/turbine/services/Service.html">Service</A></DD></DL><HR><DL><DT>public class <B>TurbineResourceService</B><DT>extends <A HREF="../../../../../org/apache/turbine/services/TurbineBaseService.html">TurbineBaseService</A><DT>implements <A HREF="../../../../../org/apache/turbine/services/resources/ResourceService.html">ResourceService</A></DL><P><p>This implementation of the <code>resourcesService</code> relies on an external properties file for storing the configuration keys and values.</p> <P>In order to be compatible with legacy applications, this implementation kept a static method for initializing the service, so it's still possible to write the following code: <p><code> TurbineResourceService.setPropertiesName("d:/conf/Turbine.properties"); Vector myVar = TurbineResources.getVector("myvar"); </code></p> <p>The new way to do things is to look at the org.apache.turbine.util.TurbineConfig class.</p><P><DL><DT><B>Version: </B><DD>$Id: TurbineResourceService.java,v 1.11 2002/08/15 08:16:24 henning Exp $</DD><DT><B>Author: </B><DD><a href="mailto:jm@mediaphil.de">Jonas Maurus</a>, <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>, <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>, <a href="mailto:luta.raphael@networks.vivendi.net">Rapha雔 Luta</a>, <a href="mailto:jvanzyl@periapt.com@">Jason van Zyl</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_org.apache.turbine.services.BaseService"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.apache.turbine.services.<A HREF="../../../../../org/apache/turbine/services/BaseService.html">BaseService</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/BaseService.html#configuration">configuration</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#name">name</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#properties">properties</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#serviceBroker">serviceBroker</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_org.apache.turbine.services.BaseInitable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.apache.turbine.services.<A HREF="../../../../../org/apache/turbine/services/BaseInitable.html">BaseInitable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/BaseInitable.html#initableBroker">initableBroker</A>, <A HREF="../../../../../org/apache/turbine/services/BaseInitable.html#isInitialized">isInitialized</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_org.apache.turbine.services.resources.ResourceService"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface org.apache.turbine.services.resources.<A HREF="../../../../../org/apache/turbine/services/resources/ResourceService.html">ResourceService</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/resources/ResourceService.html#SERVICE_NAME">SERVICE_NAME</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#TurbineResourceService()">TurbineResourceService</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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/turbine/services/resources/TurbineResourceService.html#getBoolean(java.lang.String)">getBoolean</A></B>(java.lang.String name)</CODE><BR> The purpose of this method is to get the configuration resource with the given name as a boolean value.</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/turbine/services/resources/TurbineResourceService.html#getBoolean(java.lang.String, boolean)">getBoolean</A></B>(java.lang.String name, boolean def)</CODE><BR> The purppose of this method is to get the configuration resource with the given name as a boolean value, or a default value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> org.apache.commons.configuration.Configuration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#getConfiguration()">getConfiguration</A></B>()</CODE><BR> Wrapper around the configuration resources.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> org.apache.commons.configuration.Configuration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#getConfiguration(java.lang.String)">getConfiguration</A></B>(java.lang.String prefix)</CODE><BR> The purpose of this method is to extract a subset of configuraton resources sharing a common name prefix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#getDouble(java.lang.String)">getDouble</A></B>(java.lang.String name)</CODE><BR> The purpose of this method is to get the configuration resource with the given name as a double.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#getDouble(java.lang.String, double)">getDouble</A></B>(java.lang.String name, double def)</CODE><BR> The purpose of this method is to get the configuration resource with the given name as a double, or a default value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#getFloat(java.lang.String)">getFloat</A></B>(java.lang.String name)</CODE><BR> The purpose of this method is to get the configuration resource with the given name as a float.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#getFloat(java.lang.String, float)">getFloat</A></B>(java.lang.String name, float def)</CODE><BR> The purpose of this method is to get the configuration resource with the given name as a float, or a default value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html#getInt(java.lang.String)">getInt</A></B>(java.lang.String name)</CODE><BR> The purpose of this method is to get the configuration resource
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -