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 Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final ContactService -
Constructor Summary
ConstructorsConstructorDescriptionContactController(ContactService service, org.modelmapper.ModelMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptioncreate(ContactDto dto) voiddeleteById(IdListDto<Integer> dto) voidrestoreById(IdListDto<Integer> dto) voidsoftDeleteById(IdListDto<Integer> dto) org.springframework.data.domain.Page<ContactDto>update(ContactDto dto)
-
Field Details
-
service
-
mapper
private final org.modelmapper.ModelMapper mapper
-
-
Constructor Details
-
ContactController
-
-
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
-
restoreById
-
deleteById
-
create
@PostMapping @PreAuthorize("hasAuthority(\'CREATE_CONTACT\')") public ContactDto create(@RequestBody ContactDto dto) -
update
@PutMapping @PreAuthorize("hasAuthority(\'UPDATE_CONTACT\')") public ContactDto update(@RequestBody ContactDto dto)
-