Class SiteContextRestController


  • @RestController
    @RequestMapping("${crafter.core.rest.base.uri}/site/context")
    public class SiteContextRestController
    extends org.craftercms.core.controller.rest.RestControllerBase
    REST controller for operations related for the SiteContext
    Author:
    Alfonso Vásquez
    • Constructor Detail

      • SiteContextRestController

        public SiteContextRestController()
    • Method Detail

      • setContextManager

        public void setContextManager​(SiteContextManager contextManager)
      • validateToken

        protected void validateToken​(String token)
                              throws org.craftercms.commons.exceptions.InvalidManagementTokenException
        Throws:
        org.craftercms.commons.exceptions.InvalidManagementTokenException
      • getContextId

        @GetMapping("/id")
        public Map<String,​String> getContextId​(@RequestParam
                                                     String token)
                                              throws org.craftercms.commons.exceptions.InvalidManagementTokenException
        Throws:
        org.craftercms.commons.exceptions.InvalidManagementTokenException
      • destroy

        @GetMapping("/destroy")
        public Map<String,​Object> destroy​(@RequestParam
                                                String token)
                                         throws org.craftercms.commons.exceptions.InvalidManagementTokenException
        Throws:
        org.craftercms.commons.exceptions.InvalidManagementTokenException
      • rebuild

        @GetMapping("/rebuild")
        public Map<String,​Object> rebuild​(javax.servlet.http.HttpServletRequest request,
                                                @RequestParam
                                                String token)
                                         throws org.craftercms.commons.exceptions.InvalidManagementTokenException
        Throws:
        org.craftercms.commons.exceptions.InvalidManagementTokenException
      • rebuildSchema

        @GetMapping("/graphql/rebuild")
        public Map<String,​Object> rebuildSchema​(javax.servlet.http.HttpServletRequest request,
                                                      @RequestParam
                                                      String token)
                                               throws org.craftercms.commons.exceptions.InvalidManagementTokenException
        Throws:
        org.craftercms.commons.exceptions.InvalidManagementTokenException
      • getStatus

        @GetMapping("/status")
        public Map<String,​Object> getStatus​(@RequestParam
                                                  String token)
                                           throws org.craftercms.commons.exceptions.InvalidManagementTokenException
        Throws:
        org.craftercms.commons.exceptions.InvalidManagementTokenException
      • getConfiguredToken

        public String getConfiguredToken()
      • setConfiguredToken

        public void setConfiguredToken​(String configuredToken)