else if (button.startsWith("submit_wf_create_"))
{
int step = Integer.parseInt(button.substring(17));
// Create new group
Group newGroup = collection.createWorkflowGroup(step);
collection.update();
// Forward to group edit page
response.sendRedirect(response.encodeRedirectURL(request
.getContextPath()
+ "/tools/group-edit?group_id=" + newGroup.getID()));
}
else if (button.equals("submit_admins_create"))
{
// Create new group
Group newGroup = collection.createAdministrators();
collection.update();
// Forward to group edit page
response.sendRedirect(response.encodeRedirectURL(request
.getContextPath()
+ "/tools/group-edit?group_id=" + newGroup.getID()));
}
else if (button.equals("submit_admins_delete"))
{
// Remove the administrators group.
Group g = collection.getAdministrators();
collection.removeAdministrators();
collection.update();
g.delete();
// Show edit page again - attributes set in doDSPost()
JSPManager.showJSP(request, response, "/tools/edit-collection.jsp");
}
else if (button.equals("submit_submitters_create"))
{
// Create new group
Group newGroup = collection.createSubmitters();
collection.update();
// Forward to group edit page
response.sendRedirect(response.encodeRedirectURL(request
.getContextPath()
+ "/tools/group-edit?group_id=" + newGroup.getID()));
}
else if (button.equals("submit_submitters_delete"))
{
// Remove the administrators group.
Group g = collection.getSubmitters();
collection.removeSubmitters();
collection.update();
g.delete();
// Show edit page again - attributes set in doDSPost()
JSPManager.showJSP(request, response, "/tools/edit-collection.jsp");
}
else if (button.equals("submit_authorization_edit"))
{
// Forward to policy edit page
response.sendRedirect(response.encodeRedirectURL(request
.getContextPath()
+ "/tools/authorize?collection_id="
+ collection.getID() + "&submit_collection_select=1"));
}
else if (button.startsWith("submit_wf_edit_"))
{
int step = Integer.parseInt(button.substring(15));
// Edit workflow group
Group g = collection.getWorkflowGroup(step);
response.sendRedirect(response.encodeRedirectURL(request
.getContextPath()
+ "/tools/group-edit?group_id=" + g.getID()));
}
else if (button.equals("submit_submitters_edit"))
{
// Edit submitters group
Group g = collection.getSubmitters();
response.sendRedirect(response.encodeRedirectURL(request
.getContextPath()
+ "/tools/group-edit?group_id=" + g.getID()));
}
else if (button.equals("submit_admins_edit"))
{
// Edit 'collection administrators' group
Group g = collection.getAdministrators();
response.sendRedirect(response.encodeRedirectURL(request
.getContextPath()
+ "/tools/group-edit?group_id=" + g.getID()));
}
else if (button.startsWith("submit_wf_delete_"))
{
// Delete workflow group
int step = Integer.parseInt(button.substring(17));
Group g = collection.getWorkflowGroup(step);
collection.setWorkflowGroup(step, null);
// Have to update to avoid ref. integrity error
collection.update();
g.delete();
// Show edit page again - attributes set in doDSPost()
JSPManager.showJSP(request, response, "/tools/edit-collection.jsp");
}
else if (button.equals("submit_create_template"))