org.ibisph.mvc.controller.home
Class SaveResponse

java.lang.Object
  extended by org.ibisph.mvc.controller.home.SaveResponse
All Implemented Interfaces:
org.springframework.web.servlet.mvc.Controller

public class SaveResponse
extends java.lang.Object
implements org.springframework.web.servlet.mvc.Controller

Intermediary/proxy that sends the request to the admin application. This Save Response is an intermediary/proxy controller that simply takes an HTTP request's data (via post or get) and passes it along to the admin system so that is can typically be saved into a db thus not requiring the a database connection and related objects.

An Admin System save response request is built using this objects specified properties coupled with the data received from the original user's request. This request is then sent to the Admin System and a response is received back. The text received (response from Admin System's save request) is then set into the model and the view is shown to the user. The Admin System's save request URL is comprised of these basic properties:

  1. Base URL address
  2. Save response parameter name
  3. Save response parameter value
  4. Requestor's IP address parameter name
  5. Requestor's IP address parameter value
    1. Author:
      Garth Braithwaite, STG

      Field Summary
      protected  java.lang.String adminSystemResponseSuccessCode
                 
      protected  java.lang.String adminSystemSaveResponseBaseURL
                 
      protected  java.lang.String httpPostContentType
                 
      protected  java.lang.String saveResponseRequestParameterName
                 
      protected  java.lang.String saveResponseRequestParameterValue
                 
      protected  java.lang.String submittersIPAddressRequestParameterName
                 
      protected  org.springframework.web.servlet.View view
                 
       
      Constructor Summary
      SaveResponse()
                 
       
      Method Summary
       org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
                Rebundles the submitted request parameters and sends to Admin System.
       void setAdminSystemResponseSuccessCode(java.lang.String adminSystemResponseSuccessCode)
                Success code received from the Admin System upon successfully handling the save request.
       void setAdminSystemSaveResponseBaseURL(java.lang.String adminSystemSaveResponseBaseURL)
                Base, incomplete URL of the Admin System's Save Response controller/handler.
       void setHTTPPostContentType(java.lang.String httpPostContentType)
                Sets the content type to be used when submitting the content to be saved to the Admin System.
       void setSaveResponseRequestName(java.lang.String saveResponseRequestName)
                Name portion of a URL name value pair which contains the save request sent to the Admin System.
       void setSaveResponseRequestValue(java.lang.String saveResponseRequestValue)
                Value portion of a URL name value pair which contains the save request value sent to the Admin System.
       void setSubmittersIPAddressRequestParameterName(java.lang.String requestorsIPAddressRequestParameterName)
                HTTP URL parameter name used to specify to the Admin System the requestor's IP address.
       void setView(org.springframework.web.servlet.View view)
                Spring MVC view to be used to show the status of the save request.
       
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
       

      Field Detail

      adminSystemSaveResponseBaseURL

      protected java.lang.String adminSystemSaveResponseBaseURL

      saveResponseRequestParameterName

      protected java.lang.String saveResponseRequestParameterName

      saveResponseRequestParameterValue

      protected java.lang.String saveResponseRequestParameterValue

      submittersIPAddressRequestParameterName

      protected java.lang.String submittersIPAddressRequestParameterName

      httpPostContentType

      protected java.lang.String httpPostContentType

      adminSystemResponseSuccessCode

      protected java.lang.String adminSystemResponseSuccessCode

      view

      protected org.springframework.web.servlet.View view
      Constructor Detail

      SaveResponse

      public SaveResponse()
      Method Detail

      setAdminSystemSaveResponseBaseURL

      public void setAdminSystemSaveResponseBaseURL(java.lang.String adminSystemSaveResponseBaseURL)
      Base, incomplete URL of the Admin System's Save Response controller/handler.

      Parameters:
      adminSystemSaveResponseBaseURL -

      setSaveResponseRequestName

      public void setSaveResponseRequestName(java.lang.String saveResponseRequestName)
      Name portion of a URL name value pair which contains the save request sent to the Admin System.

      Parameters:
      saveResponseRequestName - Name of the save request parameter sent to Admin System as part of the save request URL.

      setSaveResponseRequestValue

      public void setSaveResponseRequestValue(java.lang.String saveResponseRequestValue)
      Value portion of a URL name value pair which contains the save request value sent to the Admin System.

      Parameters:
      saveResponseRequestValue - Value of the save request parameter sent to Admin System as part of the save request URL.

      setSubmittersIPAddressRequestParameterName

      public void setSubmittersIPAddressRequestParameterName(java.lang.String requestorsIPAddressRequestParameterName)
      HTTP URL parameter name used to specify to the Admin System the requestor's IP address. This is name part of a URL name value pair that specifies to the Admin System the IP address of the original request.

      Parameters:
      requestorsIPAddressRequestParameterName -

      setHTTPPostContentType

      public void setHTTPPostContentType(java.lang.String httpPostContentType)
      Sets the content type to be used when submitting the content to be saved to the Admin System.

      Parameters:
      httpPostContentType -

      setAdminSystemResponseSuccessCode

      public void setAdminSystemResponseSuccessCode(java.lang.String adminSystemResponseSuccessCode)
      Success code received from the Admin System upon successfully handling the save request. Once the complete save request URL is built, it is then used to send/post the original request's data to the Admin System. This value is what the Admin System should send back upon successfully processing the request.

      Parameters:
      adminSystemResponseSuccessCode - Value received from the Admin System when the Admin System has successfully handled the save request.

      setView

      public void setView(org.springframework.web.servlet.View view)
      Spring MVC view to be used to show the status of the save request.

      Parameters:
      view - Save Response status view to use.

      handleRequest

      public org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request,
                                                                        javax.servlet.http.HttpServletResponse response)
                                                                 throws java.lang.Exception
      Rebundles the submitted request parameters and sends to Admin System. This is the standard Spring MVC controller handler method.

      Specified by:
      handleRequest in interface org.springframework.web.servlet.mvc.Controller
      Parameters:
      request - HTTP Servlet Request passed from the servlet.
      response - HTTP Servlet Response passed from the servlet.
      Returns:
      View property.
      Throws:
      java.lang.Exception