Class DefaultSapC4cAddressPopulator
- java.lang.Object
-
- com.sap.hybris.c4c.customer.populator.DefaultSapC4cAddressPopulator
-
- All Implemented Interfaces:
Populator<AddressModel,C4CAddressData>
public class DefaultSapC4cAddressPopulator extends java.lang.Object implements Populator<AddressModel,C4CAddressData>
Populates C4CAddressData DTO
-
-
Constructor Summary
Constructors Constructor Description DefaultSapC4cAddressPopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetConfigurationProperty(java.lang.String propertyKey)Reads configuration from the properties file for given propertyKeyConfigurationServicegetConfigurationService()voidpopulate(AddressModel addressModel, C4CAddressData addressData)Populate the target instance with values from the source instance.protected java.util.List<java.lang.String>populateAddressUsageCodes(CustomerModel customerModel, AddressModel addressModel)Creates and populates address usage dataprotected C4CAddressPhoneDatapopulatePhoneNumber(java.lang.String phoneNumber, java.lang.Boolean mobileNumberIndicator, java.lang.String usageCode)Creates and populates phone number dataprotected java.util.List<C4CAddressPhoneData>populatePhoneNumbers(AddressModel addressModel)Creates and populates phone number data listvoidsetConfigurationService(ConfigurationService configurationService)
-
-
-
Method Detail
-
populate
public void populate(AddressModel addressModel, C4CAddressData addressData) throws ConversionException
Description copied from interface:PopulatorPopulate the target instance with values from the source instance.- Specified by:
populatein interfacePopulator<AddressModel,C4CAddressData>- Parameters:
addressModel- the source objectaddressData- the target to fill- Throws:
ConversionException- if an error occurs
-
populateAddressUsageCodes
protected java.util.List<java.lang.String> populateAddressUsageCodes(CustomerModel customerModel, AddressModel addressModel)
Creates and populates address usage data
-
populatePhoneNumbers
protected java.util.List<C4CAddressPhoneData> populatePhoneNumbers(AddressModel addressModel)
Creates and populates phone number data list
-
getConfigurationProperty
protected java.lang.String getConfigurationProperty(java.lang.String propertyKey)
Reads configuration from the properties file for given propertyKey
-
populatePhoneNumber
protected C4CAddressPhoneData populatePhoneNumber(java.lang.String phoneNumber, java.lang.Boolean mobileNumberIndicator, java.lang.String usageCode)
Creates and populates phone number data
-
getConfigurationService
public ConfigurationService getConfigurationService()
- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
- Parameters:
configurationService- the configurationService to set
-
-