Class TopbarManager

java.lang.Object
com.jalios.jcms.uicomponent.topbar.TopbarManager
All Implemented Interfaces:
JPropertiesListener

public class TopbarManager extends Object implements JPropertiesListener
  • Field Details

  • Method Details

    • getInstance

      public static TopbarManager getInstance()
    • propertiesChange

      public void propertiesChange(JProperties properties)
      Description copied from interface: JPropertiesListener
      Invoked after properties have been modified in JCMS and save on disk.

      You cannot alter the value received in parameters.

      Note that properties parameter may be null, a limited set of site properties, or all site properties.

      To check that a property has been modified, reload the "current" property instead using channel.getProperties or channel.getProperty.

      Specified by:
      propertiesChange in interface JPropertiesListener
      Parameters:
      properties - the properties which have been submitted to change
    • wrapLogoWithH1

      public boolean wrapLogoWithH1()
      Returns:
      true if logo should be wrapped in some cases with an H1
      Since:
      10.0.5
    • alwaysWrapLogoWithH1

      public boolean alwaysWrapLogoWithH1()
      Returns:
      true if logo should be always be wrapped in some cases with an H1 (Depends on alwaysWrapLogoWithH1()
      Since:
      10.0.5
    • displayTopbar

      public boolean displayTopbar(JcmsContext jcmsContext)
      Checks if topbar must be displayed for current request
      Parameters:
      jcmsContext - the current user context
      Returns:
      whether topbar is to be displayed or not
      Since:
      jcms-10.0.9
    • getSortedTopbarItemSet

      public Set<TopbarItem> getSortedTopbarItemSet(String lang)
      Parameters:
      lang - the language
      Returns:
      the set of TopbarItem, ordered by index
    • getTopbarSearchItemSet

      public Set<TopbarSearchItem> getTopbarSearchItemSet()
    • isFirstLevelApp

      @Deprecated public boolean isFirstLevelApp(Member mbr, AbstractShortcut shortcut)
      Deprecated.
      since jcms-10.0.3. Use ApplicationManager instead
      Parameters:
      mbr - the Member
      shortcut - the AbstractShortcut
      Returns:
      true if given shortcut is at first level for given Member
    • getFavoriteApplicationSet

      @Deprecated public Set<TopbarApplicationItem> getFavoriteApplicationSet(Member mbr, String lang)
      Deprecated.
      since jcms-10.0.3. Use ApplicationManager instead
      Parameters:
      mbr - the Member
      lang - the language
      Returns:
      the set of TopbarApplicationItem the user can read, ordered by his preferences
    • getUnorderedFavoriteApplicationList

      @Deprecated public List<TopbarApplicationItem> getUnorderedFavoriteApplicationList(Member mbr)
      Deprecated.
      since jcms-10.0.3. Use ApplicationManager instead
      Parameters:
      mbr - the member
      Returns:
      the set of TopbarApplicationItem the user can read, ordered by his preferences
    • getGlobalApplicationSet

      @Deprecated public Set<TopbarApplicationItem> getGlobalApplicationSet(Member mbr, String lang)
      Deprecated.
      since jcms-10.0.3. Use ApplicationManager instead
      Parameters:
      mbr - the Member
      lang - the language
      Returns:
      the set of TopbarApplicationItem the user can read, ordered by his preferences
    • getApplicationsFromPreferences

      @Deprecated protected List<TopbarApplicationItem> getApplicationsFromPreferences(Member mbr, Map<String,TopbarApplicationItem> allAppMap, String preferenceKey)
      Deprecated.
      since jcms-10.0.3. Use ApplicationManager instead
      Parameters:
      mbr - the Member
      allAppMap - the map of TopbarApplicationItem the mbr can read
      preferenceKey - the preference key available in the member preference property
      Returns:
      a List of TopbarApplicationItem from memberPreferences (DB or properties)
    • getApplicationsFromPreferencesMap

      @Deprecated protected Map<String,String[]> getApplicationsFromPreferencesMap(String preference) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
      Deprecated.
      since jcms-10.0.3. Use ApplicationManager instead
      Throws:
      com.fasterxml.jackson.core.JsonParseException
      com.fasterxml.jackson.databind.JsonMappingException
      IOException
    • canUsePublishMenu

      public boolean canUsePublishMenu(Member mbr)
      Returns true if the given member can use the Publish menu.
      Parameters:
      mbr - the member
      Returns:
      true if the given member can use the Publish menu.
      Since:
      jcms-10.0.3