public class FlashServlet.Context extends BaseServlet.Context implements FlashServletContext
BaseServlet.Context
and adds variables unique to this
application.Modifier and Type | Field and Description |
---|---|
FlashServletRequest |
nextURL
The servlet request object used to invoke the next servlet for processing.
|
protected JDBCConnectionInfo |
reqDbConnectInfo
The current request's JDBC connection information object.
|
private static long |
serialVersionUID
The class' serialization version id.
|
protected Cart |
sessionCart
The current session's shopping cart.
|
protected boolean |
sessionLogon
A flag indicating user logon has occurred.
|
protected SecurityProfile |
sessionSecProfile
The current session's security profile.
|
protected User |
sessionUser
The current session's user.
|
protected User |
sessionUserSfi
The current session's SFI/CSR selected user.
|
FlashServletRequest |
thisURL
The current request's servlet request object.
|
request, requestBrowser, requestFlag, response, responseFlag, session, sessionNextURL, templateData
Modifier | Constructor and Description |
---|---|
protected |
Context(javax.servlet.http.HttpServletRequest rqst,
javax.servlet.http.HttpServletResponse resp)
Constructs a new
Context . |
Modifier and Type | Method and Description |
---|---|
UserCatalogVerifier |
getCatalogVerifier()
Returns the current session's user catalog verifier.
|
java.sql.Connection |
getDbConnection()
Returns the JDBC connection from the current request's JDBC connection
information object.
|
JDBCConnectionInfo |
getDbConnectionInfo()
Returns the current request's JDBC connection information object.
|
<DBOBJCTLR extends JDBCObjectController<? extends JDBCObject<?>>> |
getDbController(java.lang.Class<DBOBJCTLR> ctlrcls)
Returns the JDBC object controller for the given controller class.
|
<DBOBJ extends JDBCObject<?>> |
getDbObject(java.lang.Class<DBOBJ> objcls)
Returns the JDBC object for the given object class.
|
UserFavoritesHandler |
getFavoritesHandler()
Returns the current session's user favorites handler.
|
<ERPTYPE extends ERPInterface> |
getInterface(java.lang.Class<ERPTYPE> type)
Returns the ERP interface for the given interface type.
|
User |
getLogonUser()
Returns the current logon user.
|
FlashServletRequest |
getServletRequest()
Returns the current request's servlet request object.
|
FlashServlet.Stack |
getServletStack()
Returns the current session's servlet request stack.
|
Cart |
getShoppingCart()
Returns the current shopping cart.
|
SecurityProfile |
getShoppingProfile()
Returns the security profile that governs how shopping & other functions
are processed.
|
User |
getShoppingUser()
Returns the current shopping user.
|
SiteActivity |
getSiteActivity()
Returns the current session's site activity.
|
UnitMeasureHandler |
getUomHandler()
Returns the current session's unit of measure handler.
|
boolean |
isCustAdmin()
Answers if the logon user is a customer administrator.
|
boolean |
isDefaultUser()
Answers if the logon user is the default user (no one is logged on).
|
boolean |
isLoggedOn()
Answers if a successful logon has occurred during the current session.
|
boolean |
isPermitActive()
Answers if permit processing is in effect (active) based on the value
of
Flash.PERMIT_ENABLED and whether any shopping is currently
taking place. |
boolean |
isRetail()
Answers if the site is for a retail store.
|
boolean |
isSfiSelect()
Answers if the logon user is a sales rep user and there is no account
currently selected.
|
boolean |
isSfiShopping()
Answers if the logon user is a sales rep user and there is an account
currently selected.
|
boolean |
isShopping()
Answers if the logon user is a basic shopping user.
|
boolean |
isSiteAdmin()
Answers if the logon user is a site administrator.
|
boolean |
isWholesale()
Answers if the site is for a wholesale store.
|
void |
setLogonUser(User user)
Sets the current logon user.
|
delAttr, getAttr, getAttrBigDecimal, getAttrBoolean, getAttrDouble, getAttrInteger, getAttrLong, getAttrString, getParam, getParamBigDecimal, getParamDate, getParamDouble, getParamInteger, getParamLong, getParams, getParamString, getRequest, getResponse, getSession, isPost, setAttr
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
delAttr, getAttr, getAttrBigDecimal, getAttrBoolean, getAttrDouble, getAttrInteger, getAttrLong, getAttrString, getParam, getParamBigDecimal, getParamDate, getParamDouble, getParamInteger, getParamLong, getParams, getParamString, getRequest, getResponse, getSession, isPost, setAttr
private static final long serialVersionUID
protected Cart sessionCart
protected boolean sessionLogon
protected SecurityProfile sessionSecProfile
protected User sessionUser
protected User sessionUserSfi
protected JDBCConnectionInfo reqDbConnectInfo
confirmSession
and returned by requestComplete
.public FlashServletRequest thisURL
confirmSession
.public FlashServletRequest nextURL
protected Context(javax.servlet.http.HttpServletRequest rqst, javax.servlet.http.HttpServletResponse resp)
Context
.rqst
- (HttpServletRequest) The servlet's incoming request.resp
- (HttpServletResponse) The servlet's outgoing response.public UserCatalogVerifier getCatalogVerifier()
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getCatalogVerifier
in interface FlashServletContext
public java.sql.Connection getDbConnection()
getDbConnectInfo().getConnection()
.
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getDbConnection
in interface FlashServletContext
public JDBCConnectionInfo getDbConnectionInfo()
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getDbConnectionInfo
in interface FlashServletContext
public <DBOBJCTLR extends JDBCObjectController<? extends JDBCObject<?>>> DBOBJCTLR getDbController(java.lang.Class<DBOBJCTLR> ctlrcls)
getDbConnectInfo().getController()
.
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getDbController
in interface FlashServletContext
ctlrcls
- (Class) The class for the desired controller.public <DBOBJ extends JDBCObject<?>> DBOBJ getDbObject(java.lang.Class<DBOBJ> objcls)
getDbObject
in interface FlashServletContext
objcls
- (Class) The class for the desired object.public UserFavoritesHandler getFavoritesHandler()
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getFavoritesHandler
in interface FlashServletContext
public <ERPTYPE extends ERPInterface> ERPTYPE getInterface(java.lang.Class<ERPTYPE> type)
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getInterface
in interface FlashServletContext
type
- (Class) The type for the desired ERP interface. Must be
one of the constants defined in ERP
.null
if unable to
create or obtain the requested ERP interface or if no interface
is defined for the given type.public User getLogonUser()
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getLogonUser
in interface FlashServletContext
public void setLogonUser(User user)
setLogonUser
in interface FlashServletContext
user
- (User) The logon user.public FlashServletRequest getServletRequest()
getServletRequest
in interface FlashServletContext
public FlashServlet.Stack getServletStack()
getServletStack
in interface FlashServletContext
public Cart getShoppingCart()
getShoppingCart
in interface FlashServletContext
public SecurityProfile getShoppingProfile()
isShopping
) this will either be the
default user's security profile or the logon user's security profile.isSfiShopping
) this will be the
rep's security profile.isSfiSelect
) this will be
the rep's security profile.isSiteAdmin
) this will be the admin user's
security profile.null
.getShoppingProfile
in interface FlashServletContext
public User getShoppingUser()
isShopping
) returns the current
logon user (same as getLogonUser
).isSfiShopping
) returns the rep's
selected user.isSfiSelect
) returns
null
.isSiteAdmin
) returns null
.null
.DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getShoppingUser
in interface FlashServletContext
public SiteActivity getSiteActivity()
getSiteActivity
in interface FlashServletContext
public UnitMeasureHandler getUomHandler()
DO NOT CACHE THE RETURNED VALUE. DO NOT USE THE RETURNED VALUE IN A THREAD OTHER THAN THE SERVLET'S THREAD.
getUomHandler
in interface FlashServletContext
public boolean isCustAdmin()
isCustAdmin
in interface FlashServletContext
true
if the logon user is a customer
administrator, otherwise false
.public boolean isDefaultUser()
isDefaultUser
in interface FlashServletContext
true
if the logon user is the default
user, otherwise false
.public boolean isLoggedOn()
isLoggedOn
in interface FlashServletContext
true
if a successful logon has occurred,
otherwise false
.public boolean isPermitActive()
Flash.PERMIT_ENABLED
and whether any shopping is currently
taking place.isPermitActive
in interface FlashServletContext
true
if permit processing is active,
otherwise false
.public boolean isRetail()
isRetail
in interface FlashServletContext
true
if the site is for a retail store,
otherwise false
.public boolean isSfiSelect()
isSfiSelect
in interface FlashServletContext
true
if the logon user is a sales rep
user with no selected account, otherwise false
.public boolean isSfiShopping()
isSfiShopping
in interface FlashServletContext
true
if the logon user is a sales rep
user with a selected account, otherwise false
.public boolean isShopping()
isShopping
in interface FlashServletContext
true
if the logon user is a basic shopping
user, otherwise false
.public boolean isSiteAdmin()
isSiteAdmin
in interface FlashServletContext
true
if the logon user is a site
administrator, otherwise false
.public boolean isWholesale()
isWholesale
in interface FlashServletContext
true
if the site is for a wholesale store,
otherwise false
.