| ru.emdev.EmForge.wiki.web.WikiAttachmentServlet
WikiAttachmentServlet | public class WikiAttachmentServlet extends WebdavServlet (Code) | | Wiki Attachment Servlet
This servlet extends attachment servlet from JspWiki to get WikiEngine
not from configuration files but from Spring Framework
|
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) | 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) | public void | doPut(HttpServletRequest req, HttpServletResponse res) | protected boolean | executeUpload(WikiContext context, InputStream data, String filename, String errorPage, String parentPage, long contentLength) | public void | init(ServletConfig i_config) Initialize Servlet
Parent class make all initialization here. | public void | init(HttpServletRequest i_request) | 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
|
log | final protected Log log(Code) | | |
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, 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 true if upload results in the creation of a new page;false otherwise throws: RedirectException - throws: IOException - throws: ProviderException - |
init | public void init(ServletConfig i_config) throws ServletException(Code) | | Initialize Servlet
Parent class make all initialization here.
For example it gets wiki engine from configuration.
So, we should skip it here and initialize from Spring later,
then we will get HttpRequest and will able to get Spring's WebApplication
|
|
|