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 Classes Modifier and Type Class Description protected static class
ConfigurationController.DeleteContentTypeRequest
-
Constructor Summary
Constructors Constructor Description ConfigurationController(ConfigurationService configurationService, StudioConfiguration studioConfiguration, ContentTypeService contentTypeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Result
clearCache(String siteId)
ResponseBody
deleteContentType(@Valid ConfigurationController.DeleteContentTypeRequest request)
ResponseBody
getConfiguration(String siteId, String module, String path, String environment)
ResponseBody
getConfigurationHistory(String siteId, String module, String path, String environment)
org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>
getContentTypePreviewImage(String siteId, String contentTypeId)
ResponseBody
getContentTypeUsage(String siteId, String contentType)
ResponseBody
getTranslationConfiguration(String siteId)
@Valid ResponseBody
writeConfiguration(@Valid WriteConfigurationRequest wcRequest)
-
-
-
Constructor Detail
-
ConfigurationController
@ConstructorProperties({"configurationService","studioConfiguration","contentTypeService"}) public ConfigurationController(ConfigurationService configurationService, StudioConfiguration studioConfiguration, ContentTypeService contentTypeService)
-
-
Method Detail
-
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(@Valid @RequestBody @Valid WriteConfigurationRequest wcRequest) throws ServiceLayerException, UserNotFoundException
-
getConfigurationHistory
@GetMapping("/get_configuration_history") public ResponseBody 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 SiteNotFoundException, ContentNotFoundException
-
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
-
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
-
-