examples.e2e.b2b.processors
Class POStatusProcessor
java.lang.Object
|
+--com.bea.portal.appflow.processor.AbstractPortalProcessor
|
+--examples.e2e.b2b.processors.AbstractProcessor
|
+--examples.e2e.b2b.processors.POStatusProcessor
- public class POStatusProcessor
- extends AbstractProcessor
The POStatusProcessor
runs business logic for the
purchase order history portlet (purchaseorderhistory.portlet).
This class handles the following portlet webflow
events
(See PortalAppflowConstants.PORTLET_WEBFLOW_EVENT_PARAMETER
)
directed to the price quote portlet:
- submitPO
- bea.portal.framework.internal.refresh
- null
Events are acted upon by the process()
method of this class.
In all cases where the process()
method is invoked,
purchase order XML files
(see BuyerFactory.STATIC_PO_BASE_NAME
,
BuyerFactory.PO_FILE
and
BuyerFactory.PO_ACK_FILE
)
are parsed and the resulting List
of
PO
objects are added to the
RequestState
.
The "submitPO" portlet webflow event
indicates the intent of the user to submit a purchase order
to a supplier. When this event is encountered the
PurchaseQuote
stored in the SessionState
is submitted to the
back-end workflow system. A value of
Constants.MAXIMIZED
is returned from the
the process()
method if the portlet is maximized,
otherwise Constants.DISPLAY
is returned.
The "bea.portal.framework.internal.refresh" and
"null" events are handled identically. After adding
the PO
objects to the
RequestState
, a value of
Constants.MAXIMIZED
is returned from the
the process()
method if the portlet is maximized,
otherwise Constants.DISPLAY
is returned.
Field Summary
|
static java.lang.String |
TIMEOUT_PROP
Override the default purchase order timeout (TIMEOUT_SECONDS )
value by setting this system property, "samples.e2e.b2b.po.timeout",
to some java long value greater than or
equal to zero. |
static long |
TIMEOUT_SECONDS
The default value for the
purchase order timeout: 300 seconds. |
Methods inherited from class examples.e2e.b2b.processors.AbstractProcessor |
getAppflowEvent,
getInventoryProvider,
getParts,
getPipelineSession,
getPortalEvent,
getPortletEvent,
getProducts,
getPurchaseManager,
getRequestState,
getSessionState,
getTimeoutCalendar,
isPortletMaximized,
process,
submitPO,
submitQPA |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
TIMEOUT_SECONDS
public static final long TIMEOUT_SECONDS
- The default value for the
purchase order timeout: 300 seconds.
TIMEOUT_PROP
public static final java.lang.String TIMEOUT_PROP
- Override the default purchase order timeout (
TIMEOUT_SECONDS
)
value by setting this system property, "samples.e2e.b2b.po.timeout",
to some java long
value greater than or
equal to zero. The default value will be used if the
property is set to an invalid value.
POStatusProcessor
public POStatusProcessor()
- Constructs a processor.
process
public java.lang.Object process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
PortalRequest portalRequest,
java.lang.Object requestContext,
PipelineSession session,
RequestState rState,
SessionState sState)
throws ProcessingException
- Processes events and runs business logic for the purchase
order history portlet.
- Parameters:
request
- an HttpServletRequest
to process.response
- the HttpServletRequest
associated
with the request.portalRequest
- the PortalRequest
associated with this http request.requestContext
- the webflow request context.session
- the PipelineSession
object associated with this request.requestState
- the RequestState
associated with this
http request.sessionState
- the SessionState
associated with this
user session.- Returns:
Constants.MAXIMIZED
if the portlet is maximized,
otherwise Constants.DISPLAY
is returned.- Throws:
- IllegalStateException - if no
PurchaseQuote
exists in the SessionState
when processing a "submitPO" event.- E2EProcessingException - on a failure to submit the
PurchaseQuote
to the back-end
workflow system. - Overrides:
- process in class AbstractProcessor
getPOs
public static void getPOs(RequestState rState)
throws ParsingException
aggregatePOs
public static java.util.List aggregatePOs(PO po,
java.util.List b)
Copyright © 2002 BEA Systems, Inc. All Rights Reserved