| com.ecyrd.jspwiki.dav.WebdavServlet com.ecyrd.jspwiki.attachment.AttachmentServlet
AttachmentServlet | public class AttachmentServlet extends WebdavServlet (Code) | | This is the chief JSPWiki attachment management servlet. It is used for
both uploading new content and downloading old content. It can handle
most common cases, e.g. check for modifications and return 304's as necessary.
Authentication is done using JSPWiki's normal AAA framework.
This servlet is also capable of managing dynamically created attachments.
author: Erik Bunn author: Janne Jalkanen since: 1.9.45. |
Method Summary | |
public void | doGet(HttpServletRequest req, HttpServletResponse res) Serves a GET with two parameters: 'wikiname' specifying the wikiname
of the attachment, 'version' specifying the version indicator. | protected void | doOptions(HttpServletRequest req, HttpServletResponse res) Implements the OPTIONS method. | public void | doPost(HttpServletRequest req, HttpServletResponse res) Grabs mime/multipart data and stores it into the temporary area.
Uses other parameters to determine which name to store as.
The input to this servlet is generated by an HTML FORM with
two parts. | public void | doPropFind(HttpServletRequest req, HttpServletResponse res) Implements the PROPFIND method. | public void | doPut(HttpServletRequest req, HttpServletResponse res) | protected boolean | executeUpload(WikiContext context, InputStream data, String filename, String errorPage, String parentPage, String changenote, long contentLength) | public void | init(ServletConfig config) Initializes the servlet from WikiEngine properties. | protected String | upload(HttpServletRequest req) Uploads a specific mime multipart input set, intercepts exceptions. |
DEFAULT_EXPIRY | final protected static long DEFAULT_EXPIRY(Code) | | Default expiry period is 1 day
|
doPost | public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException(Code) | | Grabs mime/multipart data and stores it into the temporary area.
Uses other parameters to determine which name to store as.
The input to this servlet is generated by an HTML FORM with
two parts. The first, named 'page', is the WikiName identifier
for the parent file. The second, named 'content', is the binary
content of the file.
|
executeUpload | protected boolean executeUpload(WikiContext context, InputStream data, String filename, String errorPage, String parentPage, String changenote, long contentLength) throws RedirectException, IOException, ProviderException(Code) | | Parameters: context - the wiki context Parameters: data - the input stream data Parameters: filename - the name of the file to upload Parameters: errorPage - the place to which you want to get a redirection Parameters: parentPage - the page to which the file should be attached Parameters: changenote - The change note Parameters: contentLength - The content length true if upload results in the creation of a new page;false otherwise throws: RedirectException - If the content needs to be redirected throws: IOException - If there is a problem in the upload. throws: ProviderException - If there is a problem in the backend. |
Methods inherited from com.ecyrd.jspwiki.dav.WebdavServlet | public void doCopy(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doLock(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doMkCol(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doMove(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doPropFind(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doPropPatch(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) public void doUnlock(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc) protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc)
|
|
|