%@ 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.utils.Utils" %>
<%@ page import="org.crosswire.utils.HTTPUtils" %>
<%@ page import="org.crosswire.community.projects.ntmss.data.Feature" %>
<%@ page import="org.crosswire.community.projects.ntmss.data.Feature.FeatureDefinition" %>
<%
String userName = Sessions.getSessionStringValue(request, "userName");
String featureCode = request.getParameter("featureCode");
if (featureCode != null) featureCode = new String(featureCode.getBytes("iso8859-1"), "UTF-8");
String category = request.getParameter("category");
if (category != null) category = new String(category.getBytes("iso8859-1"), "UTF-8");
String description = request.getParameter("description");
if (description != null) description = new String(description.getBytes("iso8859-1"), "UTF-8");
String labels = request.getParameter("labels");
if (labels != null) labels = new String(labels.getBytes("iso8859-1"), "UTF-8");
String constraints = request.getParameter("constraints");
if (constraints != null) constraints = new String(constraints.getBytes("iso8859-1"), "UTF-8");
String notes = request.getParameter("notes");
if (notes != null) notes = new String(notes.getBytes("iso8859-1"), "UTF-8");
String dialogJavaScript = request.getParameter("dialogJavaScript");
if (dialogJavaScript != null) dialogJavaScript = new String(dialogJavaScript.getBytes("iso8859-1"), "UTF-8");
String isManuscriptFeature = request.getParameter("isManuscriptFeature");
String isPageFeature = request.getParameter("isPageFeature");
String isSurrogateFeature = request.getParameter("isSurrogateFeature");
String isUserFeature = request.getParameter("isUserFeature");
if (userName != null && featureCode != null) {
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);
boolean anonymous = userName == null || userName.length() == 0;
if (anonymous) {
out.print("
Submit a new or modified feature definition
| featureCode | feature code to modify or add. |
| category | category for feature |
| description | brief description of feature |
| labels | labels for value fields of feature. ';' to separate, e.g., "Repository Name; URL" |
| constraints | constraints for value fields of feature. possible values: bool, stringVal[1,2], intVal[1,2], dateVal[1,2]. with stringVal fields, a valid choice list can be provided in brackets, e.g., "stringVal1[choice 1, choice 2]"). separate multiple fields with ';', e.g., "stringVal1; stringVal2" |
| isManuscriptFeature | (true | false) if this feature can be applied to a whole manuscript |
| isPageFeature | (true | false) if this feature can be applied a manuscript page |
| isSurrogateFeature | (true | false) if this feature can be applied to a surrogate of a manuscript page |
| isUserFeature | (true | false) if this feature should be scoped local to the creator of the feature |
| notes | Any notes for this feature |