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

java.lang.Object
  extended by org.apache.lucene.gdata.servlet.handler.RequestAuthenticator
      extended by org.apache.lucene.gdata.servlet.handler.AbstractFeedHandler
All Implemented Interfaces:
GDataHttpAuthenticator, GDataRequestHandler
Direct Known Subclasses:
DeleteFeedHandler, InsertFeedHandler, UpdateFeedHandler

public abstract class AbstractFeedHandler
extends RequestAuthenticator
implements GDataRequestHandler

Author:
Simon Willnauer

Field Summary
protected  boolean authenticated
           
protected static String PARAMETER_ACCOUNT
           
protected static String PARAMETER_SERVICE
           
 
Constructor Summary
AbstractFeedHandler()
           
 
Method Summary
protected  ServerBaseFeed createFeedFromRequest(HttpServletRequest request)
           
protected  GDataAccount createRequestedAccount(HttpServletRequest request)
           
protected  int getErrorCode()
           
protected  String getErrorMessage()
           
 void processRequest(HttpServletRequest request, HttpServletResponse response)
          Processes the GDATA Client request
protected  void sendResponse(HttpServletResponse response)
           
protected  void setError(int error, String message)
           
 
Methods inherited from class org.apache.lucene.gdata.servlet.handler.RequestAuthenticator
authenticateAccount, getTokenFromRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_ACCOUNT

protected static final String PARAMETER_ACCOUNT
See Also:
Constant Field Values

PARAMETER_SERVICE

protected static final String PARAMETER_SERVICE
See Also:
Constant Field Values

authenticated

protected boolean authenticated
Constructor Detail

AbstractFeedHandler

public AbstractFeedHandler()
Method Detail

processRequest

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

Specified by:
processRequest in interface GDataRequestHandler
Parameters:
request - - the client request to be processed
response - - the response to the client request
Throws:
ServletException - - if a servlet exception is thrown by the request or response
IOException - - if an input/output error occurs due to accessing an IO steam
See Also:
org.apache.lucene.gdata.servlet.handler.GDataRequestHandler#processRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

createFeedFromRequest

protected ServerBaseFeed createFeedFromRequest(HttpServletRequest request)
                                        throws ParseException,
                                               IOException,
                                               org.apache.lucene.gdata.servlet.handler.AbstractFeedHandler.FeedHandlerException
Throws:
ParseException
IOException
org.apache.lucene.gdata.servlet.handler.AbstractFeedHandler.FeedHandlerException

createRequestedAccount

protected GDataAccount createRequestedAccount(HttpServletRequest request)
                                       throws org.apache.lucene.gdata.servlet.handler.AbstractFeedHandler.FeedHandlerException
Throws:
org.apache.lucene.gdata.servlet.handler.AbstractFeedHandler.FeedHandlerException

sendResponse

protected void sendResponse(HttpServletResponse response)

setError

protected void setError(int error,
                        String message)

getErrorCode

protected int getErrorCode()

getErrorMessage

protected String getErrorMessage()


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