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.
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 and Description |
---|
BusinessObjectDocumentAction()
Creates an instance of the business object document action.
|
Modifier and Type | Method and Description |
---|---|
protected BusinessContextType | buildBusinessContext(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method construts and returns the business context to associate with the current URL request.
|
protected BusinessObjectDocumentType | buildBusinessObjectDocument(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method constructs the request business object document based on the URL and the action mapping configuration.
|
protected java.util.Map | buildRequestMap(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method creates the java.util.Map that represents the request.
|
protected java.util.Map | buildResponseMap(BusinessObjectDocumentType responseBusinessObjectDocument, org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method transforms the response business object document into the corresponding java.util.Map.
|
protected commonj.sdo.DataObject | createDocumentRoot(BusinessObjectDocumentActionMapping actionMapping)
This method returns the document root that is the parent container that of the request business object document.
|
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.
|
protected java.util.Map | executeBusinessObjectDocument(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler authenticationCallbackHandler)
This method converts the HTTP request into the appropriate request business object document and executes the request.
|
protected BusinessObjectDocumentType | executeClient(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BusinessObjectDocumentType requestBusinessObjectDocument, BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler authenticationCallbackHandler)
This method will construct the client library based on the given business context and authentication callback handler and execute the business object document.
|
protected javax.security.auth.callback.CallbackHandler | getAuthenticationCallbackHandler(javax.servlet.http.HttpServletRequest request)
This method returns the authentication callback handler that is associated with the current request.
|
protected BusinessContextType | getBusinessContext(javax.servlet.http.HttpServletRequest request)
This method returns the business context data to associate with the URL request.
|
protected org.apache.struts.action.ActionForward | getErrorForward(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Throwable error)
This method returns the error action forward which represents that an error occurred during the processing of the request.
|
protected org.apache.struts.action.ActionForward | getFailedForward(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AbstractBusinessObjectDocumentException abstractBODException)
This method returns the failed action forward which represents the request was not successful.
|
protected org.apache.struts.action.ActionForward | getSuccessForward(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This method returns the success action forward which represents the request was successful.
|
protected java.lang.String | getVerb(BusinessObjectDocumentActionMapping actionMapping)
This method returns the verb which indicates the appropriate business object document to create and the verb to populate.
|
public static final java.lang.String VERB_CHANGE
public static final java.lang.String VERB_PROCESS
public static final java.lang.String VERB_GET
public static final java.lang.String VERB_SYNC
public static final java.lang.String FORWARD_SUCCESS
public static final java.lang.String FORWARD_FAILURE
public static final java.lang.String FORWARD_ERROR
public BusinessObjectDocumentAction()
protected BusinessObjectDocumentType buildBusinessObjectDocument(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
protected java.util.Map buildRequestMap(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected java.util.Map buildResponseMap(BusinessObjectDocumentType responseBusinessObjectDocument, 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
protected commonj.sdo.DataObject createDocumentRoot(BusinessObjectDocumentActionMapping actionMapping)
protected java.lang.String getVerb(BusinessObjectDocumentActionMapping actionMapping)
protected BusinessContextType buildBusinessContext(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected BusinessContextType getBusinessContext(javax.servlet.http.HttpServletRequest request)
protected javax.security.auth.callback.CallbackHandler getAuthenticationCallbackHandler(javax.servlet.http.HttpServletRequest request)
protected java.util.Map executeBusinessObjectDocument(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler authenticationCallbackHandler) throws java.lang.Exception
protected BusinessObjectDocumentType executeClient(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BusinessObjectDocumentType requestBusinessObjectDocument, BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler authenticationCallbackHandler) throws java.lang.Exception
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
protected org.apache.struts.action.ActionForward getSuccessForward(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
protected org.apache.struts.action.ActionForward getErrorForward(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Throwable error) throws java.lang.Exception
protected org.apache.struts.action.ActionForward getFailedForward(org.apache.struts.action.ActionMapping actionMapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AbstractBusinessObjectDocumentException abstractBODException) throws java.lang.Exception