Copyright© 2008-2022 Sitevision AB, all rights reserved.
@Requireable(value="CurrencyFactory") public interface CurrencyFactory
An instance of the Sitevision class implementing this interface can be obtained via
Utils.getCurrencyFactory()
.
See Utils
for how to obtain an instance of the Utils
interface.
Modifier and Type | Method and Description |
---|---|
Currency |
fromCurrencyCode(String aCurrencyCode)
Gets the Currency instance for a given ISO 4217 Currency Code.
|
Currency |
fromLocale(Locale aLocale)
Gets the Currency instance for a given locale.
|
Currency fromLocale(Locale aLocale)
Important Country Note! A Locale without a country can never have a Currency!
This method will always return null
for such Locale.
Tip! LocaleUtil.resolveCountryLocale(Locale)
might be helpful in order to
compensate for language-only locales.
This method is conceptually equivalent with the java.util.Currency.getInstance(Locale)
method.
aLocale
- the LocaleLocaleUtil.resolveCountryLocale(Locale)
Currency fromCurrencyCode(String aCurrencyCode)
Currency codes are specified with a three-letter alphabetic code specified by ISO 4217
Currency name | Currency code |
---|---|
US Dollar | USD |
Euro | EUR |
Brittish Pound | GBP |
Swedish Krona | SEK |
Norwegian Krone | NOK |
This method is conceptually equivalent with the java.util.Currency.getInstance(String)
method.
aCurrencyCode
- a ISO 4217 currency codeSitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2022 Sitevision AB, all rights reserved.