|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softslate.commerce.businessobjects.core.BaseBusinessObject com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
Abstract superclass for all objects in the business layer.
The methods provided allow implementations to communicate with other elements
of the application. In particular, retrieve settings (using
getSettingsBean()
), retrieve user information (using
getUser()
), create data access objects (using
getDaoFactory()
) and create other business objects (using
getBusinessObjectFactory()
).
Field Summary | |
private BusinessObjectFactory |
businessObjectFactory
|
private DAOFactory |
daoFactory
|
(package private) static org.apache.commons.logging.Log |
log
|
private SettingsBean |
settingsBean
|
private User |
user
|
Constructor Summary | |
BaseBusinessProcessor()
|
Method Summary | |
java.lang.String |
formatPrice(double rawPrice)
|
BusinessObjectFactory |
getBusinessObjectFactory()
Retrieves the BusinessObjectFactory previously set for
this business object. |
DAOFactory |
getDaoFactory()
Retrieves the DAOFactory previously set for this business
object. |
SettingsBean |
getSettingsBean()
Retrieves the SettingsBean previously set for this
business object. |
User |
getUser()
Retrieves the User previously set for this business
object. |
void |
initialize(java.util.Map transferMap)
Initializes this business object by copying incoming parameters into its properties. |
void |
setBusinessObjectFactory(BusinessObjectFactory businessObjectFactory)
Sets this business object's BusinessObjectFactory . |
void |
setDaoFactory(DAOFactory daoFactory)
Sets this business object's DAOFactory . |
void |
setSettingsBean(SettingsBean settingsBean)
Sets this business object's SettingsBean . |
void |
setUser(User user)
Sets this business object's User . |
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessObject |
formatDateTime, parseDateTime, prepareRequestData, sendHTTPPost |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static org.apache.commons.logging.Log log
private SettingsBean settingsBean
private User user
private DAOFactory daoFactory
private BusinessObjectFactory businessObjectFactory
Constructor Detail |
public BaseBusinessProcessor()
Method Detail |
public SettingsBean getSettingsBean()
BusinessProcessor
SettingsBean
previously set for this
business object.
getSettingsBean
in interface BusinessProcessor
SettingsBean
object that represents various
settings for the system.public void setSettingsBean(SettingsBean settingsBean)
BusinessProcessor
SettingsBean
. Used by the
application's BusinessObjectFactory
(through
initialize(Map parameters)
), to provide the system's
SettingsBean
to this business object.
setSettingsBean
in interface BusinessProcessor
settingsBean
- The current SettingsBean
for the system,
containing various settings to be used by this business
object.public User getUser()
BusinessProcessor
User
previously set for this business
object.
getUser
in interface BusinessProcessor
User
object that represents the user currently
accessing the system.public void setUser(User user)
BusinessProcessor
User
. Used by the
application's BusinessObjectFactory
(through
initialize(Map parameters)
), to provide the current
User
accessing the system to this business object.
setUser
in interface BusinessProcessor
user
- The current User
accessing the system, for
which business processing is to be performed by this business
object.public DAOFactory getDaoFactory()
BusinessProcessor
DAOFactory
previously set for this business
object.
getDaoFactory
in interface BusinessProcessor
DAOFactory
object that can be used to create
data access objects.public void setDaoFactory(DAOFactory daoFactory)
BusinessProcessor
DAOFactory
. Used by the
application's BusinessObjectFactory
(through
initialize(Map parameters)
), to provide the current
DAOFactory
for the system to this business object.
setDaoFactory
in interface BusinessProcessor
daoFactory
- The current DAOFactory
for the system, which
will allow this business object to create data access objects.public BusinessObjectFactory getBusinessObjectFactory()
BusinessProcessor
BusinessObjectFactory
previously set for
this business object.
getBusinessObjectFactory
in interface BusinessProcessor
BusinessObjectFactory
object that can be used to
create other business objects.public void setBusinessObjectFactory(BusinessObjectFactory businessObjectFactory)
BusinessProcessor
BusinessObjectFactory
. Used
by the application's BusinessObjectFactory
(through
initialize(Map parameters)
), to provide itself to this
business object, so that it can create other business objects in turn.
setBusinessObjectFactory
in interface BusinessProcessor
businessObjectFactory
- The current BusinessObjectFactory
for the
system, allowing this business object to create other business
objects.public void initialize(java.util.Map transferMap) throws java.lang.Exception
BusinessObject
BusinessObjectFactory
after object creation.
initialize
in interface BusinessObject
initialize
in class BaseBusinessObject
java.lang.Exception
public java.lang.String formatPrice(double rawPrice)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |