Class NavigationDisplayService

java.lang.Object
io.meeds.layout.service.NavigationDisplayService

@Service public class NavigationDisplayService extends Object
Updates what the topbar and the sidebar show the way the navigation settings page does: the stored configuration is loaded unresolved, the given options are merged into it, and the whole is submitted with both parts, since the navigation configuration service stores whatever it is given and reads the sidebar after the write. The sidebar's items and the users' own modes are never touched. A topbar application's stored name is the key the settings page translates: the label shown in the user's language is what the tool returns and matches a given name against.
  • Field Details

  • Constructor Details

    • NavigationDisplayService

      public NavigationDisplayService()
  • Method Details

    • updateNavigationDisplay

      public NavigationDisplayDescription updateNavigationDisplay(TopbarDisplayOptions topbar, SidebarDisplayOptions sidebar, String username, Locale locale) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Parameters:
      topbar - what the topbar shows, null to leave it
      sidebar - how the sidebar may be displayed, null to leave it
      username - the acting user
      locale - the user's locale, in which application names are matched and returned
      Returns:
      both parts as stored after the update
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when no configuration is stored, or when an application named is not in the topbar
      IllegalAccessException - when the user is not an administrator
      IllegalArgumentException - when both parts are omitted, when an application entry names nothing or a name shared by two applications, when a mode is outside the vocabulary, or when the default mode would not be allowed
      IllegalStateException - when the configuration could not be saved
    • describe

      public NavigationDisplayDescription describe(io.meeds.portal.navigation.model.NavigationConfiguration configuration, Locale locale)
      Parameters:
      configuration - a stored configuration
      locale - the locale of the application names
      Returns:
      its display options, null for null