Class ProxyServiceInternalImpl

java.lang.Object
org.craftercms.studio.impl.v2.service.proxy.internal.ProxyServiceInternalImpl
All Implemented Interfaces:
ProxyService

public class ProxyServiceInternalImpl extends Object implements ProxyService
Default internal implementation for ProxyService.
  • Field Details

    • studioConfiguration

      protected final StudioConfiguration studioConfiguration
    • servicesConfig

      protected final ServicesConfig servicesConfig
    • restTemplate

      protected final org.springframework.web.client.RestTemplate restTemplate
  • Constructor Details

  • Method Details

    • getSiteLogEvents

      public org.springframework.http.ResponseEntity<Object> getSiteLogEvents(String body, String siteId, jakarta.servlet.http.HttpServletRequest request) throws URISyntaxException
      Description copied from interface: ProxyService
      Proxies a request to Crafter Engine log monitor service, after checking current user has permission to access log data for siteId.
      Specified by:
      getSiteLogEvents in interface ProxyService
      Parameters:
      body - body of the request.
      siteId - ID of the crafter site
      request - the request
      Returns:
      response from Crafter Engine
      Throws:
      URISyntaxException - if request URI is not valid
    • proxyEngine

      @Valid public @Valid org.springframework.http.ResponseEntity<Object> proxyEngine(String body, String siteId, jakarta.servlet.http.HttpServletRequest request) throws URISyntaxException
      Description copied from interface: ProxyService
      Proxies a request to Crafter Engine.
      Specified by:
      proxyEngine in interface ProxyService
      Parameters:
      body - body of the request
      siteId - ID of the crafter site
      request - the request
      Returns:
      response from Crafter Engine
      Throws:
      URISyntaxException - if request URI is not valid
    • getAuthoringUrl

      protected String getAuthoringUrl(String siteId)
      Returns the full authoring url used for preview
    • getEngineManagementTokenValue

      protected String getEngineManagementTokenValue()
      Returns the management token for preview
    • getEngineProtectedUrls

      protected List<String> getEngineProtectedUrls()
      Returns the list of preview URLs that require the management token