{
return null;
}
else if (menuType.equalsIgnoreCase(IConstants.PARAM_VAL_FULL_MENU))
{
MenuDAO menuDAO = this.getMenuDAO();
ArrayList list = menuDAO.findMenuItemsForUser(dsName, dbType, userId);
// Replace keys with values from the bundle
list = this.getValuesFromBundle(list, locale);
// remove menu items that the user does not have permissions to
list = this.removeMenuItems(list, privList);
log.debug("After first removal SIZE: " + list.size());
//log.debug(list);
//remove menu items that has no child
list = this.removeMenuItemsWithNoChild(list);
log.debug("After second removal SIZE: " + list.size());
doc = this.createFullMenu(dsName, dbType, userId, list);
this.setDefaultMenu(dsName, dbType, profileId, menuType);
}
else if (menuType.equalsIgnoreCase(IConstants.PARAM_VAL_QUICK_MENU))
{
MenuDAO menuDAO = this.getMenuDAO();
ArrayList list = menuDAO.findMenuItemsForUser(dsName, dbType, userId);
// Replace keys with values from the bundle
list = this.getValuesFromBundle(list, locale);
// remove menu items that the user does not have permissions to
list = this.removeMenuItems(list, privList);
//remove menu items that has no child
list = this.removeMenuItemsWithNoChild(list);
doc = this.createQuickMenu(dsName, dbType, userId, list);
this.setDefaultMenu(dsName, dbType, profileId, menuType);
}
else if (menuType.equalsIgnoreCase(IConstants.PARAM_VAL_MODIFY_MENU))
{
MenuDAO menuDAO = this.getMenuDAO();
ArrayList list = menuDAO.findAllMenuItemsForUser(dsName, dbType, userId);
// Replace keys with values from the bundle
list = this.getValuesFromBundle(list, locale);
// remove menu items that the user does not have permissions to
list = this.removeMenuItems(list, privList);
//remove menu items that has no child
list = this.removeMenuItemsWithNoChild(list);
doc = this.createFullMenu(dsName, dbType, userId, list);
}
else if (menuType.equalsIgnoreCase(IConstants.PARAM_VAL_SELECT_DEFAULT_MENU))
{
MenuDAO menuDAO = this.getMenuDAO();
ArrayList list = menuDAO.findMenuItemsForUser(dsName, dbType, userId);
// Replace keys with values from the bundle
list = this.getValuesFromBundle(list, locale);
// remove menu items that the user does not have permissions to
list = this.removeMenuItems(list, privList);
//remove menu items that has no child