BrightSide Workbench Full Report + Source Code
org.turro.alliance.menu.AllianceMenu Class Reference
Inheritance diagram for org.turro.alliance.menu.AllianceMenu:
Collaboration diagram for org.turro.alliance.menu.AllianceMenu:

Public Member Functions

void addToMenu (ElephantMenuBar bar)
 
- Public Member Functions inherited from org.turro.menu.ElephantMenu
 ElephantMenu ()
 
 ElephantMenu (String label)
 
 ElephantMenu (String label, String image)
 
ElephantMenuBar getMenuBar ()
 
ElephantMenu getParentMenu ()
 
ElephantSubmenu getParentSubmenu ()
 
ElephantSubmenu addSubmenu ()
 
int compareTo (ElephantMenu o)
 

Additional Inherited Members

- Static Public Member Functions inherited from org.turro.menu.ElephantMenu
static String makeInclude (String include)
 
static void showEntity (Object id, String attribute, String label, String include)
 
static void showEntity (Object id, String attribute, String label, String include, Map< String, Object > dynProps)
 
static void showZulFile (String label, String include)
 
static void showZulFile (String label, String include, Map< String, Object > dynProps)
 
static void showModalZulFile (String label, String source, Command command)
 
static void showModalZulFile (String label, String include, Map args, Command command)
 
static void showPopupZulFile (String label, String include)
 
static void showPopupZulFile (String label, String include, Map args)
 
static void showEntityModal (Object id, String attribute, String include, Command command)
 
- Protected Member Functions inherited from org.turro.menu.ElephantMenu
void addToSessionMenu (ElephantSubmenu submenu)
 
void addToToolsMenu (ElephantSubmenu submenu)
 

Detailed Description

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

Definition at line 45 of file AllianceMenu.java.

Member Function Documentation

◆ addToMenu()

void org.turro.alliance.menu.AllianceMenu.addToMenu ( ElephantMenuBar  bar)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 48 of file AllianceMenu.java.

48  {
49  bar.addMenu("Alliance", Permission.from("@alliance_admin:on"))
50  .addSubmenu()
51  .addMenuitem("Categories", "/alliance/categories.zul", Permission.from(() -> {
52  return Clients.hasMembers(AxClient.CLIENT_SERVICE);
53  }))
54  .addMenuitem("Projects", "/alliance/projects.zul", Permission.from(() -> {
55  return Servers.hasServers(AxServer.SERVER_SERVICE);
56  }))
57  .addMenuitem("Preferences", "/alliance/preferences.zul", Permission.from(() -> {
58  return Servers.hasServers(AxServer.SERVER_SERVICE);
59  }))
60  .addMenuitem("Pending requests", "/alliance/requests.zul", Permission.from(() -> {
61  return Servers.hasServers(AxServer.SERVER_SERVICE);
62  }))
63  .addMenuitem("Full requests", "/alliance/participations.zul", Permission.from(() -> {
64  return Servers.hasServers(AxServer.SERVER_SERVICE);
65  }))
66  .addMenuSeparator()
67  .addMenuitem("Talent categories", "/alliance/talentCategories.zul", Permission.from(() -> {
68  return Clients.hasMembers(AxClient.CLIENT_SERVICE);
69  }))
70  .addMenuSeparator()
71  .addMenuitem("Update server", "alliance", (EventListener) (Event event) -> {
72  Dialogs.title(I_.get("Select server"))
73  .width("400px")
74  .height("200px")
75  .addField(DialogField.field("Server").onEditor(() -> {
76  return new AllianceServerCombobox();
77  }))
78  .onOk((dialogs) -> {
79  WsServer server = dialogs.<AllianceServerCombobox>getEditor("Server").getObjectValue();
80  if(server != null) Servers.getData(server, AxConstants.UPDATE_SERVER, Jsons.object());
81  })
82  .emptyCancel()
83  .show();
84  }, Permission.from(() -> {
85  return Permission.from("alliance:connect").check() && Servers.hasServers(AxServer.SERVER_SERVICE);
86  }))
87  .addMenuitem("Connect to members", "alliance", (EventListener) (Event event) -> {
88  ImportFromMembers.connect();
89  }, Permission.from(() -> {
90  return Permission.from("alliance:connect").check() && Clients.hasMembers(AxClient.CLIENT_SERVICE);
91  }));
92  }
Here is the call graph for this function:

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