|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.action.Action
jp.terasoluna.fw.web.struts.actions.ActionEx
jp.terasoluna.fw.web.struts.actions.AbstractBLogicAction<P>
jp.terasoluna.fw.web.struts.actions.BLogicAction<P>
P
- Specify JavaBean which is the input value to the business logicpublic class BLogicAction<P>
This class invokes BLogic.
It invokes BLogic directly from Action. This class is not supported in EJB.
To exeute BLogic implementation, specify the target business logic in the "business logic" property of <property> element in the bean definition of BLogicAction class. Refer the following example of bean definition file. The configuration example of struts-config.xml is also shown below.
Configuration of Bean definition file
<bean name="/logon/logonAction" scope="singleton"
class="jp.terasoluna.fw.web.struts.actions.BLogicAction">
<property name="businessLogic">
<ref bean="LogonBLogic"></ref>
</property>
</bean>
<bean id="LogonBLogic" scope="prototype"
class="jp.terasoluna.sample1.logon.blogic.LogonBLogic">
</bean>
Configuration example of BLogicAction in struts-config.xml
<action path="/logon/logonAction"
name="_logonForm"
validate="true"
scope="session"
input="/logon/logon.jsp">
<forward name="success" path="/logon/selectGroupSCR.do"/>
<forward name="failure" path="/logon/logonSCR.do"/>
</action>
For each action path name in the blogic-io.xml, the description regarding the mapping between Web tier such as form and session and the I/O value of business logic, should be given . For the description method and detailed description, refer to BLogicIOPlugIn.
BLogicIOPlugIn
,
BLogicResult
Field Summary | |
---|---|
private BLogic<P> |
businessLogic
Business logic to be set. |
private static org.apache.commons.logging.Log |
log
Log class. |
Fields inherited from class jp.terasoluna.fw.web.struts.actions.AbstractBLogicAction |
---|
BLOGIC_FORM_ILLEGAL_ERROR, BLOGIC_MAPPING_ILLEGAL_ERROR, BLOGIC_RESOURCES_ILLEGAL_ERROR, BLOGIC_RESULT_NULL_ERROR, NULL_MAPPER_KEY |
Fields inherited from class jp.terasoluna.fw.web.struts.actions.ActionEx |
---|
FORWARD_TXTOKEN_ERROR |
Fields inherited from class org.apache.struts.action.Action |
---|
defaultLocale, servlet |
Constructor Summary | |
---|---|
BLogicAction()
|
Method Summary | |
---|---|
BLogicResult |
doExecuteBLogic(P param)
Invokes BLogic. |
BLogic<P> |
getBusinessLogic()
Fetches business logic. |
void |
setBusinessLogic(BLogic<P> businessLogic)
Sets business logic. |
Methods inherited from class jp.terasoluna.fw.web.struts.actions.AbstractBLogicAction |
---|
convertMessages, doExecute, evaluateBLogicResult, getBLogicIO, getBLogicMapper, getBLogicParams, isErrorsEmpty, postDoExecuteBLogic, preDoExecuteBLogic, processBLogicResult, setSaveMessageScope |
Methods inherited from class jp.terasoluna.fw.web.struts.actions.ActionEx |
---|
addErrors, addMessages, execute, isSaveToken, isTokenCheck, processTokenCheck, setSaveToken, setTokenCheck |
Methods inherited from class org.apache.struts.action.Action |
---|
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
private BLogic<P> businessLogic
Constructor Detail |
---|
public BLogicAction()
Method Detail |
---|
public void setBusinessLogic(BLogic<P> businessLogic)
businessLogic
- Sets businessLogic.public BLogic<P> getBusinessLogic()
public BLogicResult doExecuteBLogic(P param) throws java.lang.Exception
The condition is that, the class variable businessLogic should contain the class which implemented BLogic. Returns null when BLogic is null.
doExecuteBLogic
in class AbstractBLogicAction<P>
param
- BLogic input information
java.lang.Exception
- Unexpected exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |