|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.web.action.AbstractWebAction
kr.co.hit.live.web.action.AbstractWebMultiAction
public abstract class AbstractWebMultiAction
WebMultiAction을 구현시 필요한 호출 메소드 설정 및 조회 기능을 구현한 클래스이다. WebMultiAction은 다음과 같이 구현한다.
public interface TestWebMultiAction extends WebMultiAction {
WebActionForward display(HttpServletRequest request, HttpServletResponse response) throws Exception;
WebActionForward update(HttpServletRequest request, HttpServletResponse response) throws Exception;
... 중략 ...
}
public class TestWebMultiActionImpl extends AbstractWebMultiAction
implements TestWebMultiAction {
private static final Logger logger = LoggerFactory.getLogger(TestWebMultiActionImpl.class);
public WebActionForward display(HttpServletRequest request,
HttpServletResponse response) throws Exception {
logger.error("This is TestWebMultiAction.display()...");
return createForward("default").addModel("code","display");
}
public WebActionForward update(HttpServletRequest request,
HttpServletResponse response) throws Exception {
logger.error("This is TestWebMultiAction.update()...");
return createForward("default").addModel("code","update");
}
}
<service name="testmulti.do"
interface="${package}.TestWebMultiAction"
class="${package}.TestWebMultiActionImpl"
interceptor="system.proxy"
singleton="true">
<property name="selector" value="method"/>
<property name="defaultMethod" value="display"/>
<property name="forward" value="default:=/ganhogibonweb/jsp/test.jsp"/>
<property name="prefix" value="/webapps/tmp"/>
</service>
| Field Summary | |
|---|---|
protected String |
defaultMethodName
호출할 메소드 명을 찾지 못할 경우 사용할 디폴트 메소드 명 |
protected String |
methodSelector
호출할 메소드 명을 얻기위한 reqeust parameter 명 |
| Fields inherited from class kr.co.hit.live.web.action.AbstractWebAction |
|---|
context, logger |
| Constructor Summary | |
|---|---|
AbstractWebMultiAction()
|
|
| Method Summary | |
|---|---|
WebActionForward |
execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
WebActionDispatcher 서블릿이 호출하는 메소드이다. |
String |
getMethodName(javax.servlet.http.HttpServletRequest request)
HttpServletRequest의 request parameter 중에서 selector로 지정된 파라메터 명을 사용하여 호출할 메소드 명을 얻어온다. selector로 지정된 파라메터명에 해당되는 값이 존재하지 않으면 디폴트로 설정한 메소드 명을 반환한다. |
void |
setDefaultMethod(String defaultName)
호출할 메소드 명을 찾지 못했을 경우 사용할 디폴트 메소드 명을 지정한다. |
void |
setSelector(String selectorName)
호출할 메소드 명을 얻기 위하여 사용할 파라메터의 이름(Selector)을 지정한다. |
void |
showConfiguration(javax.servlet.http.HttpServletResponse response)
WebAction의 설정값을 출력하는 메소드이다. |
| Methods inherited from class kr.co.hit.live.web.action.AbstractWebAction |
|---|
createForward, getServletContext, getWebApplicationContext, setForward, setPrefix, setSuffix, setWebApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface kr.co.hit.live.web.action.WebAction |
|---|
setWebApplicationContext |
| Field Detail |
|---|
protected String methodSelector
protected String defaultMethodName
| Constructor Detail |
|---|
public AbstractWebMultiAction()
| Method Detail |
|---|
public WebActionForward execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
WebAction
execute in interface WebActionexecute in class AbstractWebActionException
public void showConfiguration(javax.servlet.http.HttpServletResponse response)
throws IOException
WebAction
showConfiguration in interface WebActionshowConfiguration in class AbstractWebActionIOExceptionpublic void setSelector(String selectorName)
getMethodName()는 항상 null을 리턴한다.
selectorName - public void setDefaultMethod(String defaultName)
defaultName - public String getMethodName(javax.servlet.http.HttpServletRequest request)
getMethodName in interface WebMultiActionrequest - defaultSelector - 설정된 Selector가 없을 경우에 사용할 디폴트 selector 값
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||