public class ThreadServletContext extends MappedAttributesObject implements FlashServletContext
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
ivHashCode, ivHashFlds, ivObjAttrs| Constructor and Description |
|---|
ThreadServletContext(FlashServletContext ctx)
Constructs a new
ThreadServletContext with no JDBC connection. |
ThreadServletContext(FlashServletContext ctx,
boolean dbaccess)
Constructs a new
ThreadServletContext and optionally obtains
a JDBC connection. |
| Modifier and Type | Method and Description |
|---|---|
void |
delAttr(java.lang.String key)
Deprecated.
|
boolean |
equals(java.lang.Object obj)
Compares the given object to this object and determines if the two are
equal.
|
void |
freeDbConnection()
Returns the context's JDBC connection to the connection pool.
|
java.lang.Object |
getAttr(java.lang.String key)
Deprecated.
|
java.math.BigDecimal |
getAttrBigDecimal(java.lang.String key)
Deprecated.
|
boolean |
getAttrBoolean(java.lang.String key)
Deprecated.
|
double |
getAttrDouble(java.lang.String key)
Deprecated.
|
int |
getAttrInteger(java.lang.String key)
Deprecated.
|
long |
getAttrLong(java.lang.String key)
Deprecated.
|
java.lang.String |
getAttrString(java.lang.String key)
Deprecated.
|
UserCatalogVerifier |
getCatalogVerifier()
Returns the context's user catalog verifier.
|
java.sql.Connection |
getDbConnection()
Returns the JDBC connection from the context's JDBC connection information
object.
|
JDBCConnectionInfo |
getDbConnectionInfo()
Returns the context'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 context'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 context's logon user.
|
java.lang.String |
getParam(java.lang.String name)
Deprecated.
|
java.math.BigDecimal |
getParamBigDecimal(java.lang.String name)
Deprecated.
|
java.util.Date |
getParamDate(java.lang.String name)
Deprecated.
|
double |
getParamDouble(java.lang.String name)
Deprecated.
|
int |
getParamInteger(java.lang.String name)
Deprecated.
|
long |
getParamLong(java.lang.String name)
Deprecated.
|
java.lang.String[] |
getParams(java.lang.String name)
Deprecated.
|
java.lang.String |
getParamString(java.lang.String name)
Deprecated.
|
javax.servlet.http.HttpServletRequest |
getRequest()
Deprecated.
|
javax.servlet.http.HttpServletResponse |
getResponse()
Deprecated.
|
FlashServletRequest |
getServletRequest()
Returns the current request's servlet request object.
|
FlashServlet.Stack |
getServletStack()
Returns the current session's servlet request stack.
|
javax.servlet.http.HttpSession |
getSession()
Returns the current servlet session.
|
Cart |
getShoppingCart()
Returns the context's shopping cart.
|
SecurityProfile |
getShoppingProfile()
Returns the security profile that governs how shopping & other functions
are processed.
|
User |
getShoppingUser()
Returns the context's shopping user.
|
SiteActivity |
getSiteActivity()
Returns the context's site activity.
|
UnitMeasureHandler |
getUomHandler()
Returns the context'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 session passed to
the context's constructor (within the supplied context).
|
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 |
isPost()
Deprecated.
|
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 |
setAttr(java.lang.String key,
java.lang.Object value)
Deprecated.
|
void |
setLogonUser(User user)
Sets the context's logon user.
|
cloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArrayprivate static final long serialVersionUID
public ThreadServletContext(FlashServletContext ctx)
ThreadServletContext with no JDBC connection.ctx - (FlashServletContext) The current servlet context.public ThreadServletContext(FlashServletContext ctx, boolean dbaccess)
ThreadServletContext and optionally obtains
a JDBC connection.
THREAD CLASSES THAT USE A JDBC CONNECTION MUST RETURN THE CONNECTION
TO THE CONNECTION POOL PRIOR TO COMPLETING PROCESSING.
SEE freeDbConnection.
ctx - (FlashServletContext) The current servlet context.dbaccess - (boolean) true if the user of this thread
servlet context requires access to the database, otherwise
false.java.lang.NullPointerException - - if unable to obtain a JDBC connection.public boolean equals(java.lang.Object obj)
equals in MappedAttributesObject.
This implementation always returns false.equals in class MappedAttributesObjectobj - (Object) The object to compare with this object.true if the specified object is equal to
this object, otherwise false.@Deprecated public void delAttr(java.lang.String key)
BaseServletContextdelAttr in interface BaseServletContextkey - (String) The key for the attribute value to remove.@Deprecated public java.lang.Object getAttr(java.lang.String key)
BaseServletContextgetAttr in interface BaseServletContextkey - (String) The key for the desired attribute value.null if a value for the key does not exist.@Deprecated public java.math.BigDecimal getAttrBigDecimal(java.lang.String key)
BaseServletContextBigDecimal.getAttrBigDecimal in interface BaseServletContextkey - (String) The key for the desired attribute value.null if a value for the key does not exist or if the
key's value could not be converted to a BigDecimal.@Deprecated public boolean getAttrBoolean(java.lang.String key)
BaseServletContextboolean.getAttrBoolean in interface BaseServletContextkey - (String) The key for the desired attribute value.false if a value for the key does not exist or if the
key's value could not be converted to a boolean.@Deprecated public double getAttrDouble(java.lang.String key)
BaseServletContextdouble.getAttrDouble in interface BaseServletContextkey - (String) The key for the desired attribute value.@Deprecated public int getAttrInteger(java.lang.String key)
BaseServletContextint.getAttrInteger in interface BaseServletContextkey - (String) The key for the desired attribute value.@Deprecated public long getAttrLong(java.lang.String key)
BaseServletContextlong.getAttrLong in interface BaseServletContextkey - (String) The key for the desired attribute value.@Deprecated public java.lang.String getAttrString(java.lang.String key)
BaseServletContextString.getAttrString in interface BaseServletContextkey - (String) The key for the desired attribute value.@Deprecated
public void setAttr(java.lang.String key,
java.lang.Object value)
BaseServletContextsetAttr in interface BaseServletContextkey - (String) The key associated with the value.value - (Object) The attribute value to set.@Deprecated public java.lang.String getParam(java.lang.String name)
BaseServletContextgetParam in interface BaseServletContextname - (String) The name of the desired parameter value.null if a value for the parameter name
does not exist.@Deprecated public java.lang.String[] getParams(java.lang.String name)
BaseServletContextgetParams in interface BaseServletContextname - (String) The name of the desired parameter values.null if a value for the parameter name
does not exist.@Deprecated public java.math.BigDecimal getParamBigDecimal(java.lang.String name)
BaseServletContextBigDecimal.getParamBigDecimal in interface BaseServletContextname - (String) The name of the desired parameter value.BigDecimal.@Deprecated public java.util.Date getParamDate(java.lang.String name)
BaseServletContextjava.util.Date.getParamDate in interface BaseServletContextname - (String) The name of the desired parameter value.null if a value for the parameter name does not
exist or if the parameter value could not be converted to a date.@Deprecated public double getParamDouble(java.lang.String name)
BaseServletContextdouble.getParamDouble in interface BaseServletContextname - (String) The name of the desired parameter value.@Deprecated public int getParamInteger(java.lang.String name)
BaseServletContextint.getParamInteger in interface BaseServletContextname - (String) The name of the desired parameter value.@Deprecated public long getParamLong(java.lang.String name)
BaseServletContextlong.getParamLong in interface BaseServletContextname - (String) The name of the desired parameter value.@Deprecated public java.lang.String getParamString(java.lang.String name)
BaseServletContextString.getParamString in interface BaseServletContextname - (String) The name of the desired parameter value.@Deprecated public javax.servlet.http.HttpServletRequest getRequest()
BaseServletContextgetRequest in interface BaseServletContext@Deprecated public javax.servlet.http.HttpServletResponse getResponse()
BaseServletContextgetResponse in interface BaseServletContext@Deprecated public boolean isPost()
BaseServletContextisPost in interface BaseServletContexttrue if a form has been posted,
otherwise false.public javax.servlet.http.HttpSession getSession()
getSession in interface BaseServletContextpublic UserCatalogVerifier getCatalogVerifier()
getCatalogVerifier in FlashServletContext.getCatalogVerifier in interface FlashServletContextpublic java.sql.Connection getDbConnection()
getDbConnection in FlashServletContext.getDbConnection in interface FlashServletContextpublic JDBCConnectionInfo getDbConnectionInfo()
getDbConnectionInfo in FlashServletContext.getDbConnectionInfo in interface FlashServletContextpublic <DBOBJCTLR extends JDBCObjectController<? extends JDBCObject<?>>> DBOBJCTLR getDbController(java.lang.Class<DBOBJCTLR> ctlrcls)
getDbController in FlashServletContext.getDbController in interface FlashServletContextctlrcls - (Class) The class for the desired controller.public <DBOBJ extends JDBCObject<?>> DBOBJ getDbObject(java.lang.Class<DBOBJ> objcls)
getDbObject in FlashServletContext.getDbObject in interface FlashServletContextobjcls - (Class) The class for the desired object.public UserFavoritesHandler getFavoritesHandler()
getFavoritesHandler in FlashServletContext.getFavoritesHandler in interface FlashServletContextpublic <ERPTYPE extends ERPInterface> ERPTYPE getInterface(java.lang.Class<ERPTYPE> type)
getInterface in FlashServletContext.getInterface in interface FlashServletContexttype - (Class) The type for the desired ERP interface. Must be
one of the constants defined in ERPFactory.null if unable to
create or obtain the requested ERP interface or if no interface
is defined for the given type.public User getLogonUser()
getLogonUser in FlashServletContext.getLogonUser in interface FlashServletContextpublic void setLogonUser(User user)
setLogonUser in interface FlashServletContextuser - (User) The logon user.public FlashServletRequest getServletRequest()
getServletRequest in interface FlashServletContextpublic FlashServlet.Stack getServletStack()
getServletStack in interface FlashServletContextpublic Cart getShoppingCart()
getShoppingCart in FlashServletContext.getShoppingCart in interface FlashServletContextpublic 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 FlashServletContext.getShoppingProfile in interface FlashServletContextpublic User getShoppingUser()
getShoppingUser in FlashServletContext.
isShopping) returns the current
logon user (same as getLogonUser).isSfiShopping) returns the rep's
selected user.isSfiSelect) returns
null.isSiteAdmin) returns null.null.getShoppingUser in FlashServletContext.getShoppingUser in interface FlashServletContextpublic SiteActivity getSiteActivity()
getSiteActivity in FlashServletContext.getSiteActivity in interface FlashServletContextpublic UnitMeasureHandler getUomHandler()
getUomHandler in FlashServletContext.getUomHandler in interface FlashServletContextpublic boolean isCustAdmin()
isCustAdmin in FlashServletContext.isCustAdmin in interface FlashServletContexttrue if the logon user is a customer
administrator, otherwise false.public boolean isDefaultUser()
isDefaultUser in FlashServletContext.isDefaultUser in interface FlashServletContexttrue if the logon user is the default
user, otherwise false.public boolean isLoggedOn()
isLoggedOn in FlashServletContext.isLoggedOn in interface FlashServletContexttrue 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 FlashServletContexttrue if permit processing is active,
otherwise false.public boolean isRetail()
isRetail in FlashServletContext.isRetail in interface FlashServletContexttrue if the site is for a retail store,
otherwise false.public boolean isSfiSelect()
isSfiSelect in FlashServletContext.isSfiSelect in interface FlashServletContexttrue if the logon user is a sales rep
user with no selected account, otherwise false.public boolean isSfiShopping()
isSfiShopping in FlashServletContext.isSfiShopping in interface FlashServletContexttrue if the logon user is a sales rep
user with a selected account, otherwise false.public boolean isShopping()
isShopping in FlashServletContext.isShopping in interface FlashServletContexttrue if the logon user is a basic shopping
user, otherwise false.public boolean isSiteAdmin()
isSiteAdmin in FlashServletContext.isSiteAdmin in interface FlashServletContexttrue if the logon user is a site
administrator, otherwise false.public boolean isWholesale()
isWholesale in FlashServletContext.isWholesale in interface FlashServletContexttrue if the site is for a wholesale store,
otherwise false.public void freeDbConnection()