Class ConfigurationController
java.lang.Object
org.craftercms.studio.controller.rest.v2.ConfigurationController
@Validated
@RestController
@RequestMapping("/api/2/configuration")
public class ConfigurationController
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationController
(ConfigurationService configurationService, StudioConfiguration studioConfiguration, ContentTypeService contentTypeService) -
Method Summary
Modifier and TypeMethodDescriptionclearCache
(String siteId) deleteContentType
(@Valid ConfigurationController.DeleteContentTypeRequest request) getConfiguration
(String siteId, String module, String path, String environment) getConfigurationHistory
(String siteId, String module, String path, String environment) org.springframework.http.ResponseEntity
<org.springframework.core.io.Resource> getContentTypeFormController
(String siteId, String contentTypeId) org.springframework.http.ResponseEntity
<org.springframework.core.io.Resource> getContentTypePreviewImage
(String siteId, String contentTypeId) getContentTypeUsage
(String siteId, String contentType) getTranslationConfiguration
(String siteId) @Valid ResponseBody
writeConfiguration
(WriteConfigurationRequest wcRequest)
-
Constructor Details
-
ConfigurationController
@ConstructorProperties({"configurationService","studioConfiguration","contentTypeService"}) public ConfigurationController(ConfigurationService configurationService, StudioConfiguration studioConfiguration, ContentTypeService contentTypeService)
-
-
Method Details
-
clearCache
@GetMapping("clear_cache") public Result clearCache(@RequestParam String siteId) throws SiteNotFoundException - Throws:
SiteNotFoundException
-
getConfiguration
@GetMapping("/get_configuration") public ResponseBody getConfiguration(@RequestParam(name="siteId",required=true) String siteId, @RequestParam(name="module",required=true) String module, @RequestParam(name="path",required=true) String path, @RequestParam(name="environment",required=false) String environment) throws ContentNotFoundException - Throws:
ContentNotFoundException
-
writeConfiguration
@Valid @PostMapping("/write_configuration") public @Valid ResponseBody writeConfiguration(@Validated @RequestBody WriteConfigurationRequest wcRequest) throws ServiceLayerException, UserNotFoundException -
getConfigurationHistory
@GetMapping("/get_configuration_history") public ResultOne<ConfigurationHistory> getConfigurationHistory(@RequestParam(name="siteId",required=true) String siteId, @RequestParam(name="module",required=true) String module, @RequestParam(name="path",required=true) String path, @RequestParam(name="environment",required=false) String environment) throws ServiceLayerException - Throws:
ServiceLayerException
-
getTranslationConfiguration
@GetMapping("translation") public ResponseBody getTranslationConfiguration(@RequestParam String siteId) throws ServiceLayerException - Throws:
ServiceLayerException
-
getContentTypeUsage
@GetMapping("content-type/usage") public ResponseBody getContentTypeUsage(@RequestParam String siteId, @RequestParam String contentType) throws Exception - Throws:
Exception
-
getContentTypeFormController
@GetMapping("content-type/form_controller") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getContentTypeFormController(@RequestParam String siteId, @RequestParam String contentTypeId) throws ServiceLayerException - Throws:
ServiceLayerException
-
getContentTypePreviewImage
@GetMapping("content-type/preview_image") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getContentTypePreviewImage(@RequestParam String siteId, @RequestParam String contentTypeId) throws ServiceLayerException - Throws:
ServiceLayerException
-
deleteContentType
@PostMapping("content-type/delete") public ResponseBody deleteContentType(@RequestBody @Valid @Valid ConfigurationController.DeleteContentTypeRequest request) throws ServiceLayerException, AuthenticationException, DeploymentException, UserNotFoundException
-