|
||||||||||
Previous class Subsequent class | Frames No frames | |||||||||
Overview: nested | Field | Constructor | Method | Details: Field | Constructor | Method |
java.lang.Objectjp.terasoluna.fw.service.thin.AbstractBLogicMapper
public abstract class AbstractBLogicMapper
Abstract class that maps input/output information of business logic.
This is the abstract class wherein the functions that maps the data between Web tier objects and business logic based on the BLogicResources retaining business logic input/output information, are aggregated. All classes that map business logic input/output information are implemented by inheriting this class. Following two are the primary functions of AbstractBLogicMapper
BLogicMapper is provided by default as a subclass of
AbstractBLogicMapper. However, this function can
also be replaced.
In such a case, it is necessary to create the class that inherits
AbstractBLogicMapper or BLogicMapper and maps business logic input/output information.
Implement the process that fetches input values and reflects output value in the extended
business logic input/output information mapping class when the string
other than request,session, application is specified in source attribute and the
string other than request, session is specified in dest attribute of
blogic-io.xml.
Method name of the process that fetches input values, is a string
which is specified in "getValueFrom" + source attribute.
When "factory" is specified in source attribute, method name becomes getValueFromFactory.
Arguments are common across all methods that fetch input value.
Arguments are same as getValueFromForm() method.
Method name of the process that reflects output value, is a string specified in
"setValueTo" + dest attribute.
When "factory" is specified in dest attribute, method name becomes getValueToFactory.
Arguments are common across all methods that reflect output value.
Arguments are same as getValueToForm() method.
request, session and application which are supported by default BLogicMapper are
for the respective request attributes, session attributes and servlet context attributes.
Refer to BLogicIOPlugIn, for the replacement of the class that maps business logic input/output information and description method of struts-config.xml when Struts is used.
BLogicMapper
,
BLogicIOPlugIn
,
BLogicResult
,
BLogicIO
,
BLogicProperty
,
BLogicResources
,
AbstractBLogicAction
,
BLogicAction
Field Summary | |
---|---|
private static java.lang.String |
ERROR_BEAN_CREATE
Error code when failed to generate JavaBean entered in business logic. |
private static java.lang.String |
ERROR_BEAN_NOTNULL
Error code when io was null in the result but the value fetched in result.getResultObject() was not null. |
private static java.lang.String |
ERROR_DEST
Error code when there were errors in the specifications of the destination where output value is set. |
private static java.lang.String |
ERROR_GETPROPERTY
Error code when unable to fetch property value from JavaBean. |
private static java.lang.String |
ERROR_GETVALUE
Error code when unable to fetch the values from the instance of input source. |
private static java.lang.String |
ERROR_SETPROPERTY
Error code when unable to set property values in JavaBean. |
private static java.lang.String |
ERROR_SETVALUE
Error code when unable to reflect the values in the instance of output destination. |
private static java.lang.String |
ERROR_SOURCE
Error code when there were errors in the specifications of the source from where input value is fetched. |
private static org.apache.commons.logging.Log |
log
Log class. |
private static java.lang.String |
NULL_RESULT_KEY
Error code when BLogicResult is null. |
Constructor Summary | |
---|---|
AbstractBLogicMapper()
|
Method Summary | |
---|---|
protected void |
getResults(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
BLogicIO io,
java.lang.Object bean)
Perform Mapping in blogic-result of blogic-io. |
abstract java.lang.Object |
getValueFromApplication(java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Fetch specified property value from servlet context. |
abstract java.lang.Object |
getValueFromRequest(java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Fetch specified property value from request. |
abstract java.lang.Object |
getValueFromSession(java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Fetch the value from the session by considering the specified property name as key. |
java.lang.Object |
mapBLogicParams(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
BLogicIO io)
Map the value stored in Web tier objects with JavaBean. |
void |
mapBLogicResult(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
BLogicIO io,
BLogicResult result)
Store the values in web tier objects according to BLogicIO. |
protected java.lang.Object |
setParams(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
BLogicIO io)
Map the values stored in Web tier objects with JavaBean on the basis of JavaBean name which is the business logic input information . |
abstract void |
setValueToRequest(java.lang.Object value,
java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Store the value in the specified property of request. |
abstract void |
setValueToSession(java.lang.Object value,
java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Store the value in session by considering the specified property name as key. |
Method inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Details |
---|
private static org.apache.commons.logging.Log log
private static final java.lang.String NULL_RESULT_KEY
private static final java.lang.String ERROR_SOURCE
private static final java.lang.String ERROR_DEST
private static final java.lang.String ERROR_BEAN_CREATE
private static final java.lang.String ERROR_GETPROPERTY
private static final java.lang.String ERROR_SETPROPERTY
private static final java.lang.String ERROR_GETVALUE
private static final java.lang.String ERROR_SETVALUE
private static final java.lang.String ERROR_BEAN_NOTNULL
Constructor Details |
---|
public AbstractBLogicMapper()
Method Details |
---|
public java.lang.Object mapBLogicParams(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BLogicIO io)
request
- HTTP requestresponse
- HTTP responseio
- Business logic input/output information
protected java.lang.Object setParams(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BLogicIO io)
request
- response
- io
-
public abstract java.lang.Object getValueFromRequest(java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
propName
- Property namerequest
- HTTP requestresponse
- HTTP response
public abstract java.lang.Object getValueFromSession(java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
propName
- Property namerequest
- HTTP requestresponse
- HTTP response
public void mapBLogicResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BLogicIO io, BLogicResult result)
request
- HTTP requestresponse
- HTTP responseio
- Business logic input/output informationresult
- Business logic outputinformationprotected void getResults(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, BLogicIO io, java.lang.Object bean)
request
- response
- io
- bean
- public abstract void setValueToRequest(java.lang.Object value, java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
value
- Output valuepropName
- Property namerequest
- HTTP requestresponse
- HTTP responsepublic abstract void setValueToSession(java.lang.Object value, java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
value
- Output valuepropName
- Property namerequest
- HTTP requestresponse
- HTTP responsepublic abstract java.lang.Object getValueFromApplication(java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
propName
- Property namerequest
- HTTP requestresponse
- HTTP response
|
||||||||||
Previous class Subsequent class | Frames No frames | |||||||||
Overview: nested | Field | Constructor | Method | Details: Field | Constructor | Method |