Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- 자바
- 스프링
- 배열정렬
- 자바GUI
- 계산기GUI
- 이클립스 #이클립스단축키 #자바 #자바단축키
- GUI
- Swing
- annotation
- 숫자정렬
- 계산기
- 자바알고리즘
- 어노테이션
- Spring
- 자바 #java #이클립스 #eclipse #switch #switch문 #사칙연산 #계산기 #calculator #간단한계산기
- 버블정렬
- 알고리즘
- 오름차순정렬
- 자바 계산기
- Eclipse
- Java
- 이클립스
- MVC
- 내림차순정렬
- 버블소트
Archives
- Today
- Total
온 코딩
[MVC](온라인쇼핑몰) Action모음 및 ActionFactory 본문
ActionFactory
- 모든 서블릿을 한꺼번에 가공 가능한 팩토리~
package com.freeflux.controller;
import com.freeflux.controller.action.*;
import com.freeflux.admin.controller.action.*;
public class ActionFactory {
private static ActionFactory instance = new ActionFactory();
private ActionFactory() {
super();
}
public static ActionFactory getInstance() {
return instance;
}
public Action getAction(String command) {
Action action = null;
System.out.println("ActionFactory :" + command);
/* 추가된 부분 */
if (command.equals("index")) {
action = new IndexAction();
} else if (command.equals("product_detail")) {
action = new ProductDetailAction();
} else if (command.equals("catagory")) {
action = new ProductKindAction();
} else if (command.equals("contract")) {
action = new ContractAction();
} else if (command.equals("join_form")) {
action = new JoinFormAction();
} else if (command.equals("id_check_form")) {
action = new IdCheckFormAction();
} else if (command.equals("find_zip_num")) {
action = new FindZipNumAction();
} else if (command.equals("join")) {
action = new JoinAction();
} else if (command.equals("login_form")) {
action = new LoginFormAction();
} else if (command.equals("login")) {
action = new LoginAction();
} else if (command.equals("logout")) {
action = new LogoutAction();
} else if (command.equals("cart_insert")) {
action = new CartInsertAction();
} else if (command.equals("cart_list")) {
action = new CartListAction();
} else if (command.equals("cart_delete")) {
action = new CartDeleteAction();
} else if (command.equals("order_insert")) {
action = new OrderInsertAction();
} else if (command.equals("order_list")) {
action = new OrderListAction();
} else if (command.equals("mypage")) {
action = new MyPageAction();
} else if (command.equals("order_detail")) {
action = new OrderDetailAction();
} else if (command.equals("order_all")) {
action = new OrderAllAction();
} else if (command.equals("qna_list")) {
action = new QnaListAction();
} else if (command.equals("qna_write_form")) {
action = new QnaWriteFormAction();
} else if (command.equals("qna_write")) {
action = new QnaWriteAction();
} else if (command.equals("qna_view")) {
action = new QnaViewAction();
}
// admin
if (command.equals("admin_login_form")) {
action = new AdminIndexAction();
} else if (command.equals("admin_login")) {
action = new AdminLoginAction();
} else if (command.equals("admin_logout")) {
action = new AdminLogoutAction();
} else if (command.equals("admin_product_list")) {
action = new AdminProductListAction();
} else if (command.equals("admin_product_write_form")) {
action = new AdminProductWriteFormAction();
} else if (command.equals("admin_product_write")) {
action = new AdminProductWriteAction();
} else if (command.equals("admin_product_detail")) {
action = new AdminProductDetailAction();
} else if (command.equals("admin_product_update_form")) {
action = new AdminProductUpdateFormAction();
} else if (command.equals("admin_product_update")) {
action = new AdminProductUpdateAction();
} else if (command.equals("admin_order_list")) {
action = new AdminOrderListAction();
} else if (command.equals("admin_order_save")) {
action = new AdminOrderSaveAction();
} else if (command.equals("admin_member_list")) {
action = new AdminMemberListAction();
} else if (command.equals("admin_qna_list")) {
action = new AdminQnaListAction();
} else if (command.equals("admin_qna_detail")) {
action = new AdminQnaDetailAction();
} else if (command.equals("admin_qna_repsave")) {
action = new AdminQnaResaveAction();
}
return action;
}
}
+ DAO 및 DTO
'복습 ARCHIVE > 모델별 프로젝트' 카테고리의 다른 글
[Spring](간단한게시판) 기본 구조 및 .xml 준비 (0) | 2021.06.10 |
---|---|
[MVC](온라인쇼핑몰) js 파일 목록 (0) | 2021.06.09 |
[Spring] 기본 개념 및 구조 (0) | 2021.06.09 |
[Model2](게시판) 완성본 및 화면 (0) | 2021.06.08 |
[Model1] test_poll / 투표시스템_파일첨부 (0) | 2021.06.08 |
Comments