Package org.ametys.site
Class BackOfficeRequestHelper
java.lang.Object
org.ametys.site.BackOfficeRequestHelper
Helper class that builds the request the front-office makes to the back-office to query a page or a resource.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CloseableHttpClient
Build a HttpClient object parametrizedstatic HttpUriRequest
getRequest
(Map objectModel, String page, BackOfficeRequestProxyExtensionPoint requestProxyExtensionPoint) Build a HttpClient request object that will be sent to the back-office to query the page.
-
Method Details
-
getHttpClient
Build a HttpClient object parametrized- Returns:
- The httpclient object
-
getRequest
public static HttpUriRequest getRequest(Map objectModel, String page, BackOfficeRequestProxyExtensionPoint requestProxyExtensionPoint) throws IOException Build a HttpClient request object that will be sent to the back-office to query the page.- Parameters:
objectModel
- the current object model.page
- the wanted page path.requestProxyExtensionPoint
- The extension point for adding request headers in BO request- Returns:
- the HttpClient request, to be sent to the back-office.
- Throws:
IOException
- if an error occurs building the request.
-