Class FavoriteItemController<ID_TYPE extends Serializable>

java.lang.Object
systems.dennis.shared.utils.ApplicationContext
systems.dennis.shared.favorite.controller.FavoriteItemController<ID_TYPE>
All Implemented Interfaces:
systems.dennis.shared.controller.forms.Serviceable<FavoriteItemModel,String>, systems.dennis.shared.controller.forms.ValidateForm<FavoriteItemForm>, systems.dennis.shared.controller.items.AbstractAddItemController<FavoriteItemModel,FavoriteItemForm,String>, systems.dennis.shared.controller.items.AbstractDeleteItemController<FavoriteItemModel,String>, systems.dennis.shared.controller.items.magic.MagicForm<FavoriteItemForm>, systems.dennis.shared.controller.items.Transformable<FavoriteItemModel,FavoriteItemForm>, systems.dennis.shared.mongo.controller.AddItemController<FavoriteItemModel,FavoriteItemForm>, systems.dennis.shared.mongo.controller.DeleteItemController<FavoriteItemModel>

@RestController @RequestMapping("/api/v2/shared/favorite") @CrossOrigin public class FavoriteItemController<ID_TYPE extends Serializable> extends systems.dennis.shared.utils.ApplicationContext implements systems.dennis.shared.mongo.controller.AddItemController<FavoriteItemModel,FavoriteItemForm>, systems.dennis.shared.mongo.controller.DeleteItemController<FavoriteItemModel>
  • Field Summary

    Fields inherited from class systems.dennis.shared.utils.ApplicationContext

    CREATED_FIELDS_MAP

    Fields inherited from interface systems.dennis.shared.controller.items.magic.MagicForm

    pojoFormCache

    Fields inherited from interface systems.dennis.shared.controller.forms.Serviceable

    log
  • Constructor Summary

    Constructors
    Constructor
    Description
    FavoriteItemController(systems.dennis.shared.config.WebContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<FavoriteResponse>
    byName(String name)
     
     
    org.springframework.http.ResponseEntity<FavoriteResponse>
     
    org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<Map<String,Object>>>
    findByType(String type, String name, Integer limit, Integer page)
     
     
    org.springframework.http.ResponseEntity<FavoriteResponse>
     
    org.springframework.data.domain.Page<Map<String,Object>>
    toFormPage(org.springframework.data.domain.Page<? extends systems.dennis.shared.mongo.service.StringIdEntity> page, Class<?> c)
     

    Methods inherited from class systems.dennis.shared.utils.ApplicationContext

    canEqual, equals, getBean, getContext, getCurrentUser, getDefaultLogger, hashCode, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface systems.dennis.shared.controller.items.AbstractAddItemController

    afterSaveForm

    Methods inherited from interface systems.dennis.shared.mongo.controller.AddItemController

    add

    Methods inherited from interface systems.dennis.shared.mongo.controller.DeleteItemController

    delete, deleteItems

    Methods inherited from interface systems.dennis.shared.controller.items.magic.MagicForm

    copyTo, fetchForm, getDescription, getPojoForm, setPojoFormValue

    Methods inherited from interface systems.dennis.shared.controller.forms.Serviceable

    getContext, getForm, getLog, getModel, getServiceClass

    Methods inherited from interface systems.dennis.shared.controller.items.Transformable

    afterTransformToDBType, afterTransformToForm, fromForm, getClassDescription, getContext, toForm, toFormPage, transformValueToFormType, transformValueToModelType, transformValueToTargetType

    Methods inherited from interface systems.dennis.shared.controller.forms.ValidateForm

    checkValidation, getClassOfForm, getContext, validate, validate, validate, validateField
  • Constructor Details

    • FavoriteItemController

      public FavoriteItemController(systems.dennis.shared.config.WebContext context)
  • Method Details

    • enabled

      @GetMapping("/enabled") @ResponseBody public org.springframework.http.ResponseEntity<FavoriteResponse> enabled()
    • byName

      @GetMapping("/byName") @ResponseBody public org.springframework.http.ResponseEntity<FavoriteResponse> byName(@RequestParam("name") String name)
    • isFavorite

      @PostMapping("/is_favorite") @ResponseBody public org.springframework.http.ResponseEntity<FavoriteResponse> isFavorite(@RequestBody FavoriteItemForm form)
    • delete

      @PostMapping("/delete") public FavoriteResponse delete(@RequestBody FavoriteItemForm id) throws systems.dennis.shared.exceptions.ItemNotUserException, systems.dennis.shared.exceptions.ItemNotFoundException
      Throws:
      systems.dennis.shared.exceptions.ItemNotUserException
      systems.dennis.shared.exceptions.ItemNotFoundException
    • findByType

      @GetMapping("/list/{type}/{searchName}") @ResponseBody public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<Map<String,Object>>> findByType(@PathVariable String type, @PathVariable("searchName") String name, @RequestParam(value="limit",required=false) Integer limit, @RequestParam(value="page",required=false) Integer page)
    • toFormPage

      public org.springframework.data.domain.Page<Map<String,Object>> toFormPage(org.springframework.data.domain.Page<? extends systems.dennis.shared.mongo.service.StringIdEntity> page, Class<?> c)
    • getService

      public FavoriteItemService getService()
      Specified by:
      getService in interface systems.dennis.shared.controller.forms.Serviceable<FavoriteItemModel,String>