Class ContactController

java.lang.Object
hu.rts.mike.example.dev.crm.rest.controller.ContactController

@RestController @RequestMapping("/api/contact") @PreAuthorize("isAuthenticated()") public class ContactController extends Object
  • Field Details

    • service

      private final ContactService service
    • mapper

      private final org.modelmapper.ModelMapper mapper
  • Constructor Details

    • ContactController

      public ContactController(ContactService service, org.modelmapper.ModelMapper mapper)
  • Method Details

    • table

      @GetMapping @PreAuthorize("hasAuthority(\'READ_CONTACT\')") public org.springframework.data.domain.Page<ContactDto> table(@RequestParam(value="page",defaultValue="0") int page, @RequestParam(value="size",defaultValue="20") int size, @RequestParam(value="sort",required=false) List<String> sorts, @RequestParam(value="filter",required=false) List<String> filterString)
    • getById

      @GetMapping("{id}") @PreAuthorize("hasAuthority(\'READ_CONTACT\')") public ContactDto getById(@PathVariable("id") Integer id)
    • softDeleteById

      @DeleteMapping @PreAuthorize("hasAuthority(\'DELETE_CONTACT\')") public void softDeleteById(@RequestBody IdListDto<Integer> dto)
    • restoreById

      @PatchMapping @PreAuthorize("hasAuthority(\'DELETE_CONTACT\')") public void restoreById(@RequestBody IdListDto<Integer> dto)
    • deleteById

      @DeleteMapping("delete") @PreAuthorize("hasAuthority(\'DELETE_CONTACT\')") public void deleteById(@RequestBody IdListDto<Integer> dto)
    • create

      @PostMapping @PreAuthorize("hasAuthority(\'CREATE_CONTACT\')") public ContactDto create(@RequestBody ContactDto dto)
    • update

      @PutMapping @PreAuthorize("hasAuthority(\'UPDATE_CONTACT\')") public ContactDto update(@RequestBody ContactDto dto)