|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zeroexchange.web.navigation.menu.DefaultMenuService
public class DefaultMenuService
Constructor Summary | |
---|---|
DefaultMenuService()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
List<MenuItem> |
filterAccordingPermissions(List<MenuItem> items)
Filters specified list according current user's permissions. |
protected MenuItem |
findItemByKey(List<MenuItem> items,
String key)
Finds item by the key |
String |
getImage(MenuItem menuItem)
Safely returns the menu image. |
String |
getKey(MenuItem menuItem)
Safely returns the menu key. |
List<MenuItem> |
getSubmenu(String key)
Returns submenu of the current menu. |
String |
getTitle(MenuItem menuItem)
Returns the title of the menu item. |
List<MenuItem> |
getTopItems()
Returns top menu items. |
protected boolean |
isMenuItemAllowed(MenuItem menuItem)
Returns true if the menu item is allowed for the current user. |
void |
setImageExtension(String imageExtension)
|
void |
setMenuDescriptionResource(org.springframework.core.io.Resource menuDescriptionResource)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMenuService()
Method Detail |
---|
public void setImageExtension(String imageExtension)
imageExtension
- the imageExtension to setpublic void setMenuDescriptionResource(org.springframework.core.io.Resource menuDescriptionResource)
menuDescriptionResource
- the menuDescriptionResource to set.public List<MenuItem> filterAccordingPermissions(List<MenuItem> items)
MenuService
filterAccordingPermissions
in interface MenuService
public List<MenuItem> getTopItems()
MenuService
getTopItems
in interface MenuService
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public List<MenuItem> getSubmenu(String key)
MenuService
getSubmenu
in interface MenuService
protected MenuItem findItemByKey(List<MenuItem> items, String key)
protected boolean isMenuItemAllowed(MenuItem menuItem)
public String getKey(MenuItem menuItem)
getKey
in interface MenuService
public String getImage(MenuItem menuItem)
MenuService
getImage
in interface MenuService
public String getTitle(MenuItem menuItem)
MenuService
getTitle
in interface MenuService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |