|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.e2e.b2b.Helper
The Helper
class provides a collection
of static utility methods for the portal.
Functionality provided includes:
RequestState
and SessionState
objects from the
PipelineSession
.
ResourceBundle
for the
web application (portal).
Locale
for the portal.
java.text.NumberFormat
for the portal.
HttpServletRequest
parameters.
Field Summary | |
static java.lang.String |
CURRENCY_KEY
This constant is used as a key to retrieve the currency string from the portals ResourceBundle . |
static java.lang.String |
ISO_3166
ResourceBundle property for designating
the language for a Locale . |
static java.lang.String |
ISO_639
ResourceBundle property for designating
the language for a Locale . |
static java.lang.String |
STATE_KEY
STATE_KEY is used in conjunction with STATE_NAMESPACE
to retrieve RequestState and
SessionState objects from the
PipelineSession |
static java.lang.String |
STATE_NAMESPACE
STATE_NAMESPACE is used in conjunction with STATE_KEY
to retrieve RequestState and
SessionState objects from the
PipelineSession |
Method Summary | |
static java.util.ResourceBundle |
getBundle()
Obtains the ResourceBundle for this web application. |
static java.lang.String |
getCurrency()
Provides the currency string associatied with this portal (web application). |
static java.text.NumberFormat |
getCurrencyNumberFormat()
Returns the java.text.NumberFormat associated with
the Locale for this portal (web application). |
static java.lang.String |
getDayParameter(javax.servlet.http.HttpServletRequest request)
Obtains the String describing the desired delivery
day for the QPA. |
static java.util.Locale |
getLocale()
Provides the Locale object associatied with this
portal (web application). |
static java.lang.String |
getMonthParameter(javax.servlet.http.HttpServletRequest request)
Obtains the String describing the desired delivery
month offset for the QPA. |
static java.lang.String |
getPartParameter(javax.servlet.http.HttpServletRequest request)
Obtains the String describing the part chosen
by the user in the part inventory portlet. |
static PipelineSession |
getPipelineSession(javax.servlet.http.HttpServletRequest request)
Obtains the
associated with the specified servlet request. |
static java.lang.String |
getPortletEvent(javax.servlet.http.HttpServletRequest request)
Obtains the portlet webflow event for the given request. |
static java.lang.String |
getProductParameter(javax.servlet.http.HttpServletRequest request)
Obtains the String describing the product chosen
by the user in the product inventory portlet. |
static java.lang.String |
getQuantityParameter(javax.servlet.http.HttpServletRequest request)
Obtains the String describing the quantity of
product to be quoted. |
static java.lang.String |
getQuoteParameter(javax.servlet.http.HttpServletRequest request)
Obtains the String containing a quote identifier
the identifies the quote selected by the user in the quote portlet. |
static RequestState |
getRequestState(PipelineSession session,
java.lang.Object requestContext)
Obtain the from the
supplied. |
static SessionState |
getSessionState(PipelineSession session)
Obtain the from the
supplied. |
static java.lang.String |
getUnitPriceParameter(javax.servlet.http.HttpServletRequest request)
Obtains the String describing the desired unit
price for the QPA. |
static java.lang.Object |
getWebflowContext(javax.servlet.http.HttpServletRequest request)
Obtains the webflow request context object for this servlet request. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String STATE_KEY
STATE_KEY
is used in conjunction with STATE_NAMESPACE
to retrieve RequestState
and
SessionState
objects from the
PipelineSession
public static final java.lang.String STATE_NAMESPACE
STATE_NAMESPACE
is used in conjunction with STATE_KEY
to retrieve RequestState
and
SessionState
objects from the
PipelineSession
public static final java.lang.String CURRENCY_KEY
ResourceBundle
.getCurrency()
public static final java.lang.String ISO_639
ResourceBundle
property for designating
the language for a Locale
. The Locale
is used for formatting text in the web application.
The base file containing the resources is
<web app directory>/portlets/b2b.properties
.public static final java.lang.String ISO_3166
ResourceBundle
property for designating
the language for a Locale
. The Locale
is used for formatting text in the web application.
The base file containing the resources is
<web app directory>/portlets/b2b.properties
.Method Detail |
public static java.util.ResourceBundle getBundle() throws java.util.MissingResourceException
ResourceBundle
for this web application.
The bundle name is defined as JspConstants.localizedPropertiesFile
.
ResourceBundle
for this web application.MissingResourceException
- if the resource cannot
be obtained.public static java.lang.String getCurrency() throws java.util.MissingResourceException
<web app directory>/portlets/b2b.properties
.
MissingResourceException
- if the resource cannot
be obtained.public static java.util.Locale getLocale()
Locale
object associatied with this
portal (web application).
The value is obtained through a resource bundle and is
therefore localizable. The base file containing the resources is
<web app directory>/portlets/b2b.properties
.
Set the property keys
defined in this class by constants ISO_639
and ISO_3166
to
configure the Locale
as necessary.
Locale
object for this portal. If the properties
are not defined the resource file the default Locale
for
the JVM will be returned.MissingResourceException
- if the resource cannot
be obtained.public static java.text.NumberFormat getCurrencyNumberFormat()
java.text.NumberFormat
associated with
the Locale
for this portal (web application).
public static PipelineSession getPipelineSession(javax.servlet.http.HttpServletRequest request)
PipelineSession
associated with the specified servlet request.
public static java.lang.Object getWebflowContext(javax.servlet.http.HttpServletRequest request)
HttpSession
.
PipelineSession
public static RequestState getRequestState(PipelineSession session, java.lang.Object requestContext) throws ProcessingException
RequestState
from the
PipelineSession
supplied. The STATE_NAMESPACE
and
STATE_KEY
along with the
requestContext
are used as inputs to the
PipelineSession
when retrieving the RequestState
.
session
- the
PipelineSession
from which to obtain the RequestState
.requestContext
- the webflow request context to use when retrieving
the RequestState
.RequestState
object associated with the given
webflow request context. If a RequestState
object
does not exist in the
PipelineSession
a new object will be created, added to the
PipelineSession
and returned to the caller.RequestState
object is created but an exception is encounted when adding the object
to the PipelineSession
.
The exception thrown by the
PipelineSession
is passed along to the caller.public static SessionState getSessionState(PipelineSession session) throws ProcessingException
SessionState
from the
PipelineSession
supplied. The STATE_NAMESPACE
and
STATE_KEY
are used as inputs to the
PipelineSession
when retrieving the SessionState
.
session
- the
PipelineSession
from which to obtain the SessionState
.SessionState
obtained from
PipelineSession
.
If a SessionState
object
does not exist in the
PipelineSession
a new object will be created, added to the
PipelineSession
and returned to the caller.SessionState
object is created but an exception is encounted when adding the object
to the PipelineSession
.
The exception thrown by the
PipelineSession
is passed along to the caller.public static java.lang.String getPortletEvent(javax.servlet.http.HttpServletRequest request)
request
- the HttpServletRequest
for which to
obtain the portlet event.PortalAppflowConstants.PORTLET_WEBFLOW_EVENT_PARAMETER
public static java.lang.String getProductParameter(javax.servlet.http.HttpServletRequest request)
String
describing the product chosen
by the user in the product inventory portlet.
The value is obtained from the HttpServletRequest
as a parameter using the key JspConstants.PRODUCT_PARAMETER
.
ProductInventory
public static java.lang.String getPartParameter(javax.servlet.http.HttpServletRequest request)
String
describing the part chosen
by the user in the part inventory portlet.
The value is obtained from the HttpServletRequest
as a parameter using the key JspConstants.PART_PARAMETER
.
PartInventory
public static java.lang.String getQuantityParameter(javax.servlet.http.HttpServletRequest request)
String
describing the quantity of
product to be quoted. This value is entered in the QPA
portlet form.
The value is obtained from the HttpServletRequest
as a parameter using the key JspConstants.QTY_PARAMETER
.
QpaProcessor
,
QPA
public static java.lang.String getUnitPriceParameter(javax.servlet.http.HttpServletRequest request)
String
describing the desired unit
price for the QPA. This value is entered in the QPA portlet form.
The value is obtained from the HttpServletRequest
as a parameter using the key JspConstants.UNIT_PRICE_PARAMETER
.
QpaProcessor
,
QPA
public static java.lang.String getMonthParameter(javax.servlet.http.HttpServletRequest request)
String
describing the desired delivery
month offset for the QPA. This value is entered in the QPA portlet form.
The value is obtained from the HttpServletRequest
as a parameter using the key JspConstants.MONTH_PARAM
.
QpaProcessor
,
QPA
public static java.lang.String getDayParameter(javax.servlet.http.HttpServletRequest request)
String
describing the desired delivery
day for the QPA. This value is entered in the QPA portlet form.
The value is obtained from the HttpServletRequest
as a parameter using the key JspConstants.DAY_PARAM
.
QpaProcessor
,
QPA
public static java.lang.String getQuoteParameter(javax.servlet.http.HttpServletRequest request)
String
containing a quote identifier
the identifies the quote selected by the user in the quote portlet.
The value is obtained from the HttpServletRequest
as a parameter using the key JspConstants.QUOTE_PARAM
.
QuoteProcessor
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |