BrightSide Workbench Full Report + Source Code
org.turro.financials.user.menu.FinancialsUserMenu Class Reference
Inheritance diagram for org.turro.financials.user.menu.FinancialsUserMenu:
Collaboration diagram for org.turro.financials.user.menu.FinancialsUserMenu:

Public Member Functions

 FinancialsUserMenu ()
 
void initMenu ()
 
boolean isInRole ()
 
Object getDetail ()
 
- Public Member Functions inherited from org.turro.elephant.user.menu.DefaultUserMenu
 DefaultUserMenu (String label, String image)
 
 DefaultUserMenu (String label, String image, String link)
 
 DefaultUserMenu (String label, String image, Function< IUserMenu, Boolean > command)
 
 DefaultUserMenu (String label, String image, int order)
 
 DefaultUserMenu (String label, String image, String link, int order)
 
 DefaultUserMenu (String id, String label, String image, Function< IUserMenu, Boolean > command, int order)
 
String getId ()
 
String getLabel ()
 
String getImage ()
 
int getOrder ()
 
String getLink ()
 
boolean isValid ()
 
boolean isCaption ()
 
boolean isOnlyLabel ()
 
boolean isOnlyImage ()
 
boolean isActive ()
 
IUserMenu getParent ()
 
Set< IUserMenugetChildren ()
 
IUserMenu addChild (IUserMenu menu)
 
boolean execute ()
 
int compareTo (IUserMenu o)
 
boolean isHidden ()
 

Additional Inherited Members

- Protected Member Functions inherited from org.turro.elephant.user.menu.DefaultUserMenu
 DefaultUserMenu (String id, String label, String image, String link, Function< IUserMenu, Boolean > command, int order)
 
void setOrder (int order)
 
- Protected Attributes inherited from org.turro.elephant.user.menu.DefaultUserMenu
IUserMenu parent
 
Set< IUserMenuchildren
 
String id
 
int order
 
Function< IUserMenu, Boolean > command
 

Detailed Description

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

Definition at line 31 of file FinancialsUserMenu.java.

Constructor & Destructor Documentation

◆ FinancialsUserMenu()

org.turro.financials.user.menu.FinancialsUserMenu.FinancialsUserMenu ( )

Definition at line 33 of file FinancialsUserMenu.java.

33  {
34  super("Billing", null, null, 3);
35  }

Member Function Documentation

◆ getDetail()

Object org.turro.financials.user.menu.FinancialsUserMenu.getDetail ( )

Reimplemented from org.turro.elephant.user.menu.DefaultUserMenu.

Definition at line 82 of file FinancialsUserMenu.java.

82  {
83  return null;
84  }
Here is the caller graph for this function:

◆ initMenu()

void org.turro.financials.user.menu.FinancialsUserMenu.initMenu ( )

Reimplemented from org.turro.elephant.user.menu.DefaultUserMenu.

Definition at line 38 of file FinancialsUserMenu.java.

38  {
39  addChild(new DefaultUserMenu("Contracts", null, "/user/contracts") {
40  @Override
41  public boolean isInRole() {
42  return UserSummaries.isNotZero("contractCount");
43  }
44  @Override
45  public Object getDetail() {
46  return UserSummaries.getAttribute("contractCount");
47  }
48  });
49  addChild(new DefaultUserMenu("Documents", null, "/user/documents") {
50  @Override
51  public boolean isInRole() {
52  return UserSummaries.isNotZero("contractCount");
53  }
54  @Override
55  public Object getDetail() {
56  return null;
57  }
58  });
59  addChild(new DefaultUserMenu("Logistic", null, "/user/logistic") {
60  @Override
61  public boolean isInRole() {
62  return UserSummaries.isNotZero("notPreparedCount") ||
63  UserSummaries.isNotZero("notDeliveredCount");
64  }
65  @Override
66  public Object getDetail() {
67  return ((Long) UserSummaries.getAttribute("notPreparedCount", 0)) +
68  ((Long) UserSummaries.getAttribute("notDeliveredCount", 0));
69  }
70  });
71  }
Here is the call graph for this function:

◆ isInRole()

boolean org.turro.financials.user.menu.FinancialsUserMenu.isInRole ( )

Reimplemented from org.turro.elephant.user.menu.DefaultUserMenu.

Definition at line 74 of file FinancialsUserMenu.java.

74  {
75  return !Application.getApplication().getConstructor().isOutsider() && (
76  UserSummaries.isNotZero("contractCount") ||
77  UserSummaries.isNotZero("notPreparedCount") ||
78  UserSummaries.isNotZero("notDeliveredCount"));
79  }
Here is the call graph for this function:
Here is the caller graph for this function:

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