com.wewebu.ow.server.servlets
Class OwDragDropContent

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.wewebu.ow.server.servlets.OwDragDropContent
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class OwDragDropContent
extends javax.servlet.http.HttpServlet

Drag&Drop Servlet performs an upload of documents.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

See Also:
Serialized Form

Constructor Summary
OwDragDropContent()
          Constructor of the object.
 
Method Summary
protected  OwDocumentImportItem createDocumentImportItem(String pathToCommonDNDTempDir_p, String rootPath_p, String upload_filename_p, int fileID_p)
           
 void destroy()
          Destruction of the servlet.
 void doDelete(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          The doDelete method of the servlet.
 void doGet(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          The doGet method of the servlet.
 void doPost(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
           
 void doPut(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          The doPut method of the servlet.
 String getServletInfo()
          Returns information about the servlet, such as author, version, and copyright.
 void init()
          Initialization of the servlet.
 void processRequest(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          Processes requests for both HTTP GET and POST methods.
 
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwDragDropContent

public OwDragDropContent()
Constructor of the object.

Method Detail

destroy

public void destroy()
Destruction of the servlet.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

doDelete

public void doDelete(javax.servlet.http.HttpServletRequest request_p,
                     javax.servlet.http.HttpServletResponse response_p)
              throws javax.servlet.ServletException,
                     IOException
The doDelete method of the servlet.
This method is called when a HTTP delete request is received.

Overrides:
doDelete in class javax.servlet.http.HttpServlet
Parameters:
request_p - the request send by the client to the server
response_p - the response send by the server to the client
Throws:
javax.servlet.ServletException - if an error occurred
IOException - if an error occurred

doGet

public void doGet(javax.servlet.http.HttpServletRequest request_p,
                  javax.servlet.http.HttpServletResponse response_p)
The doGet method of the servlet.
This method is called when a form has its tag value method equals to get.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request_p - the request send by the client to the server
response_p - the response send by the server to the client

doPost

public void doPost(javax.servlet.http.HttpServletRequest request_p,
                   javax.servlet.http.HttpServletResponse response_p)
            throws javax.servlet.ServletException,
                   IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doPut

public void doPut(javax.servlet.http.HttpServletRequest request_p,
                  javax.servlet.http.HttpServletResponse response_p)
           throws javax.servlet.ServletException,
                  IOException
The doPut method of the servlet.
This method is called when a HTTP put request is received.

Overrides:
doPut in class javax.servlet.http.HttpServlet
Parameters:
request_p - the request send by the client to the server
response_p - the response send by the server to the client
Throws:
javax.servlet.ServletException - if an error occurred
IOException - if an error occurred

getServletInfo

public String getServletInfo()
Returns information about the servlet, such as author, version, and copyright.

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet
Returns:
String information about this servlet

init

public void init()
          throws javax.servlet.ServletException
Initialization of the servlet.

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException - if an error occurs

processRequest

public void processRequest(javax.servlet.http.HttpServletRequest request_p,
                           javax.servlet.http.HttpServletResponse response_p)
                    throws javax.servlet.ServletException,
                           IOException,
                           Exception
Processes requests for both HTTP GET and POST methods.

Parameters:
request_p - servlet request
response_p - servlet response
Throws:
javax.servlet.ServletException
IOException
Exception

createDocumentImportItem

protected OwDocumentImportItem createDocumentImportItem(String pathToCommonDNDTempDir_p,
                                                        String rootPath_p,
                                                        String upload_filename_p,
                                                        int fileID_p)
                                                 throws Exception
Parameters:
pathToCommonDNDTempDir_p -
rootPath_p - the root path sent by the client. May be empty if the client has not sent a root path.
upload_filename_p - the name of the uploaded file. This is only the last part of the complete path sent by the client.
fileID_p -
Returns:
a new instance of a OwDocumentImportItem
Throws:
Exception
Since:
3.1.0.3


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.