class: RestServlet

public class: RestServlet
Author: vmakarenko
Project: Phase: 1.0; Status: Proposed; Version: 1.0; Complexity: 1
Dates: Created: 16.07.2009 15:20:07; Modified: 16.07.2009 15:20:07;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {C9DB7266-47E8-4985-8A62-61BF2FF7694D}
This servlet takes an cql query, calls the search service and returns the result.
 

Goto: Custom Properties, Fields, Methods

See also: Search, ProcessCitationStyles, StructuredExport

Appears in: presentation

Connections
 
Custom Properties
 
RestServlet Attributes
Attribute Details
private Search
  itemContainerSearch
annotations=@EJB
Notes: EJB instance of search service.
private static const Logger
  LOGGER
Initial: Logger.getLogger(RestServlet.class)
Notes: Logging instance.
private static const int
  MAX_SEARCHES_NUMBER
Initial: 30
Notes: Max number of the simultaneous concurrent searches
private static ProcessCitationStyles
  pcs
private static StructuredExport
  se
private static int
  searchCounter
Initial: 0
Notes: Counter for the concurrent searches
private static const long
  serialVersionUID
Initial: 1L
Notes: Serial identifier.
 
RestServlet Methods
Operation Details
private
checkVal(
   String str):boolean
Sequential
private
decreaseCounter(
   boolean flag):void
Sequential
Notes: Decrease counter of the maximum allowed searches
protected const
doGet(
   HttpServletRequest req,
   HttpServletResponse resp):void
Sequential
Tags: annotations=@Override
throws=ServletException,IOException
Notes: {@inheritDoc}
protected const
doPost(
   HttpServletRequest req,
   HttpServletResponse resp):void
Sequential
Tags: annotations=@Override
throws=ServletException,IOException
Notes: {@inheritDoc}
private
getContentType(
   String outputFormat):String
Sequential
Notes: Mapping of outputFormat to mime-type. TODO: Get the mapping directly from ItemExportingBean
@return mime-type according to the outputFormat
private
getFileExtension(
   String outputFormat):String
Sequential
Notes: Mapping of the outputType file to the correct file extension. TODO: Get the mapping directly from ItemExportingBean
@return mime-type according to the outputFormat
private
handleException(
   Exception e,
   HttpServletResponse resp):void
Sequential
Tags: throws=Exception
Notes: Take care on an incoming exception.
public
RestServlet():
Sequential