com.konakartadmin.blif
Interface AdminCurrencyMgrIf

All Known Implementing Classes:
AdminCurrencyMgr

public interface AdminCurrencyMgrIf

AdminCurrencyMgrIf


Method Summary
 int deleteCurrency(int currId)
          Delete a Currency
 boolean doesCurrencyExistForId(int currId)
          Checks to see whether a currency already exists with this id
 java.lang.String formatPrice(java.math.BigDecimal number)
          Calls formatPrice with the default currency
 java.lang.String formatPrice(java.math.BigDecimal number, java.lang.String currencyCode)
          Used to create a string in order to visualize a price.
 AdminCurrencySearchResult getCurrencies(AdminCurrencySearch search)
          This returns an array of currencies for all of the currencies in the currency table.
 AdminCurrency getCurrency(int currencyId)
          Returns the currency referenced by the currencyId.
 AdminCurrency getCurrency(java.lang.String currencyCode)
          Returns the currency referenced by the currencyCode.
 AdminCurrency getDefaultCurrency()
          The default currency is referenced by a configuration variable called DEFAULT_CURRENCY.
 java.text.DecimalFormat getDefaultCurrencyFormatter()
          Gets the formatter for the default currency
 int insertCurrency(AdminCurrency curr)
          Insert a Currency
 void refreshConfigs()
          Refresh the configuration of the Admin Currency Manager
 void setDefaultCurrency(java.lang.String currCode)
          Sets the default currency.
 int updateCurrency(AdminCurrency curr)
          Update a Currency
 

Method Detail

setDefaultCurrency

void setDefaultCurrency(java.lang.String currCode)
                        throws java.lang.Exception
Sets the default currency. Sets a configuration variable called DEFAULT_CURRENCY.

Parameters:
currCode -
Throws:
java.lang.Exception

getDefaultCurrency

AdminCurrency getDefaultCurrency()
                                 throws java.lang.Exception
The default currency is referenced by a configuration variable called DEFAULT_CURRENCY. If this isn't found then we return the currency in the currency table with the lowest id. Once found, the default currency is cached.

Returns:
Returns a currency
Throws:
java.lang.Exception

getDefaultCurrencyFormatter

java.text.DecimalFormat getDefaultCurrencyFormatter()
                                                    throws KKAdminException
Gets the formatter for the default currency

Returns:
Default currency formatter
Throws:
KKAdminException

getCurrency

AdminCurrency getCurrency(java.lang.String currencyCode)
                          throws KKAdminException,
                                 org.apache.torque.TorqueException,
                                 com.workingdogs.village.DataSetException
Returns the currency referenced by the currencyCode.

Parameters:
currencyCode -
Returns:
Returns a currency
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCurrency

AdminCurrency getCurrency(int currencyId)
                          throws org.apache.torque.TorqueException,
                                 com.workingdogs.village.DataSetException
Returns the currency referenced by the currencyId.

Parameters:
currencyId -
Returns:
Returns a currency
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getCurrencies

AdminCurrencySearchResult getCurrencies(AdminCurrencySearch search)
                                        throws org.apache.torque.TorqueException,
                                               com.workingdogs.village.DataSetException
This returns an array of currencies for all of the currencies in the currency table.

Parameters:
search -
Returns:
Returns an array of currencies
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

formatPrice

java.lang.String formatPrice(java.math.BigDecimal number)
                             throws java.lang.Exception
Calls formatPrice with the default currency

Parameters:
number -
Returns:
Returns the formatted currency
Throws:
java.lang.Exception

formatPrice

java.lang.String formatPrice(java.math.BigDecimal number,
                             java.lang.String currencyCode)
                             throws java.lang.Exception
Used to create a string in order to visualize a price. It ensures that the decimal places, the thousands separator and the currency symbol are correct.

Parameters:
number -
currencyCode -
Returns:
The formatted price or null if the number specified is null
Throws:
java.lang.Exception

deleteCurrency

int deleteCurrency(int currId)
                   throws KKAdminException
Delete a Currency

Parameters:
currId - A currency id
Returns:
returns the id of the deleted currency
Throws:
KKAdminException

insertCurrency

int insertCurrency(AdminCurrency curr)
                   throws KKAdminException
Insert a Currency

Parameters:
curr - A currency object
Returns:
returns the id of the inserted currency
Throws:
KKAdminException

updateCurrency

int updateCurrency(AdminCurrency curr)
                   throws java.lang.Exception
Update a Currency

Parameters:
curr - A currency object
Returns:
returns the id of the updated currency
Throws:
java.lang.Exception

doesCurrencyExistForId

boolean doesCurrencyExistForId(int currId)
                               throws org.apache.torque.TorqueException
Checks to see whether a currency already exists with this id

Parameters:
currId -
Returns:
Returns true if the customer already exists
Throws:
org.apache.torque.TorqueException

refreshConfigs

void refreshConfigs()
                    throws java.lang.Exception
Refresh the configuration of the Admin Currency Manager

Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.