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

java.lang.Object
  extended by org.apache.lucene.gdata.servlet.handler.RequestAuthenticator
      extended by org.apache.lucene.gdata.servlet.handler.AbstractAccountHandler
All Implemented Interfaces:
GDataHttpAuthenticator, GDataRequestHandler
Direct Known Subclasses:
DeleteAccountStrategy, InsertAccountStrategy, UpdateAccountStrategy

public abstract class AbstractAccountHandler
extends RequestAuthenticator
implements GDataRequestHandler

Author:
Simon Willnauer

Field Summary
protected  AdminService service
           
 
Constructor Summary
AbstractAccountHandler()
           
 
Method Summary
protected  GDataAccount getAccountFromRequest(javax.servlet.http.HttpServletRequest request)
           
protected  int getErrorCode()
           
protected  String getErrorMessage()
           
 void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Processes the GDATA Client request
protected abstract  void processServiceAction(GDataAccount account)
           
protected  void sendResponse(javax.servlet.http.HttpServletResponse response)
           
protected  void setError(int error, String message)
           
 
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
 

Field Detail

service

protected AdminService service
Constructor Detail

AbstractAccountHandler

public AbstractAccountHandler()
Method Detail

processRequest

public void processRequest(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws javax.servlet.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:
javax.servlet.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:
GDataRequestHandler.processRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

getAccountFromRequest

protected GDataAccount getAccountFromRequest(javax.servlet.http.HttpServletRequest request)
                                      throws org.apache.lucene.gdata.servlet.handler.AbstractAccountHandler.AccountHandlerException
Throws:
org.apache.lucene.gdata.servlet.handler.AbstractAccountHandler.AccountHandlerException

sendResponse

protected void sendResponse(javax.servlet.http.HttpServletResponse response)

setError

protected void setError(int error,
                        String message)

getErrorCode

protected int getErrorCode()

getErrorMessage

protected String getErrorMessage()

processServiceAction

protected abstract void processServiceAction(GDataAccount account)
                                      throws ServiceException
Throws:
ServiceException


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