Class DefaultModificationService
java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultModificationService
- All Implemented Interfaces:
ModificationService
This Service integrated with the pros api to call modification related api's
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateModification(ModificationData modificationData) This method will create modification in prosprotected Stringthis method returns the account name to get call the pros service as configuredprotected org.springframework.web.client.RestTemplateprotected de.hybris.platform.servicelayer.config.ConfigurationServicegetModification(String modificationId) This method returns the modification by modificationId and calling pros service.protected StringThis method return the modification end point as configured.This method returns the list of available modification in pros.protected StringThis method return the pros server end point as configured.voidremoveModification(ModificationData modification) This method will remove the modification from both the system and pros.voidsetBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) updateModification(ModificationData modificationData, String modificationId) This method will update modification in pros
-
Field Details
-
GET_MODIFICATION_ENDPOINT
- See Also:
-
-
Constructor Details
-
DefaultModificationService
public DefaultModificationService()
-
-
Method Details
-
getModifications
public ModificationsResponseData getModifications(Integer pageNumber, String sortDir, Map<String, Object> searchFilterMap) This method returns the list of available modification in pros.- Specified by:
getModificationsin interfaceModificationService- Parameters:
pageNumber- the page Number to handle the paginationsortDir- the direction of the sort: ascendent or descendent or null, null for default sortingsearchFilterMap- the map of filters to apply to the request- Returns:
- the
ModificationsResponseData
-
getModification
public ModificationData getModification(String modificationId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method returns the modification by modificationId and calling pros service.- Specified by:
getModificationin interfaceModificationService- Parameters:
modificationId- the modificationId- Returns:
- the ModificationData
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200 e.g. status 5xxorg.springframework.web.client.HttpClientErrorException- the exception when http response is not 200 e.g. status 4xxorg.springframework.web.client.ResourceAccessException- the resource is not accessible exception
-
removeModification
This method will remove the modification from both the system and pros.- Specified by:
removeModificationin interfaceModificationService- Parameters:
modification- the modification to be removed- Throws:
org.springframework.web.client.RestClientException- if removal of modification is unsuccessful
-
createModification
public ModificationData createModification(ModificationData modificationData) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method will create modification in pros- Specified by:
createModificationin interfaceModificationService- Parameters:
modificationData- the modificationData- Returns:
- the modification data if http status response is 200 else return null
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200 e.g. status 5xxorg.springframework.web.client.HttpClientErrorException- the exception when http response is not 200 e.g. status 4xxorg.springframework.web.client.ResourceAccessException- the resource is not accessible exception
-
updateModification
public ModificationData updateModification(ModificationData modificationData, String modificationId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method will update modification in pros- Specified by:
updateModificationin interfaceModificationService- Parameters:
modificationData- the modificationDatamodificationId- the modification id- Returns:
- the modification data if http status response is 200 else return null
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200 e.g. status 5xxorg.springframework.web.client.HttpClientErrorException- the exception when http response is not 200 e.g. status 4xxorg.springframework.web.client.ResourceAccessException- the resource is not accessible exception
-
getProsEndpoint
This method return the pros server end point as configured.- Returns:
- the pros end point
-
getModificationEndpoint
This method return the modification end point as configured.- Returns:
- the condition end point
-
getAccountName
this method returns the account name to get call the pros service as configured- Returns:
- the account name
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) - Parameters:
configurationService- the configurationService to set
-
getBackofficeRestTemplate
protected org.springframework.web.client.RestTemplate getBackofficeRestTemplate()- Returns:
- the backofficeRestTemplate
-
setBackofficeRestTemplate
public void setBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) - Parameters:
backofficeRestTemplate- the backofficeRestTemplate to set
-