int itemID = parameters.getParameterAsInteger("itemID",-1);
int highlightID = parameters.getParameterAsInteger("highlightID",-1);
String baseURL = contextPath+"/admin/epeople?administrative-continue="+knot.getId();
/* First, set up our various data structures */
Item item = Item.find(context, itemID);
Bundle[] bundles = item.getBundles();
Bitstream[] bitstreams;
ArrayList<ResourcePolicy> itemPolicies = (ArrayList<ResourcePolicy>)AuthorizeManager.getPolicies(context, item);
ArrayList<ResourcePolicy> bundlePolicies = new ArrayList<ResourcePolicy>();
ArrayList<ResourcePolicy> bitstreamPolicies = new ArrayList<ResourcePolicy>();
// DIVISION: main
Division main = body.addInteractiveDivision("edit-item-policies",contextPath+"/admin/authorize",Division.METHOD_POST,"primary administrative authorization");
main.setHead(T_main_head.parameterize(item.getHandle(),item.getID()));
main.addPara().addHighlight("italic").addContent(T_main_para1);
main.addPara().addHighlight("italic").addContent(T_main_para2);
Table table = main.addTable("policies-confirm-delete",itemPolicies.size() + 3, 5);
Row header = table.addRow(Row.ROLE_HEADER);
header.addCell();
header.addCell().addContent(T_head_id);
header.addCell().addContent(T_head_action);
header.addCell().addContent(T_head_group);
header.addCell();
// First, the item's policies are listed
Row subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
subheader.addCell(1, 4).addHighlight("bold").addContent(T_subhead_item);
subheader.addCell().addHighlight("bold").addXref(baseURL + "&submit_add_item", T_add_itemPolicy_link);
this.rowBuilder(baseURL, table, itemPolicies, item.getID(), Constants.ITEM, highlightID);
// Next, one by one, we get the bundles
for (Bundle bundle : bundles) {
subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
subheader.addCell(null, null, 1, 4, "indent").addHighlight("bold").addContent(T_subhead_bundle.parameterize(bundle.getName(),bundle.getID()));