Class SessionUserConfigurationContextDecorator
- java.lang.Object
-
- com.hybris.cockpitng.core.config.impl.SessionUserConfigurationContextDecorator
-
- All Implemented Interfaces:
WidgetConfigurationContextDecorator
- Direct Known Subclasses:
AdminmodeConfigurationContextDecorator,SessionAuthorityConfigurationContextDecorator
public class SessionUserConfigurationContextDecorator extends java.lang.Object implements WidgetConfigurationContextDecorator
Adds the user id retrieved fromCockpitUserService.getCurrentUser()to the configuration context for keyDefaultConfigContext.CONTEXT_PRINCIPAL, if it doesn't exist already.
-
-
Constructor Summary
Constructors Constructor Description SessionUserConfigurationContextDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecorate(DefaultConfigContext context, java.lang.Class<?> configurationType, WidgetInstance widgetInstance, java.lang.String currentUser)<C> ConfigContextdecorateContext(ConfigContext context, java.lang.Class<C> configurationType, WidgetInstance widgetInstance)protected java.lang.StringgetAttributeName()protected CockpitUserServicegetCockpitUserService()protected booleanrequiresDecoration(ConfigContext context, java.lang.Class<?> configurationType, WidgetInstance widgetInstance, java.lang.String currentUser)voidsetCockpitUserService(CockpitUserService cockpitUserService)
-
-
-
Method Detail
-
getAttributeName
protected java.lang.String getAttributeName()
-
requiresDecoration
protected boolean requiresDecoration(ConfigContext context, java.lang.Class<?> configurationType, WidgetInstance widgetInstance, java.lang.String currentUser)
-
decorate
protected void decorate(DefaultConfigContext context, java.lang.Class<?> configurationType, WidgetInstance widgetInstance, java.lang.String currentUser)
-
decorateContext
public <C> ConfigContext decorateContext(ConfigContext context, java.lang.Class<C> configurationType, WidgetInstance widgetInstance)
- Specified by:
decorateContextin interfaceWidgetConfigurationContextDecorator
-
getCockpitUserService
protected CockpitUserService getCockpitUserService()
-
setCockpitUserService
@Autowired(required=false) @Qualifier("cockpitUserService") public void setCockpitUserService(CockpitUserService cockpitUserService)
-
-