Package com.hybris.cockpitng.helper
Interface RoleChooserHelper
-
- All Known Implementing Classes:
DefaultRoleChooserHelper
public interface RoleChooserHelperThe interface describes operations needed to determine if the Role Chooser should be displayed for current user. The functionality is needed in the widget itself but also in places that must adjust their behaviour in case Role Chooser is displayed (for example deep links should be triggered only after the role is chosen).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAUTOstatic java.lang.StringMAIN_SLOTstatic java.lang.StringROLE_SELECTOR_SLOTstatic java.lang.StringSETTING_ENABLE_ALTERNATIVE_CONTAINER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisMultiRoleUser(java.lang.String user)booleanisRoleSelectorContainerContainerVisible()booleanisRoleSelectorContainerContainerVisible(WidgetInstance widgetInstance)
-
-
-
Field Detail
-
MAIN_SLOT
static final java.lang.String MAIN_SLOT
- See Also:
- Constant Field Values
-
AUTO
static final java.lang.String AUTO
- See Also:
- Constant Field Values
-
ROLE_SELECTOR_SLOT
static final java.lang.String ROLE_SELECTOR_SLOT
- See Also:
- Constant Field Values
-
SETTING_ENABLE_ALTERNATIVE_CONTAINER
static final java.lang.String SETTING_ENABLE_ALTERNATIVE_CONTAINER
- See Also:
- Constant Field Values
-
-
Method Detail
-
isRoleSelectorContainerContainerVisible
boolean isRoleSelectorContainerContainerVisible()
- Returns:
- true in case the widget set on '
MAIN_SLOT' has theSETTING_ENABLE_ALTERNATIVE_CONTAINERset to true or the setting is set toAUTOand the user has multiple has multiple roles and the widget has a role selector assigned
-
isRoleSelectorContainerContainerVisible
boolean isRoleSelectorContainerContainerVisible(WidgetInstance widgetInstance)
- Parameters:
widgetInstance- root widget for which the checks should be done- Returns:
- true in case the
SETTING_ENABLE_ALTERNATIVE_CONTAINERis set to true or the setting is set toAUTOand the user has multiple has multiple roles and the widget has a role selector assigned
-
isMultiRoleUser
boolean isMultiRoleUser(java.lang.String user)
- Parameters:
user- the user for which the check should be done- Returns:
- true if the user has more than one authority group assigned
-
-