com.ibm.commerce.foundation.client.facade.bod.servlet.struts

Class BusinessObjectDocumentAction

  • java.lang.Object
    • org.apache.struts.action.Action
      • com.ibm.commerce.foundation.client.facade.bod.servlet.struts.BusinessObjectDocumentAction
  • Direct Known Subclasses:
    BusinessObjectDocumentClientLibraryAction


    public class BusinessObjectDocumentAction
    extends org.apache.struts.action.Action

    The business object document struts action builds the appropriate business object document based on the URL specified and invoke the document. This implementation of constructing and executing a business object document depends on the URL to OAGIS mapping defined along with the appropriate client library that will invoke the business object document request.

    This struts action uses the configuration defined by BusinessObjectDocumentActionMapping to indicate the verb of the business object document, the associated business context parameters and the name of the client object. Thought the configuration of BusinessObjectDocumentActionMapping the business object document request can be constructed and invoked.

    Through the configuration of BusinessObjectDocumentActionMapping this action does not need to be extended. However for those cases where the URL request cannot easily be transformed to the Business Object Document, the executeClient() or executeBusinessObjectDocument() can be overridden.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String FORWARD_ERROR
      A constant to represent the local forward name used when an error occured during processing the request.
      static java.lang.String FORWARD_FAILURE
      A constant to represent the local forward name used when executing the request results in a response containing service errors.
      static java.lang.String FORWARD_SUCCESS
      A constant to represent the local forward name used when the request executes successfully.
      static java.lang.String VERB_CHANGE
      A constant to represent the Change verb.
      static java.lang.String VERB_GET
      A constant to represent the Get verb.
      static java.lang.String VERB_PROCESS
      A constant to represent the Process verb.
      static java.lang.String VERB_SYNC
      A constant to represent the Sync verb.
    • Constructor Summary

      Constructors 
      Constructor and Description
      BusinessObjectDocumentAction()
      Creates an instance of the business object document action.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      This method executes the action which represents converting a URL request into a business object document and executing the request.
      • Methods inherited from class org.apache.struts.action.Action

        execute, getServlet, setServlet
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • VERB_CHANGE

        public static final java.lang.String VERB_CHANGE
        A constant to represent the Change verb.
        See Also:
        Constant Field Values
      • VERB_PROCESS

        public static final java.lang.String VERB_PROCESS
        A constant to represent the Process verb.
        See Also:
        Constant Field Values
      • VERB_GET

        public static final java.lang.String VERB_GET
        A constant to represent the Get verb.
        See Also:
        Constant Field Values
      • VERB_SYNC

        public static final java.lang.String VERB_SYNC
        A constant to represent the Sync verb.
        See Also:
        Constant Field Values
      • FORWARD_SUCCESS

        public static final java.lang.String FORWARD_SUCCESS
        A constant to represent the local forward name used when the request executes successfully.
        See Also:
        Constant Field Values
      • FORWARD_FAILURE

        public static final java.lang.String FORWARD_FAILURE
        A constant to represent the local forward name used when executing the request results in a response containing service errors.
        See Also:
        Constant Field Values
      • FORWARD_ERROR

        public static final java.lang.String FORWARD_ERROR
        A constant to represent the local forward name used when an error occured during processing the request. These errors are unvoidable problems at the end user could not prevent.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BusinessObjectDocumentAction

        public BusinessObjectDocumentAction()
        Creates an instance of the business object document action.
    • Method Detail

      • execute

        public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping actionMapping,
                                                              org.apache.struts.action.ActionForm actionForm,
                                                              javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response)
                                                       throws java.lang.Exception
        This method executes the action which represents converting a URL request into a business object document and executing the request. This implementation builds the business context and retrieves the authentication callback handler of the request. Then the request is executed by converting it into a business object document and executing the business object document. The responding map which represents the response of the request is stored in the request attribute for displaying the result of the request. Depending on whether the request was sucessful or not, the appropriate action forward is determined and returned.
        Overrides:
        execute in class org.apache.struts.action.Action
        Parameters:
        actionMapping - The configuration of the struts action. If the business context is populated by configuration, this class must be an instance of the BusinessObjectDocumentActionMapping.
        actionForm - The action form of the struts action.
        request - The HTTP request object that contains the information pertaining to the request.
        response - The HTTP response object that will contain the information pertaining to the response.
        Returns:
        The action forward which represents the result of the request. This will indicate whether the request was successful, failed or resulting in an error.
        Throws:
        java.lang.Exception
        See Also:
        Action.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)