source: sandbox/expresso-solr/solr/docs/api/org/apache/solr/schema/ExchangeRateProvider.html @ 7588

Revision 7588, 15.7 KB checked in by adir, 11 years ago (diff)

Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_24) on Mon Jun 25 15:26:25 EDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=utf-8">
7<TITLE>
8ExchangeRateProvider (Solr 4.0.0-ALPHA API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-06-25">
12
13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
14
15<SCRIPT type="text/javascript">
16function windowTitle()
17{
18    if (location.href.indexOf('is-external=true') == -1) {
19        parent.document.title="ExchangeRateProvider (Solr 4.0.0-ALPHA API)";
20    }
21}
22</SCRIPT>
23<NOSCRIPT>
24</NOSCRIPT>
25
26</HEAD>
27
28<BODY BGCOLOR="white" onload="windowTitle();">
29<HR>
30
31
32<!-- ========= START OF TOP NAVBAR ======= -->
33<A NAME="navbar_top"><!-- --></A>
34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36<TR>
37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38<A NAME="navbar_top_firstrow"><!-- --></A>
39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40  <TR ALIGN="center" VALIGN="top">
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ExchangeRateProvider.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/solr/schema/DoubleField.html" title="class in org.apache.solr.schema"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/solr/schema/ExternalFileField.html" title="class in org.apache.solr.schema"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/solr/schema/ExchangeRateProvider.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="ExchangeRateProvider.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.solr.schema</FONT>
92<BR>
93Interface ExchangeRateProvider</H2>
94<DL>
95<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/solr/schema/OpenExchangeRatesOrgProvider.html" title="class in org.apache.solr.schema">OpenExchangeRatesOrgProvider</A></DD>
96</DL>
97<HR>
98<DL>
99<DT><PRE>public interface <B>ExchangeRateProvider</B></DL>
100</PRE>
101
102<P>
103Interface for providing pluggable exchange rate providers to @CurrencyField
104<P>
105
106<P>
107<HR>
108
109<P>
110
111<!-- ========== METHOD SUMMARY =========== -->
112
113<A NAME="method_summary"><!-- --></A>
114<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
115<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
116<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
117<B>Method Summary</B></FONT></TH>
118</TR>
119<TR BGCOLOR="white" CLASS="TableRowColor">
120<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
121<CODE>&nbsp;double</CODE></FONT></TD>
122<TD><CODE><B><A HREF="../../../../org/apache/solr/schema/ExchangeRateProvider.html#getExchangeRate(java.lang.String, java.lang.String)">getExchangeRate</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;sourceCurrencyCode,
123                <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;targetCurrencyCode)</CODE>
124
125<BR>
126&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the exchange rate betwen the two given currencies</TD>
127</TR>
128<TR BGCOLOR="white" CLASS="TableRowColor">
129<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
130<CODE>&nbsp;void</CODE></FONT></TD>
131<TD><CODE><B><A HREF="../../../../org/apache/solr/schema/ExchangeRateProvider.html#inform(org.apache.lucene.analysis.util.ResourceLoader)">inform</A></B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//analyzers-common/org/apache/lucene/analysis/util/ResourceLoader.html?is-external=true" title="class or interface in org.apache.lucene.analysis.util">ResourceLoader</A>&nbsp;loader)</CODE>
132
133<BR>
134&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Passes a ResourceLoader, used to read config files from e.g.</TD>
135</TR>
136<TR BGCOLOR="white" CLASS="TableRowColor">
137<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
138<CODE>&nbsp;void</CODE></FONT></TD>
139<TD><CODE><B><A HREF="../../../../org/apache/solr/schema/ExchangeRateProvider.html#init(java.util.Map)">init</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;args)</CODE>
140
141<BR>
142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the provider by passing in a set of key/value configs as a map.</TD>
143</TR>
144<TR BGCOLOR="white" CLASS="TableRowColor">
145<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
147<TD><CODE><B><A HREF="../../../../org/apache/solr/schema/ExchangeRateProvider.html#listAvailableCurrencies()">listAvailableCurrencies</A></B>()</CODE>
148
149<BR>
150&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List all configured currency codes which are valid as source/target for this Provider</TD>
151</TR>
152<TR BGCOLOR="white" CLASS="TableRowColor">
153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154<CODE>&nbsp;boolean</CODE></FONT></TD>
155<TD><CODE><B><A HREF="../../../../org/apache/solr/schema/ExchangeRateProvider.html#reload()">reload</A></B>()</CODE>
156
157<BR>
158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask the currency provider to explicitly reload/refresh its configuration.</TD>
159</TR>
160</TABLE>
161&nbsp;
162<P>
163
164<!-- ============ METHOD DETAIL ========== -->
165
166<A NAME="method_detail"><!-- --></A>
167<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
168<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
169<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
170<B>Method Detail</B></FONT></TH>
171</TR>
172</TABLE>
173
174<A NAME="getExchangeRate(java.lang.String, java.lang.String)"><!-- --></A><H3>
175getExchangeRate</H3>
176<PRE>
177double <B>getExchangeRate</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;sourceCurrencyCode,
178                       <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;targetCurrencyCode)
179                       throws <A HREF="../../../../org/apache/solr/common/SolrException.html" title="class in org.apache.solr.common">SolrException</A></PRE>
180<DL>
181<DD>Get the exchange rate betwen the two given currencies
182<P>
183<DD><DL>
184<DT><B>Parameters:</B><DD><CODE>sourceCurrencyCode</CODE> - <DD><CODE>targetCurrencyCode</CODE> -
185<DT><B>Returns:</B><DD>the exhange rate as a double
186<DT><B>Throws:</B>
187<DD><CODE><A HREF="../../../../org/apache/solr/common/SolrException.html" title="class in org.apache.solr.common">SolrException</A></CODE> - if the rate is not defined in the provider</DL>
188</DD>
189</DL>
190<HR>
191
192<A NAME="listAvailableCurrencies()"><!-- --></A><H3>
193listAvailableCurrencies</H3>
194<PRE>
195<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt; <B>listAvailableCurrencies</B>()</PRE>
196<DL>
197<DD>List all configured currency codes which are valid as source/target for this Provider
198<P>
199<DD><DL>
200
201<DT><B>Returns:</B><DD>a Set of <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> currency code strings</DL>
202</DD>
203</DL>
204<HR>
205
206<A NAME="reload()"><!-- --></A><H3>
207reload</H3>
208<PRE>
209boolean <B>reload</B>()
210               throws <A HREF="../../../../org/apache/solr/common/SolrException.html" title="class in org.apache.solr.common">SolrException</A></PRE>
211<DL>
212<DD>Ask the currency provider to explicitly reload/refresh its configuration.
213 If this does not make sense for a particular provider, simply do nothing
214<P>
215<DD><DL>
216
217<DT><B>Returns:</B><DD>true if reload of rates succeeded, else false
218<DT><B>Throws:</B>
219<DD><CODE><A HREF="../../../../org/apache/solr/common/SolrException.html" title="class in org.apache.solr.common">SolrException</A></CODE> - if there is a problem reloading</DL>
220</DD>
221</DL>
222<HR>
223
224<A NAME="init(java.util.Map)"><!-- --></A><H3>
225init</H3>
226<PRE>
227void <B>init</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;args)</PRE>
228<DL>
229<DD>Initializes the provider by passing in a set of key/value configs as a map.
230 Note that the map also contains other fieldType parameters, so make sure to
231 avoid name clashes.
232 <p>
233 Important: Custom config params must be removed from the map before returning
234<P>
235<DD><DL>
236<DT><B>Parameters:</B><DD><CODE>args</CODE> - a @Map of key/value config params to initialize the provider</DL>
237</DD>
238</DL>
239<HR>
240
241<A NAME="inform(org.apache.lucene.analysis.util.ResourceLoader)"><!-- --></A><H3>
242inform</H3>
243<PRE>
244void <B>inform</B>(<A HREF="http://lucene.apache.org/java/4_0_0-ALPHA//analyzers-common/org/apache/lucene/analysis/util/ResourceLoader.html?is-external=true" title="class or interface in org.apache.lucene.analysis.util">ResourceLoader</A>&nbsp;loader)
245            throws <A HREF="../../../../org/apache/solr/common/SolrException.html" title="class in org.apache.solr.common">SolrException</A></PRE>
246<DL>
247<DD>Passes a ResourceLoader, used to read config files from e.g. ZooKeeper.
248 Implementations not needing resource loader can implement this as NOOP.
249 <p>Typically called after init
250<P>
251<DD><DL>
252<DT><B>Parameters:</B><DD><CODE>loader</CODE> - a @ResourceLoader instance
253<DT><B>Throws:</B>
254<DD><CODE><A HREF="../../../../org/apache/solr/common/SolrException.html" title="class in org.apache.solr.common">SolrException</A></CODE></DL>
255</DD>
256</DL>
257<!-- ========= END OF CLASS DATA ========= -->
258<HR>
259
260
261<!-- ======= START OF BOTTOM NAVBAR ====== -->
262<A NAME="navbar_bottom"><!-- --></A>
263<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
264<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
265<TR>
266<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
267<A NAME="navbar_bottom_firstrow"><!-- --></A>
268<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
269  <TR ALIGN="center" VALIGN="top">
270  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
271  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
272  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
273  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ExchangeRateProvider.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
274  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
275  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
276  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
277  </TR>
278</TABLE>
279</TD>
280<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
281</EM>
282</TD>
283</TR>
284
285<TR>
286<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
287&nbsp;<A HREF="../../../../org/apache/solr/schema/DoubleField.html" title="class in org.apache.solr.schema"><B>PREV CLASS</B></A>&nbsp;
288&nbsp;<A HREF="../../../../org/apache/solr/schema/ExternalFileField.html" title="class in org.apache.solr.schema"><B>NEXT CLASS</B></A></FONT></TD>
289<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
290  <A HREF="../../../../index.html?org/apache/solr/schema/ExchangeRateProvider.html" target="_top"><B>FRAMES</B></A>  &nbsp;
291&nbsp;<A HREF="ExchangeRateProvider.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
292&nbsp;<SCRIPT type="text/javascript">
293  <!--
294  if(window==top) {
295    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
296  }
297  //-->
298</SCRIPT>
299<NOSCRIPT>
300  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
301</NOSCRIPT>
302
303
304</FONT></TD>
305</TR>
306<TR>
307<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
308  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
309<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
310DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
311</TR>
312</TABLE>
313<A NAME="skip-navbar_bottom"></A>
314<!-- ======== END OF BOTTOM NAVBAR ======= -->
315
316<HR>
317
318          <address>Copyright &copy; 2000-2012 Apache Software Foundation.  All Rights Reserved.</address>
319          <script src='../../../../prettify.js' type='text/javascript'></script>
320          <script type='text/javascript'>
321            (function(){
322              var oldonload = window.onload;
323              if (typeof oldonload != 'function') {
324                window.onload = prettyPrint;
325              } else {
326                window.onload = function() {
327                  oldonload();
328                  prettyPrint();
329                }
330              }
331            })();
332          </script>
333       
334</BODY>
335</HTML>
Note: See TracBrowser for help on using the repository browser.