killbill-aplcache
Changes
currency/pom.xml 154(+154 -0)
currency/src/main/java/com/ning/billing/currency/DefaultCurrencyProviderPluginRegistry.java 69(+69 -0)
Details
diff --git a/api/src/main/java/com/ning/billing/currency/api/CurrencyService.java b/api/src/main/java/com/ning/billing/currency/api/CurrencyService.java
new file mode 100644
index 0000000..fcde9b4
--- /dev/null
+++ b/api/src/main/java/com/ning/billing/currency/api/CurrencyService.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency.api;
+
+import com.ning.billing.lifecycle.KillbillService;
+
+public interface CurrencyService extends KillbillService {
+}
currency/pom.xml 154(+154 -0)
diff --git a/currency/pom.xml b/currency/pom.xml
new file mode 100644
index 0000000..840cc47
--- /dev/null
+++ b/currency/pom.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2010-2013 Ning, Inc.
+ ~
+ ~ Ning licenses this file to you under the Apache License, version 2.0
+ ~ (the "License"); you may not use this file except in compliance with the
+ ~ License. You may obtain a copy of the License at:
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ ~ License for the specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>killbill</artifactId>
+ <groupId>com.ning.billing</groupId>
+ <version>0.6.18-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>currency</artifactId>
+ <packaging>jar</packaging>
+ <name>killbill-currency</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-multibindings</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.jayway.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing</groupId>
+ <artifactId>killbill-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing.plugin</groupId>
+ <artifactId>killbill-plugin-api-currency</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing</groupId>
+ <artifactId>killbill-internal-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing</groupId>
+ <artifactId>killbill-util</artifactId>
+ </dependency>
+
+ <!--
+ <dependency>
+ <groupId>com.ning.billing</groupId>
+ <artifactId>killbill-util</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing.commons</groupId>
+ <artifactId>killbill-clock</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing.commons</groupId>
+ <artifactId>killbill-clock</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing.commons</groupId>
+ <artifactId>killbill-embeddeddb</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing.commons</groupId>
+ <artifactId>killbill-queue</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing.commons</groupId>
+ <artifactId>killbill-queue</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.ning.billing.plugin</groupId>
+ <artifactId>killbill-plugin-api-payment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-mxj</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-mxj-db-files</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ -->
+
+ <!-- TEST SCOPE -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/currency/src/main/java/com/ning/billing/currency/api/DefaultCurrencyConversion.java b/currency/src/main/java/com/ning/billing/currency/api/DefaultCurrencyConversion.java
new file mode 100644
index 0000000..1bdafd2
--- /dev/null
+++ b/currency/src/main/java/com/ning/billing/currency/api/DefaultCurrencyConversion.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency.api;
+
+import org.joda.time.DateTime;
+
+import com.ning.billing.catalog.api.Currency;
+
+public class DefaultCurrencyConversion implements CurrencyConversion {
+
+ private final DateTime conversionDate;
+ private final Currency baseCurrency;
+ private final Rates rates;
+
+ public DefaultCurrencyConversion(final DateTime conversionDate, final Currency baseCurrency, final Rates rates) {
+ this.conversionDate = conversionDate;
+ this.baseCurrency = baseCurrency;
+ this.rates = rates;
+ }
+
+ @Override
+ public DateTime getConversionDate() {
+ return conversionDate;
+ }
+
+ @Override
+ public Currency getBaseCurrency() {
+ return baseCurrency;
+ }
+
+ @Override
+ public Rates getRates() {
+ return rates;
+ }
+}
diff --git a/currency/src/main/java/com/ning/billing/currency/api/DefaultCurrencyConversionApi.java b/currency/src/main/java/com/ning/billing/currency/api/DefaultCurrencyConversionApi.java
new file mode 100644
index 0000000..c678a65
--- /dev/null
+++ b/currency/src/main/java/com/ning/billing/currency/api/DefaultCurrencyConversionApi.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency.api;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.inject.Inject;
+
+import org.joda.time.DateTime;
+
+import com.ning.billing.ErrorCode;
+import com.ning.billing.catalog.api.Currency;
+import com.ning.billing.currency.plugin.api.CurrencyPluginApi;
+import com.ning.billing.currency.plugin.api.Rate;
+import com.ning.billing.osgi.api.OSGIServiceRegistration;
+import com.ning.billing.util.config.CurrencyConfig;
+
+public class DefaultCurrencyConversionApi implements CurrencyConversionApi {
+
+ private final CurrencyConfig config;
+ private final OSGIServiceRegistration<CurrencyPluginApi> registry;
+
+ @Inject
+ public DefaultCurrencyConversionApi(final CurrencyConfig config, final OSGIServiceRegistration<CurrencyPluginApi> registry) {
+ this.config = config;
+ this.registry = registry;
+
+ }
+
+ private CurrencyPluginApi getPluginApi() throws CurrencyConversionException {
+ final CurrencyPluginApi result = registry.getServiceForName(config.getDefaultCurrencyProvider());
+ if (result == null) {
+ throw new CurrencyConversionException(ErrorCode.CURRENCY_NO_SUCH_PAYMENT_PLUGIN, config.getDefaultCurrencyProvider());
+ }
+ return result;
+ }
+
+ @Override
+ public Set<Currency> getBaseRates() throws CurrencyConversionException {
+ final CurrencyPluginApi pluginApi = getPluginApi();
+ return pluginApi.getBaseCurrencies();
+ }
+
+ @Override
+ public CurrencyConversion getCurrentCurrencyConversion(final Currency baseCurrency) throws CurrencyConversionException {
+ final Set<Rate> allRates = getPluginApi().getCurrentRates(baseCurrency);
+ return getCurrencyConversionInternal(baseCurrency, allRates);
+ }
+
+ @Override
+ public CurrencyConversion getCurrencyConversion(final Currency baseCurrency, final DateTime dateConversion) throws CurrencyConversionException {
+ final Set<Rate> allRates = getPluginApi().getRates(baseCurrency, dateConversion);
+ return getCurrencyConversionInternal(baseCurrency, allRates);
+ }
+
+ private CurrencyConversion getCurrencyConversionInternal(final Currency baseCurrency, final Set<Rate> allRates) {
+ final Map<Currency, BigDecimal> rateMap = new HashMap<Currency, BigDecimal>();
+ DateTime conversionDate = null;
+ for (Rate cur : allRates) {
+ // We expect all those dates to be the same but if that were not the case we take the min -- what looks like the oldest
+ conversionDate = (conversionDate == null || conversionDate.isAfter(cur.getConversionDate())) ? cur.getConversionDate() : conversionDate;
+ rateMap.put(cur.getCurrency(), cur.getValue());
+ }
+
+ final Rates rates = new DefaultRates(rateMap);
+ final CurrencyConversion result = new DefaultCurrencyConversion(conversionDate, baseCurrency, rates);
+ return result;
+ }
+}
diff --git a/currency/src/main/java/com/ning/billing/currency/api/DefaultRates.java b/currency/src/main/java/com/ning/billing/currency/api/DefaultRates.java
new file mode 100644
index 0000000..e5fad3a
--- /dev/null
+++ b/currency/src/main/java/com/ning/billing/currency/api/DefaultRates.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency.api;
+
+import java.math.BigDecimal;
+import java.util.Map;
+import java.util.Set;
+
+import com.ning.billing.ErrorCode;
+import com.ning.billing.catalog.api.Currency;
+
+public class DefaultRates implements Rates {
+
+ private final Map<Currency, BigDecimal> rates;
+
+
+ public DefaultRates(final Map<Currency, BigDecimal> rates) {
+ this.rates = rates;
+ }
+
+ @Override
+ public Set<Currency> getCurrencies() {
+ return rates.keySet();
+ }
+
+ @Override
+ public BigDecimal getRate(final Currency currency) throws CurrencyConversionException {
+ final BigDecimal result = rates.get(currency);
+ if (result == null) {
+ throw new CurrencyConversionException(ErrorCode.CURRENCY_NO_SUCH_RATE_FOR_CURRENCY, currency.name());
+ }
+ return result;
+ }
+}
diff --git a/currency/src/main/java/com/ning/billing/currency/DefaultCurrencyProviderPluginRegistry.java b/currency/src/main/java/com/ning/billing/currency/DefaultCurrencyProviderPluginRegistry.java
new file mode 100644
index 0000000..cdcadca
--- /dev/null
+++ b/currency/src/main/java/com/ning/billing/currency/DefaultCurrencyProviderPluginRegistry.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.ning.billing.currency.plugin.api.CurrencyPluginApi;
+import com.ning.billing.osgi.api.OSGIServiceDescriptor;
+import com.ning.billing.osgi.api.OSGIServiceRegistration;
+import com.ning.billing.util.config.CurrencyConfig;
+
+import com.google.inject.Inject;
+
+public class DefaultCurrencyProviderPluginRegistry implements OSGIServiceRegistration<CurrencyPluginApi> {
+
+ private final static Logger log = LoggerFactory.getLogger(DefaultCurrencyProviderPluginRegistry.class);
+
+ private final Map<String, CurrencyPluginApi> pluginsByName = new ConcurrentHashMap<String, CurrencyPluginApi>();
+
+ @Inject
+ public DefaultCurrencyProviderPluginRegistry() {
+ }
+
+ @Override
+ public void registerService(final OSGIServiceDescriptor desc, final CurrencyPluginApi service) {
+ log.info("DefaultCurrencyProviderPluginRegistry registering service " + desc.getRegistrationName());
+ pluginsByName.put(desc.getRegistrationName(), service);
+ }
+
+ @Override
+ public void unregisterService(final String serviceName) {
+ log.info("DefaultCurrencyProviderPluginRegistry unregistering service " + serviceName);
+ pluginsByName.remove(serviceName);
+ }
+
+ @Override
+ public CurrencyPluginApi getServiceForName(final String serviceName) {
+ return pluginsByName.get(serviceName);
+ }
+
+ @Override
+ public Set<String> getAllServices() {
+ return pluginsByName.keySet();
+ }
+
+ @Override
+ public Class<CurrencyPluginApi> getServiceType() {
+ return CurrencyPluginApi.class;
+ }
+}
diff --git a/currency/src/main/java/com/ning/billing/currency/DefaultCurrencyService.java b/currency/src/main/java/com/ning/billing/currency/DefaultCurrencyService.java
new file mode 100644
index 0000000..3dbdfb2
--- /dev/null
+++ b/currency/src/main/java/com/ning/billing/currency/DefaultCurrencyService.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.ning.billing.currency.api.CurrencyService;
+
+public class DefaultCurrencyService implements CurrencyService {
+
+ private static final Logger log = LoggerFactory.getLogger(DefaultCurrencyService.class);
+
+ public static final String SERVICE_NAME = "currency-service";
+
+ @Override
+ public String getName() {
+ return SERVICE_NAME;
+ }
+}
diff --git a/currency/src/main/java/com/ning/billing/currency/glue/CurrencyModule.java b/currency/src/main/java/com/ning/billing/currency/glue/CurrencyModule.java
new file mode 100644
index 0000000..378ef24
--- /dev/null
+++ b/currency/src/main/java/com/ning/billing/currency/glue/CurrencyModule.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency.glue;
+
+import org.skife.config.ConfigSource;
+import org.skife.config.ConfigurationObjectFactory;
+
+import com.ning.billing.currency.DefaultCurrencyService;
+import com.ning.billing.currency.api.CurrencyConversionApi;
+import com.ning.billing.currency.api.CurrencyService;
+import com.ning.billing.currency.api.DefaultCurrencyConversionApi;
+import com.ning.billing.currency.plugin.api.CurrencyPluginApi;
+import com.ning.billing.osgi.api.OSGIServiceRegistration;
+import com.ning.billing.util.config.CurrencyConfig;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.TypeLiteral;
+
+public class CurrencyModule extends AbstractModule {
+
+
+ protected ConfigSource configSource;
+
+ public CurrencyModule(ConfigSource configSource) {
+ this.configSource = configSource;
+ }
+
+ @Override
+ protected void configure() {
+
+ final ConfigurationObjectFactory factory = new ConfigurationObjectFactory(configSource);
+ final CurrencyConfig currencyConfig = factory.build(CurrencyConfig.class);
+ bind(CurrencyConfig.class).toInstance(currencyConfig);
+
+ bind(new TypeLiteral<OSGIServiceRegistration<CurrencyPluginApi>>() {}).toProvider(DefaultCurrencyProviderPluginRegistryProvider.class).asEagerSingleton();
+
+ bind(CurrencyConversionApi.class).to(DefaultCurrencyConversionApi.class).asEagerSingleton();
+ bind(CurrencyService.class).to(DefaultCurrencyService.class).asEagerSingleton();
+ }
+}
diff --git a/currency/src/main/java/com/ning/billing/currency/glue/DefaultCurrencyProviderPluginRegistryProvider.java b/currency/src/main/java/com/ning/billing/currency/glue/DefaultCurrencyProviderPluginRegistryProvider.java
new file mode 100644
index 0000000..e1ec675
--- /dev/null
+++ b/currency/src/main/java/com/ning/billing/currency/glue/DefaultCurrencyProviderPluginRegistryProvider.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.currency.glue;
+
+import javax.inject.Inject;
+
+import com.ning.billing.currency.DefaultCurrencyProviderPluginRegistry;
+import com.ning.billing.currency.plugin.api.CurrencyPluginApi;
+import com.ning.billing.osgi.api.OSGIServiceRegistration;
+
+import com.google.inject.Provider;
+
+public class DefaultCurrencyProviderPluginRegistryProvider implements Provider<OSGIServiceRegistration<CurrencyPluginApi>> {
+
+
+ @Inject
+ public DefaultCurrencyProviderPluginRegistryProvider() {
+ }
+
+ @Override
+ public OSGIServiceRegistration<CurrencyPluginApi> get() {
+ final DefaultCurrencyProviderPluginRegistry pluginRegistry = new DefaultCurrencyProviderPluginRegistry();
+ return pluginRegistry;
+ }
+}
diff --git a/util/src/main/java/com/ning/billing/util/config/CurrencyConfig.java b/util/src/main/java/com/ning/billing/util/config/CurrencyConfig.java
new file mode 100644
index 0000000..359b5cf
--- /dev/null
+++ b/util/src/main/java/com/ning/billing/util/config/CurrencyConfig.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2010-2013 Ning, Inc.
+ *
+ * Ning licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.ning.billing.util.config;
+
+import org.skife.config.Config;
+import org.skife.config.Default;
+import org.skife.config.Description;
+
+public interface CurrencyConfig extends KillbillConfig {
+
+ @Config("killbill.currency.provider.default")
+ @Description("Default currency provider to use")
+ public String getDefaultCurrencyProvider();
+}