<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="org.crosswire.utils.Sessions" %> <%@ page import="org.crosswire.community.RightsAndRoles" %> <%@ page import="org.crosswire.community.projects.ntmss.data.ShelfInstance" %> <% String userName = Sessions.getSessionStringValue(request, "userName"); int shelfID = -1; try {shelfID = Integer.parseInt(request.getParameter("shelfID"));} catch (Exception e){} if (shelfID > -1) { response.setContentType("text/xml"); String role = "VMR Administrator"; // let's check to see if we're a privileged user boolean permission = RightsAndRoles.hasRole(request, response, role); // --------------------------------------------- // if (!permission) { %> <% return; } ShelfInstance si = ShelfInstance.getShelfInstance(shelfID); if (si == null) { %> <% return; } ShelfInstance.deleteShelfInstance(si.getShelfInstanceID()); %> <% return; } %>

shelfinstance/delete

completely delete a shelf instance and all associated page links

Parameters

shelfIDshelf id of the shelf instance to delete