Package com.hybris.cockpitng.helper.impl
Class DefaultRoleChooserHelper
- java.lang.Object
-
- com.hybris.cockpitng.helper.impl.DefaultRoleChooserHelper
-
- All Implemented Interfaces:
RoleChooserHelper
public class DefaultRoleChooserHelper extends java.lang.Object implements RoleChooserHelper
-
-
Field Summary
-
Fields inherited from interface com.hybris.cockpitng.helper.RoleChooserHelper
AUTO, MAIN_SLOT, ROLE_SELECTOR_SLOT, SETTING_ENABLE_ALTERNATIVE_CONTAINER
-
-
Constructor Summary
Constructors Constructor Description DefaultRoleChooserHelper(AuthorityGroupService authorityGroupService, CockpitUserService cockpitUserService, WidgetUtils widgetUtils)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AuthorityGroupServicegetAuthorityGroupService()protected CockpitUserServicegetCockpitUserService()WidgetUtilsgetWidgetUtils()protected booleanhasRoleSelectorSlotChild(WidgetInstance widgetInstance)booleanisMultiRoleUser(java.lang.String currentUser)booleanisRoleSelectorContainerContainerVisible()booleanisRoleSelectorContainerContainerVisible(WidgetInstance widgetInstance)
-
-
-
Constructor Detail
-
DefaultRoleChooserHelper
public DefaultRoleChooserHelper(AuthorityGroupService authorityGroupService, CockpitUserService cockpitUserService, WidgetUtils widgetUtils)
-
-
Method Detail
-
isRoleSelectorContainerContainerVisible
public boolean isRoleSelectorContainerContainerVisible()
- Specified by:
isRoleSelectorContainerContainerVisiblein interfaceRoleChooserHelper- Returns:
- true in case the widget set on '
RoleChooserHelper.MAIN_SLOT' has theRoleChooserHelper.SETTING_ENABLE_ALTERNATIVE_CONTAINERset to true or the setting is set toRoleChooserHelper.AUTOand the user has multiple has multiple roles and the widget has a role selector assigned
-
isRoleSelectorContainerContainerVisible
public boolean isRoleSelectorContainerContainerVisible(WidgetInstance widgetInstance)
- Specified by:
isRoleSelectorContainerContainerVisiblein interfaceRoleChooserHelper- Parameters:
widgetInstance- root widget for which the checks should be done- Returns:
- true in case the
RoleChooserHelper.SETTING_ENABLE_ALTERNATIVE_CONTAINERis set to true or the setting is set toRoleChooserHelper.AUTOand the user has multiple has multiple roles and the widget has a role selector assigned
-
hasRoleSelectorSlotChild
protected boolean hasRoleSelectorSlotChild(WidgetInstance widgetInstance)
-
isMultiRoleUser
public boolean isMultiRoleUser(java.lang.String currentUser)
- Specified by:
isMultiRoleUserin interfaceRoleChooserHelper- Parameters:
currentUser- the user for which the check should be done- Returns:
- true if the user has more than one authority group assigned
-
getAuthorityGroupService
protected AuthorityGroupService getAuthorityGroupService()
-
getCockpitUserService
protected CockpitUserService getCockpitUserService()
-
getWidgetUtils
public WidgetUtils getWidgetUtils()
-
-