fedora.server.access
Class GetObjectHistoryServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byfedora.server.access.GetObjectHistoryServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class GetObjectHistoryServlet
extends javax.servlet.http.HttpServlet

Title: GetObjectHistoryServlet.java

Description: Implements the "getObjectHistory" functionality of the Fedora Access LITE (API-A-LITE) interface using a java servlet front end. The syntax defined by API-A-LITE has for getting a description of the repository has the following binding:

  1. getObjectHistory URL syntax: protocol://hostname:port/fedora/getObjectHistory/pid[?xml=BOOLEAN] This syntax requests information about the repository. The xml parameter determines the type of output returned. If the parameter is omitted or has a value of "false", a MIME-typed stream consisting of an html table is returned providing a browser-savvy means of viewing the object profile. If the value specified is "true", then a MIME-typed stream consisting of XML is returned.
  2. Version:
    $Id: GetObjectHistoryServlet.java,v 1.20 2005/05/10 18:33:03 rlw Exp $
    Author:
    rlw@virginia.edu
    See Also:
    Serialized Form

    Nested Class Summary
     class GetObjectHistoryServlet.ObjectHistorySerializerThread
               A Thread to serialize an ObjectProfile object into XML.
     
    Field Summary
    static java.lang.String ACTION_LABEL
               
     
    Constructor Summary
    GetObjectHistoryServlet()
               
     
    Method Summary
     void destroy()
              Cleans up servlet resources.
     void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
              Process Fedora Access Request.
     void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
              For now, treat a HTTP POST request just like a GET request.
     void getObjectHistory(Context context, java.lang.String PID, boolean xml, javax.servlet.http.HttpServletResponse response)
               
     void init()
              Initialize servlet.
     
    Methods inherited from class javax.servlet.http.HttpServlet
    doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
     
    Methods inherited from class javax.servlet.GenericServlet
    getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    ACTION_LABEL

    public static final java.lang.String ACTION_LABEL
    See Also:
    Constant Field Values
    Constructor Detail

    GetObjectHistoryServlet

    public GetObjectHistoryServlet()
    Method Detail

    doGet

    public void doGet(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      java.io.IOException

    Process Fedora Access Request. Parse and validate the servlet input parameters and then execute the specified request.

    Parameters:
    request - The servlet request.
    response - servlet The servlet response.
    Throws:
    javax.servlet.ServletException - If an error occurs that effects the servlet's basic operation.
    java.io.IOException - If an error occurrs with an input or output operation.

    getObjectHistory

    public void getObjectHistory(Context context,
                                 java.lang.String PID,
                                 boolean xml,
                                 javax.servlet.http.HttpServletResponse response)
                          throws ServerException
    Throws:
    ServerException

    doPost

    public void doPost(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException

    For now, treat a HTTP POST request just like a GET request.

    Parameters:
    request - The servet request.
    response - The servlet response.
    Throws:
    javax.servlet.ServletException - If thrown by doGet.
    java.io.IOException - If thrown by doGet.

    init

    public void init()
              throws javax.servlet.ServletException

    Initialize servlet.

    Throws:
    javax.servlet.ServletException - If the servet cannot be initialized.

    destroy

    public void destroy()

    Cleans up servlet resources.