public class ConfigurationServiceImpl extends java.lang.Object implements ConfigurationService
Modifier and Type | Field and Description |
---|---|
private SageoneConfig |
config |
private LedgerAccountService |
ledgerAccountService |
private ConfigRepository |
repository |
Constructor and Description |
---|
ConfigurationServiceImpl(ConfigRepository repository,
SageoneConfig config,
LedgerAccountService ledgerAccountService) |
Modifier and Type | Method and Description |
---|---|
private ConfigurationError |
createLedgerAccountInvoiceError(java.lang.String nominalCode,
java.lang.String message) |
private ConfigurationError |
createLedgerAccountInvoiceErrorNotFound(int nominalCode) |
private ConfigurationError |
createLedgerAccountInvoiceErrorNotNumber(java.lang.String nominalCode) |
private LedgerAccount |
getLedgerAccountInvoice(java.util.List<LedgerAccount> ledgerAccounts,
com.google.common.base.Optional<java.lang.String> nominalCode) |
ShopConfig |
getShopConfiguration(GUID shopGuid)
get the configuration for this shop.
|
void |
initializeShopConfiguration(GUID shopGuid)
Create a new configuration for this shop.
|
void |
updateShopConfiguration(ShopConfig config)
update a configuration for this shop.
|
private ConfigRepository repository
private SageoneConfig config
private LedgerAccountService ledgerAccountService
@Inject public ConfigurationServiceImpl(ConfigRepository repository, SageoneConfig config, LedgerAccountService ledgerAccountService)
public void initializeShopConfiguration(GUID shopGuid)
ConfigurationService
initializeShopConfiguration
in interface ConfigurationService
shopGuid
- The GUID of the shop.public ShopConfig getShopConfiguration(GUID shopGuid)
ConfigurationService
getShopConfiguration
in interface ConfigurationService
shopGuid
- The GUID of the shop.public void updateShopConfiguration(ShopConfig config)
ConfigurationService
updateShopConfiguration
in interface ConfigurationService
config
- Entityprivate ConfigurationError createLedgerAccountInvoiceErrorNotFound(int nominalCode)
private ConfigurationError createLedgerAccountInvoiceErrorNotNumber(java.lang.String nominalCode)
private ConfigurationError createLedgerAccountInvoiceError(java.lang.String nominalCode, java.lang.String message)
private LedgerAccount getLedgerAccountInvoice(java.util.List<LedgerAccount> ledgerAccounts, com.google.common.base.Optional<java.lang.String> nominalCode) throws LedgerAccountNotFoundException
LedgerAccountNotFoundException