org.zeroexchange.money.currency
Interface CurrencyManager

All Known Implementing Classes:
AbstractCurrencyManager, CHECreditManager

public interface CurrencyManager

Interface for service which provides money.

Author:
black

Method Summary
 void freeAmount(BigDecimal amount, ZECurrency currencyCode, User user)
          Frees amount of money in the specified currency.
 BigDecimal getAllowedDebt(ZECurrency currencyCode, User user)
          Returns maximal value of user's allowed debt.
 BigDecimal getAvailableAmount(ZECurrency currencyCode, User user)
          Returns available amount of the specified current user for the specified code.
 BigDecimal getHourPrice(BigDecimal rate, ZECurrency currencyCode, User user)
           
 BigDecimal getHourRate(BigDecimal hourPrice, ZECurrency currencyCode, User user)
           
 String[] getSupportedCurrencyCodes()
          Return currencies codes that are supported by current provider.
 boolean isMoneyMovementEnabled(ZECurrency currencyCode)
          Returns true if the money movement is enabled.
 boolean isOutlayAllowed(ZECurrency currencyCode, User user, BigDecimal amount)
          Returns true if user is allowed outlay of the specified amount.
 void reserveAmount(BigDecimal amount, ZECurrency currencyCode, User user)
          Reserves amount of money in the specified currency.
 void writeOn(BigDecimal amount, ZECurrency currencyCode, User consumer)
          Writes on amount of money in the specified currency.
 

Method Detail

getSupportedCurrencyCodes

String[] getSupportedCurrencyCodes()
Return currencies codes that are supported by current provider.


getAvailableAmount

BigDecimal getAvailableAmount(ZECurrency currencyCode,
                              User user)
Returns available amount of the specified current user for the specified code.


reserveAmount

void reserveAmount(BigDecimal amount,
                   ZECurrency currencyCode,
                   User user)
Reserves amount of money in the specified currency.


freeAmount

void freeAmount(BigDecimal amount,
                ZECurrency currencyCode,
                User user)
Frees amount of money in the specified currency.


writeOn

void writeOn(BigDecimal amount,
             ZECurrency currencyCode,
             User consumer)
Writes on amount of money in the specified currency.


isMoneyMovementEnabled

boolean isMoneyMovementEnabled(ZECurrency currencyCode)
Returns true if the money movement is enabled.


getHourRate

BigDecimal getHourRate(BigDecimal hourPrice,
                       ZECurrency currencyCode,
                       User user)

getHourPrice

BigDecimal getHourPrice(BigDecimal rate,
                        ZECurrency currencyCode,
                        User user)

getAllowedDebt

BigDecimal getAllowedDebt(ZECurrency currencyCode,
                          User user)
Returns maximal value of user's allowed debt.


isOutlayAllowed

boolean isOutlayAllowed(ZECurrency currencyCode,
                        User user,
                        BigDecimal amount)
Returns true if user is allowed outlay of the specified amount.



Copyright © 2013. All Rights Reserved.