站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

DownloadAttachmentsServlet - JBOSS Portal 2.6 API 英文版文档


org.jboss.portlet.forums.servlet
Class DownloadAttachmentsServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.jboss.portlet.forums.servlet.DownloadAttachmentsServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DownloadAttachmentsServlet
extends javax.servlet.http.HttpServlet

Provides attachments downloading capabilities

Version:
$Revision: 5448 $
Author:
Boleslaw Dawidowicz
See Also:
Serialized Form

Field Summary
(package private)  int BUF_SIZE
           
(package private)  ForumsModule forumsModule
           
private  javax.transaction.TransactionManager tm
           
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
DownloadAttachmentsServlet()
           
 
Method Summary
 void destroy()
           
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
private  Attachment getAttachment(java.lang.Integer id)
          In portal we don't use hibernate transactions because every request is surounded with JTA transaction context by portal.
 void init()
           
private  void printMessage(java.lang.String msg, javax.servlet.http.HttpServletResponse resp)
          this prints dummy message to output writer
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tm

private javax.transaction.TransactionManager tm

forumsModule

ForumsModule forumsModule

BUF_SIZE

int BUF_SIZE
Constructor Detail

DownloadAttachmentsServlet

public DownloadAttachmentsServlet()
Method Detail

init

public void init()

destroy

public void destroy()

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

getAttachment

private Attachment getAttachment(java.lang.Integer id)
In portal we don't use hibernate transactions because every request is surounded with JTA transaction context by portal. So in servlet when we use ForumsModule we must do the same.

Parameters:
id -
Returns:

printMessage

private void printMessage(java.lang.String msg,
                          javax.servlet.http.HttpServletResponse resp)
this prints dummy message to output writer

Parameters:
msg -
resp -