Class NavigationConfigurationService
java.lang.Object
io.meeds.social.navigation.service.NavigationConfigurationService
A Service to manage Topbar and Sidebar configurations
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.meeds.social.navigation.model.NavigationConfigurationio.meeds.social.navigation.model.NavigationConfigurationgetConfiguration(String username, Locale locale, boolean resolve) List<io.meeds.social.navigation.model.TopbarApplication> io.meeds.social.navigation.model.SidebarConfigurationgetSidebarConfiguration(String username, Locale locale) io.meeds.social.navigation.constant.SidebarModegetSidebarUserMode(String username) Retrieves the preferred mode of sidebar by a userio.meeds.social.navigation.model.TopbarConfigurationgetTopbarConfiguration(String username, Locale locale) voidinit()voidupdateConfiguration(io.meeds.social.navigation.model.NavigationConfiguration navigationConfiguration) Updates the Navigation configurationvoidupdateSidebarUserMode(String username, io.meeds.social.navigation.constant.SidebarMode mode) Updates the preferred mode of sidebar by the user
-
Field Details
-
NAVIGATION_CONFIGURATION_UPDATED_EVENT
- See Also:
-
-
Constructor Details
-
NavigationConfigurationService
public NavigationConfigurationService()
-
-
Method Details
-
init
@PostConstruct public void init() -
getConfiguration
public io.meeds.social.navigation.model.NavigationConfiguration getConfiguration()- Returns:
NavigationConfigurationwith the complete configuration of Navigation
-
getConfiguration
public io.meeds.social.navigation.model.NavigationConfiguration getConfiguration(String username, Locale locale, boolean resolve) - Parameters:
resolve- either resolve name and icon of elements or not- Returns:
NavigationConfigurationwith the complete configuration of Navigation
-
getTopbarConfiguration
public io.meeds.social.navigation.model.TopbarConfiguration getTopbarConfiguration(String username, Locale locale) - Parameters:
username- User namelocale-Localeto compute Menu item names- Returns:
TopbarConfigurationswitch user role and customized settings
-
getSidebarConfiguration
public io.meeds.social.navigation.model.SidebarConfiguration getSidebarConfiguration(String username, Locale locale) - Parameters:
username- User namelocale-Localeto compute Menu item names- Returns:
SidebarConfigurationswitch user role and customized settings
-
getSidebarUserMode
Retrieves the preferred mode of sidebar by a user- Parameters:
username- User name as identifier- Returns:
- preferred
SidebarModeor default if not set by user yet
-
getDefaultTopbarApplications
- Returns:
- Default Topbar Applications as configured in
AddOnService
-