Index: src/edu/ucsb/nceas/metacat/restservice/RestServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/restservice/RestServlet.java	(revision 6246)
+++ src/edu/ucsb/nceas/metacat/restservice/RestServlet.java	(revision 6247)
@@ -40,10 +40,24 @@
  */
 public class RestServlet extends HttpServlet {
 
-    private Logger logMetacat;
-    private ResourceHandler handler;
+    protected Logger logMetacat;
+    protected ResourceHandler handler;
 
     /**
+     * Subclasses should override this method to provide the appropriate handler subclass
+     * @param request
+     * @param response
+     * @return
+     * @throws ServletException
+     * @throws IOException
+     */
+    protected ResourceHandler createHandler(HttpServletRequest request, HttpServletResponse response) 
+		throws ServletException, IOException {
+	    ResourceHandler handler = new ResourceHandler(getServletContext(), request, response);
+	    return handler;
+	}
+    
+    /**
      * Initalize servlet by setting logger
      */
     @Override
@@ -57,7 +71,7 @@
     protected void doGet(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException {
         System.out.println("HTTP Verb: GET");
-        handler = new ResourceHandler(getServletContext(), request, response);
+        handler = createHandler(request, response);
         handler.handle(ResourceHandler.GET);
     }
 
@@ -66,7 +80,7 @@
     protected void doPost(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException {
         System.out.println("HTTP Verb: POST");
-        handler = new ResourceHandler(getServletContext(), request, response);
+        handler = createHandler(request, response);
         handler.handle(ResourceHandler.POST);
     }
 
@@ -75,7 +89,7 @@
     protected void doDelete(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException {
         System.out.println("HTTP Verb: DELETE");
-        handler = new ResourceHandler(getServletContext(), request, response);
+        handler = createHandler(request, response);
         handler.handle(ResourceHandler.DELETE);
     }
 
@@ -84,7 +98,7 @@
     protected void doPut(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException {
         System.out.println("HTTP Verb: PUT");
-        handler = new ResourceHandler(getServletContext(), request, response);
+        handler = createHandler(request, response);
         handler.handle(ResourceHandler.PUT);
     }
 
@@ -93,7 +107,7 @@
     protected void doHead(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException {
         System.out.println("HTTP Verb: HEAD");
-        handler = new ResourceHandler(getServletContext(), request, response);
+        handler = createHandler(request, response);
         handler.handle(ResourceHandler.HEAD);
     }
 }
Index: src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java	(revision 6246)
+++ src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java	(revision 6247)
@@ -232,48 +232,48 @@
     /*
      * API Resources
      */
-    private static final String RESOURCE_OBJECTS = "object";
-    private static final String RESOURCE_FORMATS = "formats";
-    private static final String RESOURCE_META = "meta";
-    private static final String RESOURCE_SESSION = "session";
-    private static final String RESOURCE_IDENTIFIER = "identifier";
-    private static final String RESOURCE_LOG = "log";
-    private static final String RESOURCE_CHECKSUM = "checksum";
-    private static final String RESOURCE_MONITOR = "monitor";
-    private static final String RESOURCE_BASE_URL = "d1";
-    private static final String RESOURCE_REPLICATE = "replicate";
+    protected static final String RESOURCE_OBJECTS = "object";
+    protected static final String RESOURCE_FORMATS = "formats";
+    protected static final String RESOURCE_META = "meta";
+    protected static final String RESOURCE_SESSION = "session";
+    protected static final String RESOURCE_IDENTIFIER = "identifier";
+    protected static final String RESOURCE_LOG = "log";
+    protected static final String RESOURCE_CHECKSUM = "checksum";
+    protected static final String RESOURCE_MONITOR = "monitor";
+    protected static final String RESOURCE_BASE_URL = "d1";
+    protected static final String RESOURCE_REPLICATE = "replicate";
 
     /*
      * API Functions used as URL parameters
      */
-    private static final String FUNCTION_KEYWORD = "op";
-    private static final String FUNCTION_NAME_LOGIN = "login";
-    private static final String FUNCTION_NAME_LOGOUT = "logout";
-    private static final String FUNCTION_NAME_SET_ACCESS = "setaccess";
-    private static final String FUNCTION_NAME_ISREGISTERED = "isregistered";
-    private static final String FUNCTION_NAME_GETALLDOCS = "getalldocids";
-    private static final String FUNCTION_NAME_GETNEXTREV = "getnextrevision";
-    private static final String FUNCTION_NAME_GETNEXTOBJ = "getnextobject";
-    private static final String FUNCTION_NAME_INSERT = "insert";
-    private static final String FUNCTION_NAME_UPDATE = "update";
-    private static final String FUNCTION_NAME_GENERATE_MISSING_SYSTEM_METADATA = "generatemissingsystemmetadata";
+    protected static final String FUNCTION_KEYWORD = "op";
+    protected static final String FUNCTION_NAME_LOGIN = "login";
+    protected static final String FUNCTION_NAME_LOGOUT = "logout";
+    protected static final String FUNCTION_NAME_SET_ACCESS = "setaccess";
+    protected static final String FUNCTION_NAME_ISREGISTERED = "isregistered";
+    protected static final String FUNCTION_NAME_GETALLDOCS = "getalldocids";
+    protected static final String FUNCTION_NAME_GETNEXTREV = "getnextrevision";
+    protected static final String FUNCTION_NAME_GETNEXTOBJ = "getnextobject";
+    protected static final String FUNCTION_NAME_INSERT = "insert";
+    protected static final String FUNCTION_NAME_UPDATE = "update";
+    protected static final String FUNCTION_NAME_GENERATE_MISSING_SYSTEM_METADATA = "generatemissingsystemmetadata";
 
-    private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
+    protected static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
     
-    private ServletContext servletContext;
-    private Logger logMetacat;
-    private MetacatHandler handler;
-    private HttpServletRequest request;
-    private HttpServletResponse response;
-    private String username;
-    private String password;
-    private String sessionId;
-    private String[] groupNames;
+    protected ServletContext servletContext;
+    protected Logger logMetacat;
+    protected MetacatHandler handler;
+    protected HttpServletRequest request;
+    protected HttpServletResponse response;
+    protected String username;
+    protected String password;
+    protected String sessionId;
+    protected String[] groupNames;
 
-    private Hashtable<String, String[]> params;
+    protected Hashtable<String, String[]> params;
     
     // D1 certificate-based authentication
-	private Session session;
+    protected Session session;
 
     /**Initializes new instance by setting servlet context,request and response*/
     public ResourceHandler(ServletContext servletContext,
@@ -1013,7 +1013,7 @@
     /**
      *  copies request parameters to a hashtable which is given as argument to native metacathandler functions  
      */
-    private void initParams() {
+    protected void initParams() {
 
         String name = null;
         String[] value = null;
@@ -1392,7 +1392,7 @@
      * @return
      * @throws ParseException
      */
-    private Date parseDateAndConvertToGMT(String date) throws ParseException
+    protected Date parseDateAndConvertToGMT(String date) throws ParseException
     {
         try
         {   //the format we want
@@ -1450,7 +1450,7 @@
      * @param out the stream to serialize it to
      * @throws JiBXException
      */
-    private void serializeServiceType(Class type, Object object, OutputStream out)
+    protected void serializeServiceType(Class type, Object object, OutputStream out)
       throws JiBXException
     {
         ServiceTypeUtil.serializeServiceType(type, object, out);
@@ -1536,19 +1536,6 @@
         out.close();
     }
     
-    private String streamToString(InputStream is)
-    throws IOException
-    {
-        return IOUtil.toString(is);
-    }
-
-    private InputStream stringToStream(String s)
-    throws IOException
-    {
-        ByteArrayInputStream bais = new ByteArrayInputStream(s.getBytes(MetaCatServlet.DEFAULT_ENCODING));
-        return bais;
-    }
-    
     /**
      * locate the boundary marker for an MMP
      * @param is
@@ -1649,7 +1636,7 @@
      *               is the existing pid.  If insert, the pid is the new one
      * @throws IOException
      */
-    private void putObject(String pid, String action) {
+    protected void putObject(String pid, String action) {
         System.out.println("ResourceHandler: putObject with pid " + pid);
         logMetacat.debug("Entering putObject: " + pid + "/" + action);
         OutputStream out = null;
@@ -1922,7 +1909,7 @@
      * set the access perms on a document
      * @throws Exception
      */
-    private void setaccess() throws Exception
+    protected void setaccess() throws Exception
     {
         try
         {
@@ -1972,7 +1959,7 @@
      * @param message Message to be displayed
      * @param response Servlet response that xml message will be printed 
      * */
-    private void printError(String message, HttpServletResponse response) {
+    protected void printError(String message, HttpServletResponse response) {
         try {
             logMetacat.error("ResourceHandler: Printing error to servlet response: " + message);
             PrintWriter out = response.getWriter();
@@ -1992,7 +1979,7 @@
      * @param e
      * @param out
      */
-    private void serializeException(BaseException e, OutputStream out) {
+    protected void serializeException(BaseException e, OutputStream out) {
         // TODO: Use content negotiation to determine which return format to use
         response.setContentType("text/xml");
         response.setStatus(e.getCode());
@@ -2127,7 +2114,7 @@
      * Register System Metadata without data or metadata object
      * @param pid identifier for System Metadata entry
      */
-	private void registerSystemMetadata(String pid) {
+    protected void registerSystemMetadata(String pid) {
 		logMetacat.debug("Entering registerSystemMetadata: " + pid);
 		OutputStream out = null;
 		try {
