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

Public Member Functions

void addToMenu (ElephantMenuBar bar)
 
void addToSessionMenu (ElephantSubmenu submenu)
 
- 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 showAcceptance (String path, final Command command)
 
static void showAcceptances ()
 
static void showContact (Contact contact)
 
static void showContact (String id)
 
static void showConvocation (String id)
 
static void showService (String id)
 
static void showParticipations (String entityPath)
 
static void showSubscriptions (Contact contact)
 
static void showOrganigram (Contact contact)
 
- 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

- Protected Member Functions inherited from org.turro.menu.ElephantMenu
void addToToolsMenu (ElephantSubmenu submenu)
 

Detailed Description

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

Definition at line 43 of file ContactMenu.java.

Member Function Documentation

◆ addToMenu()

void org.turro.contacts.zul.menu.ContactMenu.addToMenu ( ElephantMenuBar  bar)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 46 of file ContactMenu.java.

46  {
47  bar.addMenu("Contacts", Permission.from("contact:list"))
48  .addSubmenu()
49  //.addMenuitem("My contacts", "contacts", "/contact/mycontacts.zul", false)
50  .addMenuitem("Contacts", "contacts", "/contact/contacts.zul", true)
51  .addMenuitem("New contact", "contact_new", (EventListener) (Event event) -> {
52  ContactMenu.showContact((String) null);
53  }, Permission.from("contact:new"))
54  .addMenuitem("Pending to accept", "/contact/relation/pendingToAccept.zul", false, Permission.from("contact:new"))
55  .addMenuitem("Contact proposals", "/contact/proposals.zul", Permission.from("contact-proposal:import"))
56  .addMenuitem("Relation proposals", "/contact/importer/importer.zul", Permission.from("contact-proposal:import"))
57  .addMenuitem("Social grups check", "/contact/relation/socialCheck.zul", false, Permission.from("contact:new"))
58  .addMenuitem("Name proposals", "/contact/names/names.zul", false, Permission.from("contact:new"))
59  .addMenuSeparator()
60  .addMenuitem("Field definitions", "/contact/fielddefs.zul", Permission.from("contact-field:list"))
61  .addToolbarSeparator(true)
62  .addMenuitem("Subscriptions", "forward", (EventListener) (Event event) -> {
63  ContactMenu.showSubscriptions((Contact) Authentication.getIContact().getContact());
64  }, Permission.from("contact:all"));
65  }
Here is the call graph for this function:

◆ addToSessionMenu()

void org.turro.contacts.zul.menu.ContactMenu.addToSessionMenu ( ElephantSubmenu  submenu)

Reimplemented from org.turro.menu.ElephantMenu.

Definition at line 68 of file ContactMenu.java.

68  {
69  submenu.addMenuSeparator()
70  .addMenuitem("Groups", "group", "/contact/groupIt/groups.zul", true, Permission.from("groups:list"))
71  .addMenuitem("Acceptance", "acceptation", "/contact/acceptances.zul", true)
72  .addMenuitem("Participations", "participation", "/contact/entityParticipation.zul", false, Permission.from("contact:all"))
73  .addMenuitem("Agreements", "acceptation", "/agreements/agreements.zul", false, Permission.from("contact:all"))
74  .addMenuSeparator()
75  .addMenuitem("New convocation", "/contact/convocation/convocation.zul", Permission.from("convocation:new"));
76  }
Here is the call graph for this function:

◆ showAcceptance()

static void org.turro.contacts.zul.menu.ContactMenu.showAcceptance ( String  path,
final Command  command 
)
static

Definition at line 78 of file ContactMenu.java.

78  {
79  if(!Strings.isBlank(path)) {
80  Framework frame = Framework.getCurrent();
81  if(frame != null) {
82  frame.getDesktop().setAttribute("acceptancePath", path);
83  Modal.doModal(ElephantMenu.makeInclude("/contact/acceptance.zul"), new Command() {
84  @Override
85  public Object execute(Context context) {
86  ModalWindow mw = (ModalWindow) context.get("win");
87  if(mw.getResult() == 1) {
88  if(command != null) command.execute(context);
89  }
90  return null;
91  }
92  });
93  }
94  }
95  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showAcceptances()

static void org.turro.contacts.zul.menu.ContactMenu.showAcceptances ( )
static

Definition at line 97 of file ContactMenu.java.

97  {
98  Framework frame = Framework.getCurrent();
99  frame.addContent(I_.get("Acceptance"), ElephantMenu.makeInclude("/contact/acceptances.zul"));
100  frame.invalidateSelected();
101  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showContact() [1/2]

static void org.turro.contacts.zul.menu.ContactMenu.showContact ( Contact  contact)
static

Definition at line 103 of file ContactMenu.java.

103  {
104  showEntity(contact.getId(), "contactId", "Contact", "/contact/contact.zul", Map.of("contactGenerated", contact));
105  }
static void showEntity(Object id, String attribute, String label, String include)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showContact() [2/2]

static void org.turro.contacts.zul.menu.ContactMenu.showContact ( String  id)
static

Definition at line 107 of file ContactMenu.java.

107  {
108  showEntity(id, "contactId", "Contact", "/contact/contact.zul");
109  }
Here is the call graph for this function:

◆ showConvocation()

static void org.turro.contacts.zul.menu.ContactMenu.showConvocation ( String  id)
static

Definition at line 111 of file ContactMenu.java.

111  {
112  showEntity(id, "convocationId", "Convocation", "/contact/convocation/convocation.zul");
113  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showOrganigram()

static void org.turro.contacts.zul.menu.ContactMenu.showOrganigram ( Contact  contact)
static

Definition at line 127 of file ContactMenu.java.

127  {
128  showZulFile("Organigram", "/contact/organigram.zul", Map.of("contact", contact));
129  }
static void showZulFile(String label, String include)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showParticipations()

static void org.turro.contacts.zul.menu.ContactMenu.showParticipations ( String  entityPath)
static

Definition at line 119 of file ContactMenu.java.

119  {
120  showZulFile("Participations", "/contact/entityParticipation.zul", Map.of("entityPath", entityPath));
121  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showService()

static void org.turro.contacts.zul.menu.ContactMenu.showService ( String  id)
static

Definition at line 115 of file ContactMenu.java.

115  {
116  showEntity(id, "serviceId", "Service", "/contact/service/service.zul");
117  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showSubscriptions()

static void org.turro.contacts.zul.menu.ContactMenu.showSubscriptions ( Contact  contact)
static

Definition at line 123 of file ContactMenu.java.

123  {
124  showZulFile("Subscriptions", "/contact/subscriptions.zul", Map.of("contact", contact));
125  }
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: