model.addMenuItem(item);
}
//Applications
if (returnRole("11")) {
Submenu appMenu = new Submenu();
appMenu.setLabel("Applications");
appMenu.setIcon("ui-icon-note");
item = new MenuItem();
item.setValue("Start New Application");
item.setUrl(this.getURL("applicationCreate"));
appMenu.getChildren().add(item);
model.addSubmenu(appMenu);
}
//Authorization
if (returnRole("12")) { //AUTHORIZER
Submenu authMenu = new Submenu();
authMenu.setLabel("Authorizations");
authMenu.setIcon("ui-icon-circle-check");
item = new MenuItem();
item.setValue("Manage Authorizations");
item.setUrl(this.getURL("authorizerHome"));
authMenu.getChildren().add(item);
model.addSubmenu(authMenu);
}
if (returnRole("22")) {
Submenu superMenu = new Submenu();
superMenu.setLabel("Actions");
superMenu.setIcon("ui-icon-wrench");
item = new MenuItem();
item.setValue("Create Admin");
item.setUrl(this.getURL("createAdmin"));
superMenu.getChildren().add(item);
model.addSubmenu(superMenu);
item = new MenuItem();
item.setValue("Edit Admin");
item.setUrl(this.getURL("editAdminSelect"));
superMenu.getChildren().add(item);
model.addSubmenu(superMenu);
item = new MenuItem();
item.setValue("Create Role");
item.setUrl(this.getURL("createRole"));
superMenu.getChildren().add(item);
model.addSubmenu(superMenu);
item = new MenuItem();
item.setValue("Deactivate Account");
item.setUrl(this.getURL("deactivateAccount"));
superMenu.getChildren().add(item);
model.addSubmenu(superMenu);
item = new MenuItem();
item.setValue("Reactivate Account");
item.setUrl(this.getURL("reactivateAccount"));
superMenu.getChildren().add(item);
model.addSubmenu(superMenu);
item = new MenuItem();
item.setValue("Department Handler");
item.setUrl(this.getURL("departmentHandler"));
superMenu.getChildren().add(item);
model.addSubmenu(superMenu);
}
}