|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.portal.appflow.processor.AbstractPortalProcessor | +--examples.e2e.b2b.processors.AbstractProcessor | +--examples.e2e.b2b.processors.QpaProcessor
The QpaProcessor
runs business logic for the
price query portlet (pricequery.portlet).
This class handles the following portlet webflow
events
(See PortalAppflowConstants.PORTLET_WEBFLOW_EVENT_PARAMETER
)
directed to the price query portlet:
Events are acted upon by the process()
method of this class.
The "selectPart" portlet webflow event
indicates that the user has selected a part from the
part inventory portlet. The processor obtains the
part identifier selected by the user
from the HttpServletRequest
with
the help of the getPartParameter()
method
of Helper
. The
InventoryProvider
EJB
is used to obtain the Inventory
object corresponding to the part identifier. The
examples.e2e.common.Inventory
object is stored in the
user's SessionState
.
Following the successful completion of the aforementioned work
the StateValue
of the
SessionState
is set to
StateValue.PART_SELECTED
and a value
of Constants.DISPLAY
is returned to the caller.
The "submitQpa" portlet webflow event
is generated when the user submits the QPA form in the
price query portlet. The processor validates the form
information and either throws an
,
which causes the form to be redisplayed with an appropriate message,
or creates and submits a InvalidFormDataException
QPA
to the back-end workflow system.
The created QPA
is added to the SessionState
.
The SessionState
is also updated to reflect when the quote
system will be considered to be timed out
(See TIMEOUT_PROP
for more details).
A PurchaseManager
EJB is
used to submit the QPA
.
On successful submission of the QPA
the StateValue
of the
SessionState
is set to
StateValue.QPA_SENT
and a value
of Constants.READ_ONLY
is returned to the caller.
The "bea.portal.framework.internal.refresh" and
"null" events are handled identically. When
encountered the processsor simply returns an appropriate
response based on the StateValue
of the
SessionState
.
if the StateValue
is
StateValue.START
or
StateValue.PRODUCT_SELECTED
a value of
Constants.NOT_SELECTED
is returned by
process()
.
if the StateValue
is
StateValue.PART_SELECTED
a value of
Constants.DISPLAY
is returned by
process()
.
Otherwise a value of
Constants.READ_ONLY
is returned by
process()
.
Field Summary | |
static java.lang.String |
TIMEOUT_PROP
Override the default QPA timeout ( TIMEOUT_SECONDS )
value by setting this system property, "samples.e2e.b2b.qpa.timeout",
to some java long value greater than or
equal to zero. |
static long |
TIMEOUT_SECONDS
The default value for the QPA timeout: 300 seconds. |
Constructor Summary | |
QpaProcessor()
Constructs a processor. |
Method Summary | |
protected java.util.Calendar |
getCalendar(javax.servlet.http.HttpServletRequest request,
java.util.Calendar currentDate,
RequestState rState)
|
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)
|
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 com.bea.portal.appflow.processor.AbstractPortalProcessor |
getCurrentPortletState,
process |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final long TIMEOUT_SECONDS
public static final java.lang.String TIMEOUT_PROP
TIMEOUT_SECONDS
)
value by setting this system property, "samples.e2e.b2b.qpa.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.Constructor Detail |
public QpaProcessor()
Method Detail |
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, InvalidFormDataException
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.Constants.NOT_SELECTED
if no part
has been selected from the product inventory portlet, otherwise
a value of Constants.DISPLAY
is returned.
HttpServletRequest
or if the part
identifier is null when processing a "selectPart" event.
Inventory
object for the part identifier encountered when
processing a "selectPart" event.
SessionState
when processing a "submitQpa" event.
InventoryProvider
EJB
when attempting to obtain part Inventory
objects
during processing of a "selectPart" event.
QPA
to the back-end
workflow system.
protected java.util.Calendar getCalendar(javax.servlet.http.HttpServletRequest request, java.util.Calendar currentDate, RequestState rState) throws InvalidFormDataException
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |