⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i18nfactoryset.html

📁 struts api,学习使用struts必备的文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
I18nFactorySet</H3>
<PRE>
public <B>I18nFactorySet</B>(javax.servlet.ServletContext&nbsp;servletContext,                      java.util.Map&nbsp;properties)               throws <A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></PRE>
<DL>
<DD>Constructor. Init the factory by reading appropriate configuration file.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - Servlet context.<DD><CODE>properties</CODE> - Map containing all properties.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/FactoryNotFoundException.html">FactoryNotFoundException</A></CODE> - Can't find factory configuration file.</DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="initFactory(javax.servlet.ServletContext, java.util.Map)"><!-- --></A><H3>
initFactory</H3>
<PRE>
public void <B>initFactory</B>(javax.servlet.ServletContext&nbsp;servletContext,                        java.util.Map&nbsp;properties)                 throws <A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></PRE>
<DL>
<DD>Initialization method. Init the factory by reading appropriate configuration file. This method is called exactly once immediately after factory creation in case of internal creation (by DefinitionUtil).<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html#initFactory(javax.servlet.ServletContext, java.util.Map)">initFactory</A></CODE> in class <CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html">FactorySet</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - Servlet Context passed to newly created factory.<DD><CODE>properties</CODE> - Map of name/property passed to newly created factory. Map can contains more properties than requested.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></CODE> - An error occur during initialization.</DL>
</DD>
</DL>
<HR>

<A NAME="initFactory(javax.servlet.ServletContext, java.lang.String)"><!-- --></A><H3>
initFactory</H3>
<PRE>
protected void <B>initFactory</B>(javax.servlet.ServletContext&nbsp;servletContext,                           java.lang.String&nbsp;proposedFilename)                    throws <A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A>,                           java.io.FileNotFoundException</PRE>
<DL>
<DD>Initialization method. Init the factory by reading appropriate configuration file. This method is called exactly once immediately after factory creation in case of internal creation (by DefinitionUtil).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - Servlet Context passed to newly created factory.<DD><CODE>proposedFilename</CODE> - File names, comma separated, to use as  base file names.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></CODE> - An error occur during initialization.</DL>
</DD>
</DL>
<HR>

<A NAME="getDefaultFactory()"><!-- --></A><H3>
getDefaultFactory</H3>
<PRE>
protected <A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/DefinitionsFactory.html">DefinitionsFactory</A> <B>getDefaultFactory</B>()</PRE>
<DL>
<DD>Get default factory.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html#getDefaultFactory()">getDefaultFactory</A></CODE> in class <CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html">FactorySet</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Default factory</DL>
</DD>
</DL>
<HR>

<A NAME="createDefaultFactory(javax.servlet.ServletContext)"><!-- --></A><H3>
createDefaultFactory</H3>
<PRE>
protected <A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/DefinitionsFactory.html">DefinitionsFactory</A> <B>createDefaultFactory</B>(javax.servlet.ServletContext&nbsp;servletContext)                                           throws <A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A>,                                                  java.io.FileNotFoundException</PRE>
<DL>
<DD>Create default factory . Create InstancesMapper for specified Locale. If creation failes, use default mapper and log error message.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - Current servlet context. Used to open file.<DT><B>Returns:</B><DD>Created default definition factory.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></CODE> - If an error occur while creating factory.<DD><CODE>java.io.FileNotFoundException</CODE> - if factory can't be loaded from filenames.</DL>
</DD>
</DL>
<HR>

<A NAME="getDefinitionsFactoryKey(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext)"><!-- --></A><H3>
getDefinitionsFactoryKey</H3>
<PRE>
protected java.lang.Object <B>getDefinitionsFactoryKey</B>(java.lang.String&nbsp;name,                                                    javax.servlet.ServletRequest&nbsp;request,                                                    javax.servlet.ServletContext&nbsp;servletContext)</PRE>
<DL>
<DD>Extract key that will be used to get the sub factory.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html#getDefinitionsFactoryKey(java.lang.String, javax.servlet.ServletRequest, javax.servlet.ServletContext)">getDefinitionsFactoryKey</A></CODE> in class <CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html">FactorySet</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of requested definition<DD><CODE>request</CODE> - Current servlet request.<DD><CODE>servletContext</CODE> - Current servlet context.<DT><B>Returns:</B><DD>the key or <code>null</code> if not found.</DL>
</DD>
</DL>
<HR>

<A NAME="createFactory(java.lang.Object, javax.servlet.ServletRequest, javax.servlet.ServletContext)"><!-- --></A><H3>
createFactory</H3>
<PRE>
protected <A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/DefinitionsFactory.html">DefinitionsFactory</A> <B>createFactory</B>(java.lang.Object&nbsp;key,                                           javax.servlet.ServletRequest&nbsp;request,                                           javax.servlet.ServletContext&nbsp;servletContext)                                    throws <A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></PRE>
<DL>
<DD>Create a factory for specified key. If creation failes, return default factory and log an error message.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html#createFactory(java.lang.Object, javax.servlet.ServletRequest, javax.servlet.ServletContext)">createFactory</A></CODE> in class <CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html">FactorySet</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key.<DD><CODE>request</CODE> - Servlet request.<DD><CODE>servletContext</CODE> - Servlet context.<DT><B>Returns:</B><DD>Definition factory for specified key.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></CODE> - If an error occur while creating factory.</DL>
</DD>
</DL>
<HR>

<A NAME="calculateSuffixes(java.util.Locale)"><!-- --></A><H3>
calculateSuffixes</H3>
<PRE>
private java.util.List <B>calculateSuffixes</B>(java.util.Locale&nbsp;locale)</PRE>
<DL>
<DD>Calculate the suffixes based on the locale.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>locale</CODE> - the locale</DL>
</DD>
</DL>
<HR>

<A NAME="parseXmlFiles(javax.servlet.ServletContext, java.lang.String, org.apache.struts.tiles.xmlDefinition.XmlDefinitionsSet)"><!-- --></A><H3>
parseXmlFiles</H3>
<PRE>
private <A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet.html">XmlDefinitionsSet</A> <B>parseXmlFiles</B>(javax.servlet.ServletContext&nbsp;servletContext,                                        java.lang.String&nbsp;postfix,                                        <A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet.html">XmlDefinitionsSet</A>&nbsp;xmlDefinitions)                                 throws <A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></PRE>
<DL>
<DD>Parse files associated to postix if they exist. For each name in filenames, append postfix before file extension, then try to load the corresponding file. If file doesn't exist, try next one. Each file description is added to the XmlDefinitionsSet description. The XmlDefinitionsSet description is created only if there is a definition file. Inheritance is not resolved in the returned XmlDefinitionsSet. If no description file can be opened and no definiion set is provided, return <code>null</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>postfix</CODE> - Postfix to add to each description file.<DD><CODE>xmlDefinitions</CODE> - Definitions set to which definitions will be added. If <code>null</code>, a definitions set is created on request.<DT><B>Returns:</B><DD>XmlDefinitionsSet The definitions set created or passed as parameter.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></CODE> - On errors parsing file.</DL>
</DD>
</DL>
<HR>

<A NAME="parseXmlFile(javax.servlet.ServletContext, java.lang.String, org.apache.struts.tiles.xmlDefinition.XmlDefinitionsSet)"><!-- --></A><H3>
parseXmlFile</H3>
<PRE>
private <A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet.html">XmlDefinitionsSet</A> <B>parseXmlFile</B>(javax.servlet.ServletContext&nbsp;servletContext,                                       java.lang.String&nbsp;filename,                                       <A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/XmlDefinitionsSet.html">XmlDefinitionsSet</A>&nbsp;xmlDefinitions)                                throws <A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></PRE>
<DL>
<DD>Parse specified xml file and add definition to specified definitions set. This method is used to load several description files in one instances list. If filename exists and definition set is <code>null</code>, create a new set. Otherwise, return passed definition set (can be <code>null</code>).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - Current servlet context. Used to open file.<DD><CODE>filename</CODE> - Name of file to parse.<DD><CODE>xmlDefinitions</CODE> - Definitions set to which definitions will be added. If null, a definitions set is created on request.<DT><B>Returns:</B><DD>XmlDefinitionsSet The definitions set created or passed as parameter.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/DefinitionsFactoryException.html">DefinitionsFactoryException</A></CODE> - On errors parsing file.</DL>
</DD>
</DL>
<HR>

<A NAME="concatPostfix(java.lang.String, java.lang.String)"><!-- --></A><H3>
concatPostfix</H3>
<PRE>
private java.lang.String <B>concatPostfix</B>(java.lang.String&nbsp;name,                                       java.lang.String&nbsp;postfix)</PRE>
<DL>
<DD>Concat postfix to the name. Take care of existing filename extension. Transform the given name "name.ext" to have "name" + "postfix" + "ext". If there is no ext, return "name" + "postfix".<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - Filename.<DD><CODE>postfix</CODE> - Postfix to add.<DT><B>Returns:</B><DD>Concatenated filename.</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Return String representation.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html">FactorySet</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>String representation.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/I18nFactorySet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/FactorySet.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/struts/tiles/xmlDefinition/XmlAttribute.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="I18nFactorySet.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -