Class CategoryController

java.lang.Object
com.example.demo.category.CategoryController

@Controller
public class CategoryController
extends java.lang.Object
카테고리 관련된 기능들을 구현한 Controller 클래스입니다. 모든 기능이 /admin/admin.jsp에서 제공됩니다.
Version:
main 1
Author:
김평기
  • Constructor Summary

    Constructors
    Constructor Description
    CategoryController()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String addCategory​(Category c, int type)
    카테고리 추가.
    java.lang.String deleteCategory​(int type, int id)
    카테고리 삭제
    java.lang.String editCategory​(int type, Category c)
    카테고리 수정
    org.springframework.web.servlet.ModelAndView getCategory​(int type, int c_id)
    원하는 카테고리의 리스트를 받아오는 기능을 제공합니다.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CategoryController

      public CategoryController()
  • Method Details

    • getCategory

      @RequestMapping("/category/getCategory") public org.springframework.web.servlet.ModelAndView getCategory​(@RequestParam("type") int type, @RequestParam("c_id") int c_id)
      원하는 카테고리의 리스트를 받아오는 기능을 제공합니다.
      Parameters:
      type - 카테고리 분류
      c_id - 카테고리 ID
      Returns:
      Redirect할 Url
    • addCategory

      @RequestMapping("/category/addCategory") public java.lang.String addCategory​(Category c, @RequestParam("type") int type)
      카테고리 추가.
      Parameters:
      c - : 추가할 카테고리 내용을 담은 DTO
      type - : 카테고리 분류
      Returns:
      Redirect할 Url
    • editCategory

      @RequestMapping("/category/editCategory") public java.lang.String editCategory​(@RequestParam("type") int type, Category c)
      카테고리 수정
      Parameters:
      type - : 카테고리 분류
      c - : 수정할 카테고리 내용을 담은 DTO
      Returns:
      Redirect할 Url
    • deleteCategory

      @RequestMapping("/category/deleteCategory") public java.lang.String deleteCategory​(@RequestParam("type") int type, @RequestParam("id") int id)
      카테고리 삭제
      Parameters:
      type - : 카테고리 분류
      id - : 삭제한 카테고리의 id
      Returns:
      Redirect할 Url