public JSONEscapeObject createJsonSelectedMenus(String siteId, Item item, Long siteProfileClassId) throws Exception {
JSONEscapeObject jsonResult = new JSONEscapeObject();
Iterator<?> iterator = item.getMenus().iterator();
Vector<JSONEscapeObject> menus = new Vector<JSONEscapeObject>();
while (iterator.hasNext()) {
Menu menu = (Menu) iterator.next();
JSONEscapeObject menuObject = new JSONEscapeObject();
menuObject.put("menuId", menu.getMenuId());
menuObject.put("menuLongDesc", Utility.formatMenuName(siteId, menu.getMenuId(), siteProfileClassId));
menuObject.put("siteDomainName", menu.getSiteDomain().getSiteDomainLanguage().getSiteName());
menus.add(menuObject);
}
jsonResult.put("menus", menus);
jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);