Class DefaultCMSUserService
java.lang.Object
de.hybris.platform.cmsfacades.users.services.impl.DefaultCMSUserService
- All Implemented Interfaces:
CMSUserService
Default implementation of
CMSUserService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method returns all the supported languages in the site.getLanguagesForUser(UserModel userModel, Function<UserGroupModel, Collection<LanguageModel>> languagesRetrievalFn) This method returns languages available to the provided user.Retrieves the languages ISO code for which the current user can read.getReadableLanguagesForUser(UserModel userModel) Retrieves the languages ISO code for which the provided user can read.protected StoreSessionFacadeprotected Set<UserGroupModel>getUserGroupsForUser(UserModel userModel) This method returns a set of user groups the provided user belongs to.protected UserServiceRetrieves the languages ISO code for which the current user can write.getWriteableLanguagesForUser(UserModel userModel) Retrieves the languages ISO code for which the provided user can write.voidsetStoreSessionFacade(StoreSessionFacade storeSessionFacade) voidsetUserService(UserService userService)
-
Constructor Details
-
DefaultCMSUserService
public DefaultCMSUserService()
-
-
Method Details
-
getReadableLanguagesForCurrentUser
Description copied from interface:CMSUserServiceRetrieves the languages ISO code for which the current user can read.- Specified by:
getReadableLanguagesForCurrentUserin interfaceCMSUserService- Returns:
- the ISO codes for all readable languages.
-
getReadableLanguagesForUser
Description copied from interface:CMSUserServiceRetrieves the languages ISO code for which the provided user can read.- Specified by:
getReadableLanguagesForUserin interfaceCMSUserService- Parameters:
userModel- - The model representing the user whose set of readable languages to retrieve- Returns:
- the ISO codes for all readable languages.
-
getWriteableLanguagesForCurrentUser
Description copied from interface:CMSUserServiceRetrieves the languages ISO code for which the current user can write.- Specified by:
getWriteableLanguagesForCurrentUserin interfaceCMSUserService- Returns:
- the ISO codes for all writeable languages.
-
getWriteableLanguagesForUser
Description copied from interface:CMSUserServiceRetrieves the languages ISO code for which the provided user can write.- Specified by:
getWriteableLanguagesForUserin interfaceCMSUserService- Parameters:
userModel- - The model representing the user whose set of writeable languages to retrieve- Returns:
- the ISO codes for all writeable languages.
-
getLanguagesForUser
protected Set<String> getLanguagesForUser(UserModel userModel, Function<UserGroupModel, Collection<LanguageModel>> languagesRetrievalFn) This method returns languages available to the provided user. Which types of languages are returned is controlled by the languageRetrievalFn provided.- Parameters:
userModel- - The model that represent the user whose languages to retrieve.languagesRetrievalFn- - Function used to retrieve a collection of languages from a user group model.- Returns:
- A set of strings. Each string represents a language ISO code.
-
getAllSupportedLanguages
This method returns all the supported languages in the site.- Returns:
- a set of strings. Each string represents a language ISO code.
-
getUserGroupsForUser
This method returns a set of user groups the provided user belongs to.- Parameters:
userModel- - The model representing the user whose user groups to retrieve.- Returns:
- a set of
UserGroupModelinstances.
-
getUserService
-
setUserService
-
getStoreSessionFacade
-
setStoreSessionFacade
-