Package org.ametys.site
Class BackOfficeRequestHelper
- java.lang.Object
-
- org.ametys.site.BackOfficeRequestHelper
-
public final class BackOfficeRequestHelper extends Object
Helper class that builds the request the front-office makes to the back-office to query a page or a resource.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CloseableHttpClient
getHttpClient()
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 Detail
-
getHttpClient
public static CloseableHttpClient 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.
-
-