private List<MenuItemDescriptor> createOperationMenuItemDescriptors(int groupId, String parentGroupId,
List<OperationDefinition> operations) {
List<MenuItemDescriptor> ret = new ArrayList<MenuItemDescriptor>();
for (OperationDefinition def : operations) {
MenuItemDescriptor descriptor = new MenuItemDescriptor();
descriptor.setMenuItemId("operation_" + def.getId());
descriptor.setName(def.getDisplayName());
String url = "/rhq/group/operation/groupOperationScheduleNew.xhtml";
url += "?opId=" + def.getId();
url += "&groupId=" + groupId;
if (parentGroupId != null) {
url += "&parentGroupId=" + parentGroupId;
}
descriptor.setUrl(url);
ret.add(descriptor);
}
return ret;