BrightSide Workbench Full Report + Source Code
org.turro.elephant.user.menu.UserMenus Class Reference

Static Public Member Functions

static Set< IUserMenugetUserMenu (IConstructor constructor)
 
static Object executeMenu (String idMenu)
 
static boolean isInRole (String path)
 
static IUserMenu getSessionMenu ()
 
static IUserMenu getSettingsMenu ()
 
static void setActive ()
 
static String getActive ()
 
static Object getAttribute (String attribute)
 
static void setAttribute (String attribute, Object value)
 
static Map< String, Object > getAttributes ()
 
static void removeAttributes ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 40 of file UserMenus.java.

Member Function Documentation

◆ executeMenu()

static Object org.turro.elephant.user.menu.UserMenus.executeMenu ( String  idMenu)
static

Definition at line 52 of file UserMenus.java.

52  {
53  return doExecuteMenu(userMenus(), idMenu);
54  }
Here is the caller graph for this function:

◆ getActive()

static String org.turro.elephant.user.menu.UserMenus.getActive ( )
static

Definition at line 111 of file UserMenus.java.

111  {
112  return (String) Application.getApplication().getConstructor().getSessionAttribute("currPath_usrmx");
113  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttribute()

static Object org.turro.elephant.user.menu.UserMenus.getAttribute ( String  attribute)
static

Definition at line 117 of file UserMenus.java.

117  {
118  return Application.getApplication().getConstructor().findAttribute("um_" + attribute);
119  }
Here is the call graph for this function:

◆ getAttributes()

static Map<String, Object> org.turro.elephant.user.menu.UserMenus.getAttributes ( )
static

Definition at line 125 of file UserMenus.java.

125  {
126  return Application.getApplication().getConstructor().getSessionAttributeMap("um_");
127  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSessionMenu()

static IUserMenu org.turro.elephant.user.menu.UserMenus.getSessionMenu ( )
static

Definition at line 88 of file UserMenus.java.

88  {
89  for(IUserMenu um : userMenus()) {
90  if(um instanceof SessionUserMenu) {
91  return um;
92  }
93  }
94  return null;
95  }
Here is the caller graph for this function:

◆ getSettingsMenu()

static IUserMenu org.turro.elephant.user.menu.UserMenus.getSettingsMenu ( )
static

Definition at line 97 of file UserMenus.java.

97  {
98  for(IUserMenu um : userMenus()) {
99  if(um instanceof SettingsUserMenu) {
100  return um;
101  }
102  }
103  return null;
104  }
Here is the caller graph for this function:

◆ getUserMenu()

static Set<IUserMenu> org.turro.elephant.user.menu.UserMenus.getUserMenu ( IConstructor  constructor)
static

Definition at line 42 of file UserMenus.java.

42  {
43  if(constructor.getUser() != null) {
44  setActive();
45  UserSummaries.initSummaries(constructor);
46  return userMenus();
47  } else {
48  return Collections.EMPTY_SET;
49  }
50  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInRole()

static boolean org.turro.elephant.user.menu.UserMenus.isInRole ( String  path)
static

Definition at line 56 of file UserMenus.java.

56  {
57  if(!Strings.isBlank(path) && path.startsWith("/user/")) {
58  IUserMenu userMenu = getUserMenuByPath(userMenus(), Path.reduce(path, 2));
59  return userMenu != null ? userMenu.isInRole() : true;
60  }
61  return true;
62  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeAttributes()

static void org.turro.elephant.user.menu.UserMenus.removeAttributes ( )
static

Definition at line 129 of file UserMenus.java.

129  {
130  for(String key : getAttributes().keySet()) {
131  Application.getApplication().getConstructor().removeSessionAttribute("um_" + key);
132  }
133  }
static Map< String, Object > getAttributes()
Definition: UserMenus.java:125
Here is the call graph for this function:

◆ setActive()

static void org.turro.elephant.user.menu.UserMenus.setActive ( )
static

Definition at line 106 of file UserMenus.java.

106  {
107  Application.getApplication().getConstructor().setSessionAttribute("currPath_usrmx",
108  Application.getApplication().getConstructor().getCurrentContext().getPath());
109  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAttribute()

static void org.turro.elephant.user.menu.UserMenus.setAttribute ( String  attribute,
Object  value 
)
static

Definition at line 121 of file UserMenus.java.

121  {
122  Application.getApplication().getConstructor().setSessionAttribute("um_" + attribute, value);
123  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: