|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminCurrencyMgr
public class AdminCurrencyMgr
The AdminCurrencyMgr - for Managing Currency Objects for the Admin Application
Nested Class Summary | |
---|---|
protected class |
AdminCurrencyMgr.StaticData
Used to store the static data of this manager |
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
the log |
protected static java.lang.String |
mutex
|
protected static java.util.Map<java.lang.String,AdminCurrencyMgr.StaticData> |
staticDataHM
Hash Map that contains the static data |
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
Constructor Summary | |
---|---|
AdminCurrencyMgr(KKAdminIf eng)
Constructor |
Method Summary | |
---|---|
protected int |
addCurrencySearchCriteria(com.konakart.bl.KKCriteria c,
AdminCurrencySearch search)
|
protected void |
addOrderBy(com.konakart.bl.KKCriteria c,
AdminCurrencySearch search)
|
int |
deleteCurrency(int currId)
Delete a Currency |
boolean |
doesCurrencyExistForId(int currId)
Checks to see whether a currency already exists with this id |
protected AdminCurrency |
fetchDefaultCurrency()
The default currency is referenced by a configuration variable called DEFAULT_CURRENCY. |
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 |
protected java.text.DecimalFormat |
getFormatter(AdminCurrency currency)
Get a DecimalFormat object for a 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminCurrencyMgr.StaticData> staticDataHM
Constructor Detail |
---|
public AdminCurrencyMgr(KKAdminIf eng) throws java.lang.Exception
eng
-
java.lang.Exception
Method Detail |
---|
public void setDefaultCurrency(java.lang.String currCode) throws java.lang.Exception
setDefaultCurrency
in interface AdminCurrencyMgrIf
currCode
-
java.lang.Exception
public AdminCurrency getDefaultCurrency() throws java.lang.Exception
getDefaultCurrency
in interface AdminCurrencyMgrIf
java.lang.Exception
protected AdminCurrency fetchDefaultCurrency() throws java.lang.Exception
java.lang.Exception
public java.text.DecimalFormat getDefaultCurrencyFormatter() throws KKAdminException
getDefaultCurrencyFormatter
in interface AdminCurrencyMgrIf
KKAdminException
public AdminCurrency getCurrency(java.lang.String currencyCode) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCurrency
in interface AdminCurrencyMgrIf
currencyCode
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminCurrency getCurrency(int currencyId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCurrency
in interface AdminCurrencyMgrIf
currencyId
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminCurrencySearchResult getCurrencies(AdminCurrencySearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getCurrencies
in interface AdminCurrencyMgrIf
search
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
protected int addCurrencySearchCriteria(com.konakart.bl.KKCriteria c, AdminCurrencySearch search)
protected void addOrderBy(com.konakart.bl.KKCriteria c, AdminCurrencySearch search)
public java.lang.String formatPrice(java.math.BigDecimal number) throws java.lang.Exception
formatPrice
in interface AdminCurrencyMgrIf
number
-
java.lang.Exception
public java.lang.String formatPrice(java.math.BigDecimal number, java.lang.String currencyCode) throws java.lang.Exception
formatPrice
in interface AdminCurrencyMgrIf
number
- currencyCode
-
java.lang.Exception
protected java.text.DecimalFormat getFormatter(AdminCurrency currency)
currency
-
KKAdminException
public int deleteCurrency(int currId) throws KKAdminException
deleteCurrency
in interface AdminCurrencyMgrIf
currId
- A currency id
KKAdminException
public int insertCurrency(AdminCurrency curr) throws KKAdminException
insertCurrency
in interface AdminCurrencyMgrIf
curr
- A currrency object
KKAdminException
public int updateCurrency(AdminCurrency curr) throws java.lang.Exception
updateCurrency
in interface AdminCurrencyMgrIf
curr
- A currrency object
java.lang.Exception
public boolean doesCurrencyExistForId(int currId) throws org.apache.torque.TorqueException
doesCurrencyExistForId
in interface AdminCurrencyMgrIf
currId
-
org.apache.torque.TorqueException
public void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminCurrencyMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |