|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.springframework.web.servlet.mvc.BaseCommandController
com.bea.alcs.sfweb.controller.impl.AbstractEpControllerImpl
com.bea.alcs.sfweb.controller.impl.GoogleCallbackControllerImpl
public class GoogleCallbackControllerImpl
The Spring MVC controller for the google callbacks.
Field Summary |
---|
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
---|
DEFAULT_COMMAND_NAME |
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
METHOD_GET, METHOD_HEAD, METHOD_POST |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
protected |
GoogleCallbackControllerImpl()
Constructor. |
Method Summary | |
---|---|
java.lang.String |
handleEvent(com.google.checkout.event.MerchantCalculationCallbackEvent event)
Implement this method to handle <merchant-calculation-callback> requests. |
void |
handleEvent(com.google.checkout.event.NewOrderNotificationEvent event)
Implement this method to handle new order notifications To retrieve the JAXB objects that were unmarshalled from the new order notification, you can use the following code: NewOrderNotification notification = event.getNewOrderNote();
You can then access individual components of the new order
notification by calling the methods in the generated JAXB classes. |
org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
To handle request sent from Google. |
javax.xml.bind.JAXBElement |
parseToJAXB(org.xml.sax.InputSource inputSource)
The parseToJAXB method receives a Merchant Calculations API or Notification API request (in XML format) from Google Checkout and converts that request to JAXB objects. |
void |
setGoogleCallbackService(GoogleCallbackService googleCallbackService)
Sets the google callback service. |
void |
setGoogleCheckoutService(GoogleCheckoutService googleCheckoutService)
Sets the google checkout service. |
Methods inherited from class com.bea.alcs.sfweb.controller.impl.AbstractEpControllerImpl |
---|
getElasticPath, getRequestHelper, setElasticPath, setRequestHelper |
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
---|
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommand, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, initApplicationContext, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, suppressBinding, suppressValidation, suppressValidation, suppressValidation, useDirectFieldAccess |
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
---|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
---|
getServletContext, getTempDir, getWebApplicationContext, isContextRequired, setServletContext |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.web.servlet.mvc.Controller |
---|
handleRequest |
Constructor Detail |
---|
protected GoogleCallbackControllerImpl()
Method Detail |
---|
public org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
handleRequestInternal
in class org.springframework.web.servlet.mvc.AbstractController
request
- the requestresponse
- the response
java.io.IOException
- exceptionHttpServlet.doPost(HttpServletRequest request, HttpServletResponse response)
public void handleEvent(com.google.checkout.event.NewOrderNotificationEvent event)
NewOrderNotification notification = event.getNewOrderNote();
You can then access individual components of the new order
notification by calling the methods in the generated JAXB classes.
For example:ShoppingCart shoppingCart = notification.getShoppingCart();
String googleOrderNumber = notification.getGoogleOrderNumber();
event
- the callback event from Googlepublic java.lang.String handleEvent(com.google.checkout.event.MerchantCalculationCallbackEvent event)
MerchantCalculationCallback merchantCalculationCallback =
event.getMerchantCalculationNote();
You can then access individual components of the notification
by calling the methods in the generated JAXB classes.
For example:ShoppingCart shoppingCart =
merchantCalculationCallback.getShoppingCart();
String googleOrderNumber =
merchantCalculationCallback.getGoogleOrderNumber();
MerchantCalculationResultBuilder
for methods used to
construct a <merchant-calculation-results> response.
event
- the callback event from Google
public final javax.xml.bind.JAXBElement parseToJAXB(org.xml.sax.InputSource inputSource) throws com.google.checkout.protocol.ProtocolException
inputSource
- The XML source data to be converted to JAXB objects
com.google.checkout.protocol.ProtocolException
- A ProtocolException if the input source does not comply with
the Google Checkout schemapublic void setGoogleCheckoutService(GoogleCheckoutService googleCheckoutService)
googleCheckoutService
- the google checkout servicepublic void setGoogleCallbackService(GoogleCallbackService googleCallbackService)
googleCallbackService
- the google callback service
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |