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()));
subheader.addCell().addHighlight("bold").addXref(baseURL + "&submit_add_bundle_" + bundle.getID(), T_add_bundlePolicy_link);
bundlePolicies = (ArrayList<ResourcePolicy>)AuthorizeManager.getPolicies(context, bundle);
this.rowBuilder(baseURL, table, bundlePolicies, bundle.getID(), Constants.BUNDLE, highlightID);
// And eventually to the bundle's bitstreams
bitstreams = bundle.getBitstreams();
for (Bitstream bitstream : bitstreams) {
subheader = table.addRow(null,Row.ROLE_HEADER,"subheader");
subheader.addCell(null, null, 1, 4, "doubleIndent").addContent(T_subhead_bitstream.parameterize(bitstream.getName(),bitstream.getID()));
subheader.addCell().addXref(baseURL + "&submit_add_bitstream_" + bitstream.getID(), T_add_bitstreamPolicy_link);
bitstreamPolicies = (ArrayList<ResourcePolicy>)AuthorizeManager.getPolicies(context, bitstream);
this.rowBuilder(baseURL, table, bitstreamPolicies, bitstream.getID(), Constants.BITSTREAM, highlightID);