4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet Class Reference

Servlet which makes available annotations. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet:
Collaboration graph

Public Member Functions

String getServletInfo ()
 

Protected Member Functions

void processRequest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 
void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 
void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 

Private Member Functions

List< AnnotationgetAllAnnotationsForDoc (AnnotDocument doc)
 
List< AnnotationgetAllAnnotationsForDocAndAuthor (AnnotDocument doc, Integer author)
 
List< AnnotationgetAllAnnotationsForAuthor (Integer author)
 
String printError ()
 

Static Private Attributes

static final int OUTPUT_TYPE_V1 = 0
 
static final int OUTPUT_TYPE_V2 = 1
 
static final int OUTPUT_TYPE_SUG = 2
 

Detailed Description

Servlet which makes available annotations.

Servlet which makes available annotations It accepts following parameters: out - type of output ("v1", "v2" or "sug") uri - URI of requested annotation doc - id of annotated document for which annotations should be retrieved

Definition at line 45 of file GetAnnotServlet.java.

Member Function Documentation

void cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.doGet ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Handles the HTTP GET method.

Parameters
requestservlet request
responseservlet response
Exceptions
ServletExceptionif a servlet-specific error occurs
IOExceptionif an I/O error occurs

Definition at line 363 of file GetAnnotServlet.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.doPost ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Handles the HTTP POST method.

Parameters
requestservlet request
responseservlet response
Exceptions
ServletExceptionif a servlet-specific error occurs
IOExceptionif an I/O error occurs

Definition at line 378 of file GetAnnotServlet.java.

Here is the call graph for this function:

List<Annotation> cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.getAllAnnotationsForAuthor ( Integer  author)
private

Returns all annotations for given author

Parameters
authorId of author of annotations
Returns
Returns list of annotations for given author

Definition at line 323 of file GetAnnotServlet.java.

Here is the caller graph for this function:

List<Annotation> cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.getAllAnnotationsForDoc ( AnnotDocument  doc)
private

Returns all annotations for given document

Parameters
docDocument for which annotations should be returned
Returns
Returns list of annotations for given document

Definition at line 280 of file GetAnnotServlet.java.

Here is the caller graph for this function:

List<Annotation> cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.getAllAnnotationsForDocAndAuthor ( AnnotDocument  doc,
Integer  author 
)
private

Returns all annotations for given document and author

Parameters
docDocument for which annotations should be returned
authorId of author of annotations
Returns
Returns list of annotations for given document and author

Definition at line 301 of file GetAnnotServlet.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.getServletInfo ( )

Returns a short description of the servlet.

Returns
a String containing servlet description

Definition at line 389 of file GetAnnotServlet.java.

String cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.printError ( )
private

Creates error message for case of bad request

Returns
Simple HTML page with error message

Definition at line 341 of file GetAnnotServlet.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.processRequest ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Processes requests for both HTTP GET and POST methods.

Parameters
requestservlet request
responseservlet response
Exceptions
ServletExceptionif a servlet-specific error occurs
IOExceptionif an I/O error occurs

Definition at line 61 of file GetAnnotServlet.java.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

final int cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.OUTPUT_TYPE_SUG = 2
staticprivate

Definition at line 49 of file GetAnnotServlet.java.

final int cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.OUTPUT_TYPE_V1 = 0
staticprivate

Definition at line 47 of file GetAnnotServlet.java.

final int cz.vutbr.fit.knot.annotations.comet.GetAnnotServlet.OUTPUT_TYPE_V2 = 1
staticprivate

Definition at line 48 of file GetAnnotServlet.java.


The documentation for this class was generated from the following file: