Package com.hybris.cockpitng.core.user
Interface CockpitUserService
-
- All Known Implementing Classes:
DefaultCockpitUserService
public interface CockpitUserServiceService to get and change the current user. Also provides a method for checking whether the current user is an administrator or not.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetCurrentUser()Returns the id from the current user.booleanisAdmin(java.lang.String userId)Returns whether the user with the specified ID is an administrator or not.default booleanisLocalizedEditorInitiallyExpanded()Returns true if localized editors should be initially expanded for the currently logged user what is defined in the user profile When method is not implemented, false is returned by default from the interfacevoidsetCurrentUser(java.lang.String userId)Sets the current user to the user with the specified ID
-
-
-
Method Detail
-
getCurrentUser
java.lang.String getCurrentUser()
Returns the id from the current user.- Returns:
- value cannot be null.
-
setCurrentUser
void setCurrentUser(java.lang.String userId)
Sets the current user to the user with the specified ID- Parameters:
userId- non-empty user ID
-
isAdmin
boolean isAdmin(java.lang.String userId)
Returns whether the user with the specified ID is an administrator or not.- Parameters:
userId- non-empty user ID- Returns:
- true if user with the specified ID is an administrator, false otherwise
-
isLocalizedEditorInitiallyExpanded
default boolean isLocalizedEditorInitiallyExpanded()
Returns true if localized editors should be initially expanded for the currently logged user what is defined in the user profile When method is not implemented, false is returned by default from the interface- Returns:
- true if editor should be expanded or false if not
-
-