Class ProxyServiceInternalImpl
java.lang.Object
org.craftercms.studio.impl.v2.service.proxy.internal.ProxyServiceInternalImpl
- All Implemented Interfaces:
ProxyService
Default internal implementation for
ProxyService
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.web.client.RestTemplate
protected final ServicesConfig
protected final StudioConfiguration
-
Constructor Summary
ConstructorsConstructorDescriptionProxyServiceInternalImpl
(StudioConfiguration studioConfiguration, ServicesConfig servicesConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getAuthoringUrl
(String siteId) Returns the full authoring url used for previewprotected String
Returns the management token for previewReturns the list of preview URLs that require the management tokenorg.springframework.http.ResponseEntity
<Object> getSiteLogEvents
(String body, String siteId, jakarta.servlet.http.HttpServletRequest request) Proxies a request to Crafter Engine log monitor service, after checking current user has permission to access log data for siteId.@Valid org.springframework.http.ResponseEntity
<Object> proxyEngine
(String body, String siteId, jakarta.servlet.http.HttpServletRequest request) Proxies a request to Crafter Engine.
-
Field Details
-
studioConfiguration
-
servicesConfig
-
restTemplate
protected final org.springframework.web.client.RestTemplate restTemplate
-
-
Constructor Details
-
ProxyServiceInternalImpl
@ConstructorProperties({"studioConfiguration","servicesConfig"}) public ProxyServiceInternalImpl(StudioConfiguration studioConfiguration, ServicesConfig servicesConfig)
-
-
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 interfaceProxyService
- Parameters:
body
- body of the request.siteId
- ID of the crafter siterequest
- 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 interfaceProxyService
- Parameters:
body
- body of the requestsiteId
- ID of the crafter siterequest
- the request- Returns:
- response from Crafter Engine
- Throws:
URISyntaxException
- if request URI is not valid
-
getAuthoringUrl
Returns the full authoring url used for preview -
getEngineManagementTokenValue
Returns the management token for preview -
getEngineProtectedUrls
Returns the list of preview URLs that require the management token
-