org.kuali.ole.web
Class DocumentServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.kuali.ole.web.DocumentServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DocumentServlet
extends javax.servlet.http.HttpServlet

See Also:
Serialized Form

Constructor Summary
DocumentServlet()
           
 
Method Summary
protected  String checkIn(Request dsRequest, Response dsResponse)
           
protected  void checkOut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  List<org.apache.commons.fileupload.FileItem> getMultiPartFileItems(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  String getParameter(String reqParam, List<org.apache.commons.fileupload.FileItem> items, javax.servlet.http.HttpServletRequest request)
           
protected  String getUserId(javax.servlet.http.HttpServletRequest request)
           
 Request identifyDeleteableDocuments(List<String> uuidsList, String operation)
          Identifies which uuids exists in the OLE from the given uuids.
protected  void ingestStringContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void link(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  Response processDeleteRequest(Request dsRequest)
          Deletes documents from docstore and discovery.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentServlet

public DocumentServlet()
See Also:
HttpServlet.HttpServlet()
Method Detail

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException
See Also:
HttpServlet.doPost(HttpServletRequest request, HttpServletResponse response)

identifyDeleteableDocuments

public Request identifyDeleteableDocuments(List<String> uuidsList,
                                           String operation)
                                    throws Exception
Identifies which uuids exists in the OLE from the given uuids. uuids which exists in OLE are not deleted.

Parameters:
uuidsList -
operation -
Returns:
Throws:
Exception

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

checkOut

protected void checkOut(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws IOException
Throws:
IOException

checkIn

protected String checkIn(Request dsRequest,
                         Response dsResponse)

link

protected void link(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)

ingestStringContent

protected void ingestStringContent(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
                            throws IOException
Throws:
IOException

processDeleteRequest

protected Response processDeleteRequest(Request dsRequest)
                                 throws IOException
Deletes documents from docstore and discovery. Verifies the existence of the documents in OLE by calling a web service. If the documents exist in OLE, this operation fails. Else, the documents are deleted from docstore and discovery.

Parameters:
dsRequest -
Returns:
Throws:
IOException

getMultiPartFileItems

protected List<org.apache.commons.fileupload.FileItem> getMultiPartFileItems(javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response)
                                                                      throws javax.servlet.ServletException
Parameters:
request -
response -
Returns:
docAction (add or delete)
Throws:
javax.servlet.ServletException

getParameter

protected String getParameter(String reqParam,
                              List<org.apache.commons.fileupload.FileItem> items,
                              javax.servlet.http.HttpServletRequest request)
Parameters:
reqParam -
items -
request -
Returns:
docAction (delete)

getUserId

protected String getUserId(javax.servlet.http.HttpServletRequest request)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.