Interface AirlineContextInformationLoader
- All Known Implementing Classes:
DefaultAirlineWsContextInformationLoaderV2
public interface AirlineContextInformationLoader
Interface for context information loader
-
Method Summary
Modifier and TypeMethodDescriptioninitializeSiteFromRequest(javax.servlet.http.HttpServletRequest request) Method resolves base site uid from URL and set it as current site i.e
/rest/v1/mysite/cart, or
/rest/v1/mysite/customers/current
would try to set base site with uid=mysite as a current site.setCurrencyFromRequest(javax.servlet.http.HttpServletRequest request) Method set current currency based on information from request and recalculate cart for current sessionsetLanguageFromRequest(javax.servlet.http.HttpServletRequest request) Method set current language base on information from request
-
Method Details
-
initializeSiteFromRequest
BaseSiteModel initializeSiteFromRequest(javax.servlet.http.HttpServletRequest request) throws InvalidResourceWsException Method resolves base site uid from URL and set it as current site i.e
/rest/v1/mysite/cart, or
/rest/v1/mysite/customers/current
would try to set base site with uid=mysite as a current site.- Parameters:
request- - request from which we should get base site uid- Returns:
- baseSite set as current site or null
- Throws:
InvalidResourceWsException
-
setLanguageFromRequest
LanguageModel setLanguageFromRequest(javax.servlet.http.HttpServletRequest request) throws UnsupportedLanguageWsException Method set current language base on information from request- Parameters:
request- - request from which we should get language information- Returns:
- language set as current
- Throws:
UnsupportedLanguageWsException
-
setCurrencyFromRequest
CurrencyModel setCurrencyFromRequest(javax.servlet.http.HttpServletRequest request) throws UnsupportedCurrencyWsException, RecalculationWsException Method set current currency based on information from request and recalculate cart for current session- Parameters:
request- - request from which we should get currency information- Returns:
- currency set as current
- Throws:
UnsupportedCurrencyWsExceptionRecalculationWsException
-