Class TopbarManager
java.lang.Object
com.jalios.jcms.uicomponent.topbar.TopbarManager
- All Implemented Interfaces:
JPropertiesListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.since jcms-10.0.3.classCompares TopbarApplicationItem based following order : - Firstly, items from user preferences - Secondly, items from ShortCut ordered by label - Thirdly, items from properties ordered randomly since they have no labelclassCompares TopbarItem based on their indexclassCompares TopbarItem based on their label and the userlangclassCompares TopbarItem based on their index -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancanUsePublishMenu(Member mbr) Returns true if the given member can use the Publish menu.booleandisplayTopbar(JcmsContext jcmsContext) Checks if topbar must be displayed for current requestprotected List<TopbarApplicationItem> getApplicationsFromPreferences(Member mbr, Map<String, TopbarApplicationItem> allAppMap, String preferenceKey) Deprecated.since jcms-10.0.3.getApplicationsFromPreferencesMap(String preference) Deprecated.since jcms-10.0.3.getFavoriteApplicationSet(Member mbr, String lang) Deprecated.since jcms-10.0.3.getGlobalApplicationSet(Member mbr, String lang) Deprecated.since jcms-10.0.3.static TopbarManagergetSortedTopbarItemSet(String lang) Deprecated.since jcms-10.0.3.booleanisFirstLevelApp(Member mbr, AbstractShortcut shortcut) Deprecated.since jcms-10.0.3.voidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.boolean
-
Field Details
-
TOPBAR_HANDLER_REQUEST_ATTR
- See Also:
-
TOPBAR_APPLICATION_MEMBERPREFS_KEY
- See Also:
-
TOPBAR_APPLICATION_PROP_PREFIX
- See Also:
-
TOPBAR_ITEM_PREFIX_PROP
- See Also:
-
ORDER_PROP_SUFFIX
- See Also:
-
ICON_PROP_SUFFIX
- See Also:
-
WRAP_LOGO_WITH_H1
- See Also:
-
ALWAYS_WRAP_LOGO_WITH_H1
- See Also:
-
TOPBAR_SEARCH_ITEM_PROP_PREFIX
- See Also:
-
ACL_CAN_USE_PUBLISH_MENU
- See Also:
-
-
Method Details
-
getInstance
-
propertiesChange
Description copied from interface:JPropertiesListenerInvoked 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.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- 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
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
- Parameters:
lang- the language- Returns:
- the set of TopbarItem, ordered by index
-
getTopbarSearchItemSet
-
isFirstLevelApp
Deprecated.since jcms-10.0.3. UseApplicationManagerinstead- Parameters:
mbr- theMembershortcut- theAbstractShortcut- Returns:
- true if given shortcut is at first level for given
Member
-
getFavoriteApplicationSet
Deprecated.since jcms-10.0.3. UseApplicationManagerinstead- Parameters:
mbr- theMemberlang- the language- Returns:
- the set of TopbarApplicationItem the user can read, ordered by his preferences
-
getUnorderedFavoriteApplicationList
Deprecated.since jcms-10.0.3. UseApplicationManagerinstead- Parameters:
mbr- the member- Returns:
- the set of TopbarApplicationItem the user can read, ordered by his preferences
-
getGlobalApplicationSet
Deprecated.since jcms-10.0.3. UseApplicationManagerinstead- Parameters:
mbr- theMemberlang- 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. UseApplicationManagerinstead- Parameters:
mbr- theMemberallAppMap- the map ofTopbarApplicationItemthe mbr can readpreferenceKey- the preference key available in the member preference property- Returns:
- a List of
TopbarApplicationItemfrom 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. UseApplicationManagerinstead- Throws:
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOException
-
canUsePublishMenu
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
-