Class BackofficeThreadContextCreator
- java.lang.Object
-
- com.hybris.backoffice.cockpitng.util.BackofficeThreadContextCreator
-
- All Implemented Interfaces:
com.hybris.cockpitng.engine.operations.LongOperationThreadExecutor,com.hybris.cockpitng.util.CockpitThreadContextCreator
- Direct Known Subclasses:
CustomBackofficeThreadCreator
public class BackofficeThreadContextCreator extends java.lang.Object implements com.hybris.cockpitng.util.CockpitThreadContextCreator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBackofficeThreadContextCreator.BackofficeThreadHttpServletRequestWrapper
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCURRENT_LOCALEprotected static java.lang.StringHYBRIS_SESSION_CATALOG_VERSIONSprotected static java.lang.StringHYBRIS_TENANTstatic java.lang.StringMEDIA_SSL_MODE_ENABLEDprotected static java.lang.StringPUBLIC_MEDIA_URL_RENDERERprotected static java.lang.StringSECURE_MEDIA_URL_RENDERERprotected static java.lang.StringSESSION_USERprotected static java.lang.StringSPRING_REQUEST_CONTEXTprotected static java.lang.StringSPRING_SECURITY_CONTEXTprotected static java.lang.StringZK_SESSION
-
Constructor Summary
Constructors Constructor Description BackofficeThreadContextCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanUp(java.util.Map<java.lang.String,java.lang.Object> ctx)protected org.springframework.web.context.request.RequestAttributescreateRequestAttributesCopy()java.util.Map<java.lang.String,java.lang.Object>createThreadContext()voidexecute(java.lang.Runnable runnable)protected <T> java.util.Optional<T>getFromContext(java.util.Map<java.lang.String,java.lang.Object> ctx, java.lang.String paramName, java.lang.Class<T> paramValueType)voidinitThreadContext(java.util.Map<java.lang.String,java.lang.Object> ctx)voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetComponentDefinitionService(com.hybris.cockpitng.modules.core.impl.CockpitModuleComponentDefinitionService componentDefinitionService)protected voidsetCurrentLocale(java.util.Locale currentLocale)voidsetI18nService(I18NService i18nService)protected voidsetSessionCatalogVersions(java.util.Collection<CatalogVersionModel> catalogVersions)voidsetUserService(UserService userService)
-
-
-
Field Detail
-
SPRING_SECURITY_CONTEXT
protected static final java.lang.String SPRING_SECURITY_CONTEXT
- See Also:
- Constant Field Values
-
SPRING_REQUEST_CONTEXT
protected static final java.lang.String SPRING_REQUEST_CONTEXT
- See Also:
- Constant Field Values
-
ZK_SESSION
protected static final java.lang.String ZK_SESSION
- See Also:
- Constant Field Values
-
HYBRIS_TENANT
protected static final java.lang.String HYBRIS_TENANT
- See Also:
- Constant Field Values
-
CURRENT_LOCALE
protected static final java.lang.String CURRENT_LOCALE
- See Also:
- Constant Field Values
-
SESSION_USER
protected static final java.lang.String SESSION_USER
- See Also:
- Constant Field Values
-
HYBRIS_SESSION_CATALOG_VERSIONS
protected static final java.lang.String HYBRIS_SESSION_CATALOG_VERSIONS
- See Also:
- Constant Field Values
-
PUBLIC_MEDIA_URL_RENDERER
protected static final java.lang.String PUBLIC_MEDIA_URL_RENDERER
- See Also:
- Constant Field Values
-
SECURE_MEDIA_URL_RENDERER
protected static final java.lang.String SECURE_MEDIA_URL_RENDERER
- See Also:
- Constant Field Values
-
MEDIA_SSL_MODE_ENABLED
public static final java.lang.String MEDIA_SSL_MODE_ENABLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public void execute(java.lang.Runnable runnable)
- Specified by:
executein interfacecom.hybris.cockpitng.engine.operations.LongOperationThreadExecutor
-
createThreadContext
public java.util.Map<java.lang.String,java.lang.Object> createThreadContext()
- Specified by:
createThreadContextin interfacecom.hybris.cockpitng.util.CockpitThreadContextCreator
-
createRequestAttributesCopy
protected org.springframework.web.context.request.RequestAttributes createRequestAttributesCopy()
-
initThreadContext
public void initThreadContext(java.util.Map<java.lang.String,java.lang.Object> ctx)
- Specified by:
initThreadContextin interfacecom.hybris.cockpitng.util.CockpitThreadContextCreator
-
setSessionCatalogVersions
protected void setSessionCatalogVersions(java.util.Collection<CatalogVersionModel> catalogVersions)
-
setCurrentLocale
protected void setCurrentLocale(java.util.Locale currentLocale)
-
getFromContext
protected <T> java.util.Optional<T> getFromContext(java.util.Map<java.lang.String,java.lang.Object> ctx, java.lang.String paramName, java.lang.Class<T> paramValueType)
-
cleanUp
protected void cleanUp(java.util.Map<java.lang.String,java.lang.Object> ctx)
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
setUserService
public void setUserService(UserService userService)
-
setI18nService
public void setI18nService(I18NService i18nService)
-
setComponentDefinitionService
public void setComponentDefinitionService(com.hybris.cockpitng.modules.core.impl.CockpitModuleComponentDefinitionService componentDefinitionService)
-
-