📄 resourceservice.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: Interface ResourceService</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/ResourceService.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"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="ResourceService.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <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>Interface ResourceService</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/apache/turbine/services/Initable.html">Initable</A>, <A HREF="../../../../../org/apache/turbine/services/Service.html">Service</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/turbine/services/resources/TurbineResourceService.html">TurbineResourceService</A></DD></DL><HR><DL><DT>public interface <B>ResourceService</B><DT>extends <A HREF="../../../../../org/apache/turbine/services/Service.html">Service</A></DL><P><p>This service define a resource interface for accessing the configuration information of the application.</p> <p>Since implementations of this service are used by Turbine itself and the <code>TurbineServices</code> depends on their proper operation, they must respect some specific implementation rules:</p> <ul> <li>They can't use other services or classes depending on any services in their inititialization code. This would create circular services dependency </li> <li>They must provide an early initialization init method. The <code>ServletConfig</code> init parameters are the only way to retrieve parameters for this service. It's impossible to use TurbineServices utility methods for this purpose </li> </ul><P><DL><DT><B>Version: </B><DD>$Id: ResourceService.java,v 1.6 2002/08/14 16:51:08 henning Exp $</DD><DT><B>Author: </B><DD><a href="mailto:jon@clearink.com">Jon S. Stevens</a>, <a href="mailto:greg@shwoop.com">Greg Ritter</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="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></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/turbine/services/resources/ResourceService.html#SERVICE_NAME">SERVICE_NAME</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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/ResourceService.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/ResourceService.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/ResourceService.html#getConfiguration(java.lang.String)">getConfiguration</A></B>(java.lang.String prefix)</CODE><BR> The purpose of this method is to extract a subset configuration 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/ResourceService.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/ResourceService.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/ResourceService.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/ResourceService.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/ResourceService.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 with the given name as an integer.</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/ResourceService.html#getInt(java.lang.String, int)">getInt</A></B>(java.lang.String name, int def)</CODE><BR> The purpose of this method is to get the configuration resource with the given name as an integer, or a default value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Iterator</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/ResourceService.html#getKeys()">getKeys</A></B>()</CODE><BR> Get the list of the keys contained in the configuration repository.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Iterator</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/ResourceService.html#getKeys(java.lang.String)">getKeys</A></B>(java.lang.String prefix)</CODE><BR> Get the list of the keys contained in the configuration repository that match the specified prefix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/resources/ResourceService.html#getLong(java.lang.String)">getLong</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 long.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -