Skip to main content
This revision made April 29, 2014 12:03, by Anatole


JSR 354 - Currency and Money


Latest News

  • The JSR successfully started a second Public Review to summarize the significant changes from the first review.
  • Checkout also our new umbrella site http://javamoney.org

Introduction

This JSR focuses on defining interfaces and classes to be used for currencies and monetary amounts. Generally the following areas are focused:

  • Core This area defines the classes representing currencies and monetary amounts, as well as monetary rounding.
  • Conversion This area deals with exchange rates between currencies and provides an API/SPI to perform conversion of monetary amounts from one currency to another.
  • Format This area defines APIs/SPIs for formatting and parsing of currencies and monetary amounts, providing support for complex usage scenarios.

All this areas were implemented in the org.javamoney OSS GItHub project, the common essence finally defined what we have now as JSR 354.

Beside the latest specification you may also find useful information and examples on the JSR 354 blog http://jsr354.blogspot.ch/.

It is planned the the JSR will support both SE environments, but also ME usage scenarios should be considered as far as possible. The reference implementation probably also will include support for EE/CDI based on a flexible and adaptable SPI/bootstrap design.

Scope and Use Cases

Generally the scope of the JSR is targeting all general application types, e.g.

  • eCommerce
  • Banking and finance
  • Investment
  • Insurance and Pension
  • Mobile and Embedded Payment
  • etc.

Summarizing the scope can be defined as follows:

  • Provide abstractions for currency and money suitable for all target applications
  • Enhance, renew Currency, add support for non-ISO currencies
  • Support complex calculation rules including calculation precision and display precision
  • Support for regional rounding rules
  • Basic support for foreign exchange, extendable for more complex usage scenarios
  • A plain text representation of Money
  • Printing/Parsing to String
  • Support for pluralization
  • Provide APIs for historic access of currencies and exchange rates.
  • Define a flexible query API tu support complex usage scenarios for exchange rates and currencies
  • Storing a value in multiple currencies (a single value type that is effectively a map of currency to amount, where the amounts are all notionally the same by some form of currency conversion)
  • Large exchange rate system (as in a system suitable for trading, such as bid/ask)

Nevertheless there are some restrictions (features that are not in scope):

Further Information and Source Code Access

Difference compared to previous revision
<span>=<img align="right" src="http://asset-1.java.net/attachments/images/project/javamoney.png?20121214.f926c51"/> <br/>JSR 354 - Currency and Money<br/><br/><br/> <font><h3>Latest News</h3> <ul> <li>The JSR successfully <span style="text-decoration:line-through;color:red">fini</span>s<span style="text-decoration:line-through;color:red">h</span>=<img align="right" src="http://asset-1.java.net/attachments/images/project/javamoney.png?20121214.f926c51"/> <br/>JSR 354 - Currency and Money<br/><br/><br/> <font><h3>Latest News</h3> <ul> <li>The JSR successfully s<span style="text-decoration:underline;color:green">tart</span>ed <span style="text-decoration:underline;color:green">a second </span>ed <b><a href="http://jcp.org/en/jsr/detail?id=354">Public Review</a></b><span style="text-decoration:line-through;color:red">.</li> <li>Due</span> to <span style="text-decoration:line-through;color:red">i</span><b><a href="http://jcp.org/en/jsr/detail?id=354">Public Review</a></b> to <span style="text-decoration:underline;color:green">su</span>m<span style="text-decoration:line-through;color:red">port</span><span style="text-decoration:underline;color:green">m</span>a<span style="text-decoration:line-through;color:red">nt feedback, </span><span style="text-decoration:underline;color:green">r</span>i<span style="text-decoration:line-through;color:red">t is plann</span><span style="text-decoration:underline;color:green">z</span>e<span style="text-decoration:line-through;color:red">d</span> th<span style="text-decoration:line-through;color:red">at w</span>e <span style="text-decoration:line-through;color:red">w</span>e the <span style="text-decoration:underline;color:green">s</span>i<span style="text-decoration:line-through;color:red">ll publ</span><span style="text-decoration:underline;color:green">gn</span><span style="text-decoration:line-through;color:red">sh <b></span><span style="text-decoration:underline;color:green">fic</span>an<span style="text-decoration:line-through;color:red">o</span>t<span style="text-decoration:line-through;color:red">her</span> <span style="text-decoration:line-through;color:red">Publi</span>c<span style="text-decoration:line-through;color:red"> R</span>ant c<span style="text-decoration:underline;color:green">hang</span>e<span style="text-decoration:line-through;color:red">view</b> </span>s<span style="text-decoration:line-through;color:red">oon</span> <span style="text-decoration:line-through;color:red"> Check ou</span>es <span style="text-decoration:underline;color:green">f</span>r<span style="text-decoration:underline;color:green">om</span>r <span style="text-decoration:line-through;color:red">Gi</span>t<span style="text-decoration:line-through;color:red">Hub r</span> t<span style="text-decoration:underline;color:green">h</span>e<span style="text-decoration:line-through;color:red">po</span> f<span style="text-decoration:line-through;color:red">o</span>e f<span style="text-decoration:underline;color:green">i</span>r<span style="text-decoration:line-through;color:red"> a late</span>st <span style="text-decoration:line-through;color:red">updat</span>rst <span style="text-decoration:underline;color:green">r</span>e<span style="text-decoration:underline;color:green">view</span>.</li> <li>Checkout also our new umbrella site <a href="http://javamoney.org">http://javamoney.org</a></li> </ul> </font> ... </font> == Introduction This JSR focuses on defining interfaces and classes to be used for currencies and monetary amounts. Generally the following areas are focused: * '''Core''' This area defines the classes representing currencies and monetary amounts<span style="text-decoration:underline;color:green">, as well as monetary rounding</span>e.</li> <li>Checkout also our new umbrella site <a href="http://javamoney.org">http://javamoney.org</a></li> </ul> </font> ... This JSR focuses on defining interfaces and classes to be used for currencies and monetary amounts. Generally the following areas are focused: * '''Core''' This area defines the classes representing currencies and monetary amounts. * '''Conversion''' This area deals with exchange rates between currencies and provides an API/SPI to perform conversion of monetary amounts from one currency to another. * '''Format''' This area defines APIs/SPIs for formatting and parsing of currencies and monetary amounts, providing support for complex usage scenarios.<span style="text-decoration:line-through;color:red">* '''Extensions''' This area adds extended functionality like currency services, currency mapping, regions and validity services (historic data API). </span> <span style="text-decoration:line-through;color:red"> </span>All this areas were implemented in the org.javamoney OSS GItHub project, the common essence finally defined what we have now as JSR 354<span style="text-decoration:line-through;color:red">: * Interfaces <code>CurrencyUnit, MonetaryAmount, MonetaryAdjuster, MonetaryQuery</code> * <code>MonetaryException</code> runtime exception class</span>. <span style="text-decoration:line-through;color:red">An implementation of this small API is completely enough as a base for all the requirements above. </span>. * '''Conversion''' This area deals with exchange rates between currencies and provides an API/SPI to perform conversion of monetary amounts from one currency to another. * '''Format''' This area defines APIs/SPIs for formatting and parsing of currencies and monetary amounts, providing support for complex usage scenarios. ... Beside the latest specification you may also find useful information and examples on the JSR 354 blog [http://jsr354.blogspot.ch/]. It is planned the the JSR will support both SE environments, but also ME usage scenarios should be considered<span style="text-decoration:underline;color:green"> as far as possible</span>. The reference implementation probably also will include support for EE/CDI based on a flexible and adaptable SPI<span style="text-decoration:underline;color:green">/bootstrap</span>Beside the latest specification you may also find useful information and examples on the JSR 354 blog [http://jsr354.blogspot.ch/]. It is planned the the JSR will support both SE environments, but also ME usage scenarios should be considered. The reference implementation probably also will include support for EE/CDI based on a flexible and adaptable SPI design. ... * Non-decimal currencies [http://en.wikipedia.org/wiki/Non-decimal_currency#Contemporary_non-decimal_currencies] ==Further Information and Source Code Access * The current specification document is <span style="text-decoration:line-through;color:red">in w</span> design. ==Scope and Use Cases ... * Non-decimal currencies [http://en.wikipedia.org/wiki/Non-decimal_currency#Contemporary_non-decimal_currencies] ==Further Information and Source Code Access * The current specification document is <span style="text-decoration:underline;color:green">d</span>o<span style="text-decoration:line-through;color:red">rk - The </span><span style="text-decoration:underline;color:green">wn</span>l<span style="text-decoration:line-through;color:red">atest fr</span>o<span style="text-decoration:line-through;color:red">m EDR is loc</span>a<span style="text-decoration:line-through;color:red">tete</span>d<span style="text-decoration:line-through;color:red"> </span>a<span style="text-decoration:line-through;color:red">t [http://jcp.org/a</span>b<span style="text-decoration:line-through;color:red">outJava/communityprocess/edr/jsr354/index.htm</span>l<span style="text-decoration:line-through;color:red"> EDR], but b</span>e <span style="text-decoration:line-through;color:red">awa</span>loadable <span style="text-decoration:underline;color:green">f</span>r<span style="text-decoration:line-through;color:red">e</span><span style="text-decoration:underline;color:green">om</span> th<span style="text-decoration:line-through;color:red">at th</span>e<span style="text-decoration:line-through;color:red">re</span> <span style="text-decoration:line-through;color:red">are</span> the <span style="text-decoration:underline;color:green">JCP</span> <span style="text-decoration:line-through;color:red">a cou</span>p<span style="text-decoration:line-through;color:red">le of ch</span>a<span style="text-decoration:line-through;color:red">n</span>ge<span style="text-decoration:line-through;color:red">s not reflected in this document</span> page<span style="text-decoration:underline;color:green">.</span>. * Current Build Status and Build Information [https://jsr354.ci.cloudbees.com/job/javamoney/ CloudBees] * Public Source Code Repository on GitHub: [https://github.com/JavaMoney/javamoney GitHub Repository] * Discussions about [[Precision]] and other [[implementation|Implementation notes]]<span>
 
 
Close
loading
Please Confirm
Close