|
||||||||||
Previous class Subsequent class | Frames No frames | |||||||||
Overview: Nested | Field | Constructor | Method | Details: Field | Constructor | Method |
java.lang.Objectjp.terasoluna.fw.service.thin.AbstractBLogicMapper
jp.terasoluna.fw.service.thin.BLogicMapper
public class BLogicMapper
Class that maps business logic input/output information.
The data between Web tier objects and business logic is mapped based on the
BLogicResources generated by BLogicIOPlugIn.
Input from Web tier is from request attribute (request), session attribute (session)
and servlet context (application).
Output from business logic is for request attribute (request)and
session attribute (session) *Output from business logic to servlet
context is not supported.
This class is provided by default as a subclass of AbstractBLogicMapper.
However, this function can also be replaced through the BLogicIOPlugIn
settings of struts-config.xml.In such a case, it is necessary to create the class
that inherits AbstractBLogicMapper or BLogicMapper and maps the business logic input/output information.
Implement the process that fetches input value and the process that 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 of blogic-io.xml and the string other
than request, session is specified in dest attribute .
Method name of process that fetches input value, 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 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 getValueFromForm() method.
When the destination and fetch source of the value is ActionForm, the nested property name
can be specified.
For replacement of the class that maps business logic input/output information and description method of struts-config.xml, refer to BLogicIOPlugIn .
AbstractBLogicMapper
,
BLogicIOPlugIn
Field Summary | |
---|---|
private static java.lang.String |
ERROR_RESOURCES_FILE
Error code when there were no resource files. |
private static org.apache.commons.logging.Log |
log
Log class. |
Constructor Summary | |
---|---|
BLogicMapper()
Constructor. |
|
BLogicMapper(java.lang.String resources)
Constructor. |
Method Summary | |
---|---|
protected org.apache.struts.action.ActionForm |
getActionForm(javax.servlet.http.HttpServletRequest request)
Fetch ActionForm instance which is stored in request or session. |
java.lang.Object |
getValueFromApplication(java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Fetch the value from servlet context by considering the specified property name as key. |
java.lang.Object |
getValueFromForm(java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Fetch the specified property value from form. |
java.lang.Object |
getValueFromRequest(java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Fetch specified property value from request. |
java.lang.Object |
getValueFromSession(java.lang.String propName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Fetch the value from session by considering the specified property name as key. |
void |
setValueToForm(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 form. |
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. |
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 jp.terasoluna.fw.service.thin.AbstractBLogicMapper |
---|
getResults, mapBLogicParams, mapBLogicResult, setParams |
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 ERROR_RESOURCES_FILE
Constructor Details |
---|
public BLogicMapper()
public BLogicMapper(java.lang.String resources)
resources
- Path of resourceMethod Details |
---|
public java.lang.Object getValueFromRequest(java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
getValueFromRequest
in class AbstractBLogicMapper
propName
- Property namerequest
- HTTP requestresponse
- HTTP response
public java.lang.Object getValueFromForm(java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws PropertyAccessException
propName
- Property namerequest
- HTTP requestresponse
- HTTP response
PropertyAccessException
public java.lang.Object getValueFromSession(java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
AbstractBLogicMapper
in class getValueFromSession
propName
- Property namerequest
- HTTP requestresponse
- HTTP response
public void setValueToRequest(java.lang.Object value, java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
setValueToRequest
in class AbstractBLogicMapper
value
- Output valuepropName
- Property namerequest
- HTTP requestresponse
- HTTP responsepublic void setValueToForm(java.lang.Object value, java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws PropertyAccessException
value
- Output valuepropName
- Property namerequest
- HTTP requestresponse
- HTTP response
PropertyAccessException
public void setValueToSession(java.lang.Object value, java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
setValueToSession
in class AbstractBLogicMapper
value
- Output valuepropName
- Property namerequest
- HTTP requestresponse
- HTTP responseprotected org.apache.struts.action.ActionForm getActionForm(javax.servlet.http.HttpServletRequest request)
request
- HTTP request
public java.lang.Object getValueFromApplication(java.lang.String propName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
getValueFromApplication
in class AbstractBLogicMapper
propName
- Property namerequest
- HTTP requestresponse
- HTTP response
|
||||||||||
Previous class Subsequent class | Frames No frames | |||||||||
Overview: Nested | Field | Constructor | Method | Details: Field | Constructor | Method |