org.apache.lucene.gdata.servlet.handler
Class DefaultInsertHandler

java.lang.Object
  extended by org.apache.lucene.gdata.servlet.handler.RequestAuthenticator
      extended by org.apache.lucene.gdata.servlet.handler.AbstractGdataRequestHandler
          extended by org.apache.lucene.gdata.servlet.handler.DefaultInsertHandler
All Implemented Interfaces:
GDataHttpAuthenticator, GDataRequestHandler

public class DefaultInsertHandler
extends AbstractGdataRequestHandler

Default Handler implementation. This handler processes the incoming GDataRequest and inserts the requested feed entry into the storage and the search component.

The handler sends following response to the client:

  1. if the entry was added - HTTP status code 200 OK
  2. if an error occurs - HTTP status code 500 INTERNAL SERVER ERROR
  3. if the resource could not found - HTTP status code 404 NOT FOUND

The added entry will be send back to the client if the insert request was successful.

Author:
Simon Willnauer

Field Summary
 
Fields inherited from class org.apache.lucene.gdata.servlet.handler.AbstractGdataRequestHandler
feedRequest, feedResponse, service
 
Constructor Summary
DefaultInsertHandler()
           
 
Method Summary
 void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Processes the GDATA Client request
 
Methods inherited from class org.apache.lucene.gdata.servlet.handler.AbstractGdataRequestHandler
closeService, initializeRequestHandler, sendError, setError, setFeedResponseFormat, setFeedResponseStatus
 
Methods inherited from class org.apache.lucene.gdata.servlet.handler.RequestAuthenticator
authenticateAccount, authenticateAccount, getTokenFromRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInsertHandler

public DefaultInsertHandler()
Method Detail

processRequest

public void processRequest(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws IOException,
                           javax.servlet.ServletException
Description copied from interface: GDataRequestHandler
Processes the GDATA Client request

Specified by:
processRequest in interface GDataRequestHandler
Specified by:
processRequest in class AbstractGdataRequestHandler
Parameters:
request - - the client request to be processed
response - - the response to the client request
Throws:
javax.servlet.ServletException
IOException - - if an input/output error occurs due to accessing an IO steam
See Also:
GDataRequestHandler.processRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.