Package de.hybris.smartedit.controllers
Class ConfigurationController
java.lang.Object
de.hybris.smartedit.controllers.ConfigurationController
@RestController("configurationController")
@RequestMapping("/configuration")
public class ConfigurationController
extends Object
Unauthenticated controller using various gateways to send the requested CRUD operations to the secured webservice
responsible of executing the operation.
By default, smarteditwebservices is the targeted web extension. This is defined by the property
configurationServiceLocation.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationController(HttpGETGateway httpGETGateway, HttpPOSTGateway httpPOSTGateway, HttpPUTGateway httpPUTGateway, HttpDELETEGateway httpDELETEGateway) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void>deleteConfiguration(String configId, javax.servlet.http.HttpServletRequest request) protected StringgetAuthorization(javax.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<Collection<ConfigurationData>>getConfiguration(javax.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<ConfigurationData>saveConfiguration(Map<String, String> payload, javax.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<ConfigurationData>updateConfiguration(Map<String, String> payload, String configId, javax.servlet.http.HttpServletRequest request)
-
Constructor Details
-
ConfigurationController
@Autowired public ConfigurationController(HttpGETGateway httpGETGateway, HttpPOSTGateway httpPOSTGateway, HttpPUTGateway httpPUTGateway, HttpDELETEGateway httpDELETEGateway)
-
-
Method Details
-
getConfiguration
@GetMapping @ResponseStatus(OK) @ResponseBody public org.springframework.http.ResponseEntity<Collection<ConfigurationData>> getConfiguration(javax.servlet.http.HttpServletRequest request) throws IOException - Throws:
IOException
-
saveConfiguration
@PostMapping @ResponseStatus(CREATED) @ResponseBody public org.springframework.http.ResponseEntity<ConfigurationData> saveConfiguration(@RequestBody Map<String, String> payload, javax.servlet.http.HttpServletRequest request) throws IOException- Throws:
IOException
-
updateConfiguration
@PutMapping("/{key:.+}") @ResponseStatus(OK) @ResponseBody public org.springframework.http.ResponseEntity<ConfigurationData> updateConfiguration(@RequestBody Map<String, String> payload, @PathVariable("key") String configId, javax.servlet.http.HttpServletRequest request) throws IOException- Throws:
IOException
-
deleteConfiguration
@DeleteMapping("/{key:.+}") @ResponseStatus(NO_CONTENT) public org.springframework.http.ResponseEntity<Void> deleteConfiguration(@PathVariable("key") String configId, javax.servlet.http.HttpServletRequest request) throws IOException - Throws:
IOException
-
getAuthorization
-