com.stellent.cis.web.servlets
Class SCSFileTransferServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.stellent.cis.web.servlets.SCSFileTransferServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class SCSFileTransferServlet
- extends javax.servlet.http.HttpServlet
Servlet for handling file transfers from a CommandClient
- See Also:
- Serialized Form
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Download a file from the local filesystem. |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Upload a file to the server. |
protected com.stellent.cis.server.filetransfer.IRestrictedFileManager |
getRestrictedFileManager()
|
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 |
PARAM_KEY
public static final java.lang.String PARAM_KEY
- See Also:
- Constant Field Values
PARAM_NAMESPACE
public static final java.lang.String PARAM_NAMESPACE
- See Also:
- Constant Field Values
m_log
protected org.apache.commons.logging.Log m_log
m_restrictedFileManager
protected com.stellent.cis.server.filetransfer.IRestrictedFileManager m_restrictedFileManager
SCSFileTransferServlet
public SCSFileTransferServlet()
getRestrictedFileManager
protected com.stellent.cis.server.filetransfer.IRestrictedFileManager getRestrictedFileManager()
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Download a file from the local filesystem. Special handling for URL with $config$ in the path, gets replaced
with the shared configuration location for the SCS Command Layer.
Expects following parameters:
- url - relative URL to the file, i.e. $config/localhost/download/test.txt
- mimetype - mimetype of the file (optional), i.e. text/plain
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the current requestresponse
- the response for the request
- Throws:
javax.servlet.ServletException
java.io.IOException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Upload a file to the server. File is placed in some subfolder of the
CommandConfiguration#getTemporaryFileLocation()
directory. The response is an XML document that describes the location of the upload file.
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the input requestresponse
- the response
- Throws:
javax.servlet.ServletException
java.io.IOException