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

Public Member Functions

 ContactsUserMenu ()
 
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 35 of file ContactsUserMenu.java.

Constructor & Destructor Documentation

◆ ContactsUserMenu()

org.turro.contacts.user.menu.ContactsUserMenu.ContactsUserMenu ( )

Definition at line 37 of file ContactsUserMenu.java.

37  {
38  super("Social", null, 2);
39  }

Member Function Documentation

◆ getDetail()

Object org.turro.contacts.user.menu.ContactsUserMenu.getDetail ( )

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

Definition at line 143 of file ContactsUserMenu.java.

143  {
144  return null;
145  }
Here is the caller graph for this function:

◆ initMenu()

void org.turro.contacts.user.menu.ContactsUserMenu.initMenu ( )

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

Definition at line 42 of file ContactsUserMenu.java.

42  {
43  addChild(new DefaultUserMenu("Contacts", null, "/user/mycontacts") {
44  @Override
45  public boolean isInRole() {
46  return Application.getApplication().isInRole("contact:list|contact:list-all");
47  }
48 
49  @Override
50  public Object getDetail() {
51  return null;
52  }
53  });
54  addChild(new DefaultUserMenu("Profile", null, "/user/profile") {
55  @Override
56  public boolean isInRole() {
57  return true;
58  }
59  @Override
60  public Object getDetail() {
61  return null;
62  }
63  });
64 // addChild(new DefaultUserMenu("About", null, "/user/about") {
65 // @Override
66 // public boolean isInRole() {
67 // return true;
68 // }
69 // @Override
70 // public Object getDetail() {
71 // return null;
72 // }
73 // });
74  addChild(new DefaultUserMenu("Tell someone about this site", null, "/user/tellsomeone") {
75  @Override
76  public boolean isInRole() {
77  return new File(ElephantContext.getRealPath("/user/tellsomeone")).exists();
78  }
79  @Override
80  public Object getDetail() {
81  return null;
82  }
83  });
84  IUserMenu session = UserMenus.getSessionMenu();
85  session.addChild(new DefaultUserMenu("Acceptances", null, "/user/acceptances") {
86  @Override
87  public boolean isInRole() {
88  return !Application.getApplication().getConstructor().isOutsider();
89  }
90  @Override
91  public Object getDetail() {
92  return null;
93  }
94  });
95  session.addChild(new DefaultUserMenu("Agreements", null, "/user/myagreements") {
96  @Override
97  public boolean isInRole() {
98  return !Application.getApplication().getConstructor().isOutsider();
99  }
100  @Override
101  public Object getDetail() {
102  return UserSummaries.isNotZero("pendingSignature") ? UserSummaries.getAttribute("pendingSignature") : null;
103  }
104  });
105  session.addChild(new DefaultUserMenu("Subscriptions", null, "/user/subscriptions") {
106  @Override
107  public boolean isInRole() {
108  return !Application.getApplication().getConstructor().isOutsider();
109  }
110  @Override
111  public Object getDetail() {
112  return null;
113  }
114  });
115  session.addChild(new DefaultUserMenu("Push notifications", null, "/user/push") {
116  @Override
117  public boolean isInRole() {
118  return !Application.getApplication().getConstructor().isOutsider();
119  }
120  @Override
121  public Object getDetail() {
122  return null;
123  }
124  });
125  session.addChild(new DefaultUserMenu("Change password", null, "/user/changepass") {
126  @Override
127  public boolean isInRole() {
128  return !Application.getApplication().getConstructor().isOutsider();
129  }
130  @Override
131  public Object getDetail() {
132  return null;
133  }
134  });
135  }
IUserMenu addChild(IUserMenu menu)
Here is the call graph for this function:

◆ isInRole()

boolean org.turro.contacts.user.menu.ContactsUserMenu.isInRole ( )

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

Definition at line 138 of file ContactsUserMenu.java.

138  {
139  return !isHidden() && !Application.getApplication().getConstructor().isOutsider();
140  }
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: