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 forProxyService
.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.web.client.RestTemplate
restTemplate
protected ServicesConfig
servicesConfig
protected StudioConfiguration
studioConfiguration
-
Constructor Summary
Constructors Constructor Description ProxyServiceInternalImpl(StudioConfiguration studioConfiguration, ServicesConfig servicesConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getAuthoringUrl(String siteId)
Returns the full authoring url used for previewprotected String
getEngineManagementTokenValue()
Returns the management token for previewprotected List<String>
getEngineProtectedUrls()
Returns the list of preview URLs that require the management tokenorg.springframework.http.ResponseEntity<Object>
getSiteLogEvents(String body, String siteId, javax.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, javax.servlet.http.HttpServletRequest request)
Proxies a request to Crafter Engine.
-
-
-
Field Detail
-
studioConfiguration
protected final StudioConfiguration studioConfiguration
-
servicesConfig
protected final ServicesConfig servicesConfig
-
restTemplate
protected final org.springframework.web.client.RestTemplate restTemplate
-
-
Constructor Detail
-
ProxyServiceInternalImpl
@ConstructorProperties({"studioConfiguration","servicesConfig"}) public ProxyServiceInternalImpl(StudioConfiguration studioConfiguration, ServicesConfig servicesConfig)
-
-
Method Detail
-
getSiteLogEvents
public org.springframework.http.ResponseEntity<Object> getSiteLogEvents(String body, String siteId, javax.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
-
proxyEngine
@Valid public @Valid org.springframework.http.ResponseEntity<Object> proxyEngine(String body, String siteId, javax.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
-
getAuthoringUrl
protected String getAuthoringUrl(String siteId)
Returns the full authoring url used for preview
-
getEngineManagementTokenValue
protected String getEngineManagementTokenValue()
Returns the management token for preview
-
-