public abstract class AbstractImpersonationController
extends DefaultWidgetController
ImpersonationService to allow controllers to call business
logic in the impersonation context suitable for the instore application. To do so, extend from this class and call
the facade methods within
executeInContext(de.hybris.platform.commerceservices.impersonation.ImpersonationService.Executor) method.| Constructor and Description |
|---|
AbstractImpersonationController() |
| Modifier and Type | Method and Description |
|---|---|
protected ImpersonationContext |
createImpersonationContext() |
protected <R,E extends java.lang.Throwable> |
executeInContext(ImpersonationService.Executor<R,E> executor)
Execute the given logic within the context of the current site and catalog version as per
SiteService.getCurrentSite(). |
protected BaseSiteModel |
getCurrentBaseSite() |
protected BaseStoreModel |
getCurrentBaseStore() |
protected CatalogVersionModel |
getCurrentCatalogVersion() |
protected CurrencyModel |
getCurrentCurrency() |
protected LanguageModel |
getCurrentLanguage() |
protected ImpersonationContext createImpersonationContext()
protected <R,E extends java.lang.Throwable> R executeInContext(ImpersonationService.Executor<R,E> executor) throws E extends java.lang.Throwable
SiteService.getCurrentSite(). Currently we always use the
anonymous user and use the first available currency. This is subject to change in later releases.R - return typeE - possible exception typeexecutor - the logic to performE - - the exceptionE extends java.lang.Throwableprotected BaseSiteModel getCurrentBaseSite()
protected BaseStoreModel getCurrentBaseStore()
protected CatalogVersionModel getCurrentCatalogVersion()
protected CurrencyModel getCurrentCurrency()
protected LanguageModel getCurrentLanguage()
Copyright © 2018 SAP SE. All Rights Reserved.