BrightSide Workbench Full Report + Source Code
org.turro.elephant.zul.menu.WwwMenu Class Reference
Inheritance diagram for org.turro.elephant.zul.menu.WwwMenu:
Collaboration diagram for org.turro.elephant.zul.menu.WwwMenu:

Public Member Functions

void addToSessionMenu (ElephantSubmenu submenu)
 
void addToToolsMenu (ElephantSubmenu submenu)
 
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)
 

Static Public Member Functions

static void showWarnings ()
 
static void showLog (String generatorPath, String entityPath)
 
- 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)
 

Additional Inherited Members

Detailed Description

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

Definition at line 45 of file WwwMenu.java.

Member Function Documentation

◆ addToMenu()

void org.turro.elephant.zul.menu.WwwMenu.addToMenu ( ElephantMenuBar  bar)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 121 of file WwwMenu.java.

121  {
122  bar.addMenu("Statistics", Permission.from("sysinfo:list"))
123  .addSubmenu()
124  .addMenuitem("Rankings", "ranking", "/statistics/rankings.zul", false)
125  .addMenuitem("Matchings", "matching", "/statistics/matchings.zul", false);
126  }
Here is the call graph for this function:

◆ addToSessionMenu()

void org.turro.elephant.zul.menu.WwwMenu.addToSessionMenu ( ElephantSubmenu  submenu)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 48 of file WwwMenu.java.

48  {
49  submenu.addMenuitem("Impersonate", "spy", (EventListener) (Event event) -> {
50  InputDialog.getInput(Framework.getCurrent().getPage(),
51  I_.get("Impersonate"),
52  new InputField[] {
53  new InputField("Contact", null, null, 0) {
54  @Override
55  protected HtmlBasedComponent createEditor() {
56  EntityCombobox ec = new EntityCombobox();
57  ec.setRoot("contact");
58  return ec;
59  }
60  @Override
61  protected Object getEditorValue() {
62  return ((EntityCombobox) editor).getObjectValue();
63  }
64  }
65  }, (Context context) -> {
66  InputField[] fields = (InputField[]) context.get("fields");
67  if(fields.length > 0) {
68  for(InputField f : fields) {
69  if("Contact".equals(f.getLabel())) {
70  Authentication.impersonateContact(f.getValue());
71  Clients.evalJavaScript("exitWanted=true;");
72  Application.getApplication().sendRedirect("/app/frame");
73  break;
74  }
75  }
76  }
77  return null;
78  });
79  }, Permission.from(() -> {
80  return Authentication.canImpersonate();
81  }))
82  .addMenuitem("Back to self", "no-spy", (EventListener) (Event event) -> {
83  Authentication.impersonateIContact(null);
84  Clients.evalJavaScript("exitWanted=true;");
85  Application.getApplication().sendRedirect("/app/frame");
86  }, Permission.from(() -> {
87  return Authentication.isBehaving();
88  }))
89  .addMenuitem("Tags", "tag", "/commons/tagEntities.zul", true)
90  .addMenuitem("Warnings", "warn", "/error/warnings.zul")
91  .addMenuitem("Log", "log", (EventListener) (Event event) -> {
92  showLog(null, null);
93  }, Permission.from("contact:log"))
94  .addMenuitem("Skills", "/commons/rootSkills.zul");
95  }
static void showLog(String generatorPath, String entityPath)
Definition: WwwMenu.java:132
Here is the call graph for this function:

◆ addToToolsMenu()

void org.turro.elephant.zul.menu.WwwMenu.addToToolsMenu ( ElephantSubmenu  submenu)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 98 of file WwwMenu.java.

98  {
99  submenu.addMenuitem("Contexts", "www_context", "/www/admin/webadmin.zul", Permission.from("context:list"))
100  .addMenuitem("Files", "/www/admin/files.zul", Permission.from("context:list"))
101  .addMenuitem("Synonyms", "/publication/synonyms.zul", Permission.from("publication:edit"))
102  .addMenuitem("Occurrences", "/bs/apis/occurrences.zul")
103  .addMenuitem("Actors", "/bs/apis/actors.zul")
104  .addMenuitem("Send by entity", "/mail/mailTo.zul", Permission.from("contact:all"))
105  .addMenuitem("Cleanup", "/bs/apis/cleanup.zul")
106  .addMenuitem("Export time tracker", (EventListener) (Event event) -> {
107  TimeTrackerExporter.exportTimeTracker();
108  }, Permission.from("contact:list"))
109  .addMenuSeparator()
110  .addMenuitem("Reset site settings", (EventListener) (Event event) -> {
111  Application.resetSettings();
112  }, Permission.from("context:list"))
113  .addMenuitem("Reset schemes", (EventListener) (Event event) -> {
114  Application.resetSchemes();
115  }, Permission.from("context:list"))
116  .addMenuitem("Configuration", "/www/config/configurator.zul", Permission.from("context:list"))
117  .addMenuSeparator();
118  }
Here is the call graph for this function:

◆ showLog()

static void org.turro.elephant.zul.menu.WwwMenu.showLog ( String  generatorPath,
String  entityPath 
)
static

Definition at line 132 of file WwwMenu.java.

132  {
133  Framework.getCurrent().getDesktop().removeAttribute("generatorPath");
134  Framework.getCurrent().getDesktop().removeAttribute("entityPath");
135  if(!Strings.isBlank(generatorPath)) {
136  Framework.getCurrent().getDesktop().setAttribute("generatorPath", generatorPath);
137  } else if(!Strings.isBlank(entityPath)) {
138  Framework.getCurrent().getDesktop().setAttribute("entityPath", entityPath);
139  }
140  ElephantMenu.showModalZulFile(
141  "@" + I_.get("Log"),
142  "/log/systemLog.zul", null);
143  }
Here is the call graph for this function:

◆ showWarnings()

static void org.turro.elephant.zul.menu.WwwMenu.showWarnings ( )
static

Definition at line 128 of file WwwMenu.java.

128  {
129  showZulFile("Warnings", "/error/warnings.zul");
130  }
static void showZulFile(String label, String include)
Here is the caller graph for this function:

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