Class HvlNotificationPollingUserRestController
java.lang.Object
tr.com.havelsan.javarch.notification.polling.starter.controller.HvlNotificationPollingUserRestController
- All Implemented Interfaces:
HvlNotificationPollingUserRestService
@RestController
@RequestMapping("${hvl.notification.polling.user.controller-path:/polling/user}")
@HvlActuatorService(name="HvlNotificationPollingUserRestService",
groupName="HvlNotificationPolling")
public class HvlNotificationPollingUserRestController
extends Object
implements HvlNotificationPollingUserRestService
The class in which service endpoints are defined for notification polling operations for user.
-
Constructor Summary
ConstructorDescriptionHvlNotificationPollingUserRestController
(HvlNotificationPollingUserService notificationPollingUserService) Instantiates a new HvlNotificationPollingUserRestController. -
Method Summary
Modifier and TypeMethodDescriptiontr.com.havelsan.javarch.service.data.HvlResponse<Number>
getUnreadNotificationCountByUser
(@NotBlank @Size(max=50) String user) Returns unread notification count according to token owner.tr.com.havelsan.javarch.service.data.HvlResponse<HvlNotificationSubCountModel>
getUnreadNotificationSubCountByUser
(@NotBlank @Size(max=50) String user) Returns unread notification count according to token owner by type.tr.com.havelsan.javarch.service.data.HvlResponse<Void>
markAllReadByUser
(@NotBlank @Size(max=50) String user) Marks all unread notification as read.tr.com.havelsan.javarch.service.data.HvlResponse<Void>
markReadNotificationByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Marks read notification.tr.com.havelsan.javarch.service.data.HvlResponse<List<HvlNotificationPollingUserModel>>
queryList
(@NotNull @Valid HvlNotificationPollingUserQueryModel notificationPollingUserQueryModel) Returns a list of notification matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlNotificationPollingUserModel>>
queryPage
(@NotNull @Valid HvlNotificationPollingUserQueryModel notificationPollingUserQueryModel) Returns a page of notification matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse<HvlNotificationPollingUserModel>
send
(@NotNull @Valid HvlNotificationPollingUserModel pollingUserModel) Sends user specific notification.
-
Constructor Details
-
HvlNotificationPollingUserRestController
public HvlNotificationPollingUserRestController(HvlNotificationPollingUserService notificationPollingUserService) Instantiates a new HvlNotificationPollingUserRestController.- Parameters:
notificationPollingUserService
- the notification polling user service
-
-
Method Details
-
getUnreadNotificationCountByUser
public tr.com.havelsan.javarch.service.data.HvlResponse<Number> getUnreadNotificationCountByUser(@NotBlank @Size(max=50) @PathVariable("user") @NotBlank @Size(max=50) String user) Returns unread notification count according to token owner.- Specified by:
getUnreadNotificationCountByUser
in interfaceHvlNotificationPollingUserRestService
- Parameters:
user
- the assignee user- Returns:
- the hvl response
-
getUnreadNotificationSubCountByUser
public tr.com.havelsan.javarch.service.data.HvlResponse<HvlNotificationSubCountModel> getUnreadNotificationSubCountByUser(@NotBlank @Size(max=50) @PathVariable("user") @NotBlank @Size(max=50) String user) Returns unread notification count according to token owner by type.- Specified by:
getUnreadNotificationSubCountByUser
in interfaceHvlNotificationPollingUserRestService
- Parameters:
user
- the assignee user- Returns:
- the hvl response
-
markReadNotificationByUuid
public tr.com.havelsan.javarch.service.data.HvlResponse<Void> markReadNotificationByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Marks read notification.- Specified by:
markReadNotificationByUuid
in interfaceHvlNotificationPollingUserRestService
- Parameters:
uuid
- the notification id- Returns:
- the hvl response
-
markAllReadByUser
public tr.com.havelsan.javarch.service.data.HvlResponse<Void> markAllReadByUser(@NotBlank @Size(max=50) @PathVariable("user") @NotBlank @Size(max=50) String user) Description copied from interface:HvlNotificationPollingUserRestService
Marks all unread notification as read.- Specified by:
markAllReadByUser
in interfaceHvlNotificationPollingUserRestService
- Parameters:
user
- the assignee user- Returns:
- the hvl response
-
send
public tr.com.havelsan.javarch.service.data.HvlResponse<HvlNotificationPollingUserModel> send(@NotNull @Valid @RequestBody @NotNull @Valid HvlNotificationPollingUserModel pollingUserModel) Sends user specific notification.- Specified by:
send
in interfaceHvlNotificationPollingUserRestService
- Parameters:
pollingUserModel
- the polling user model- Returns:
- the hvl response
-
queryPage
@Validated(HvlNotificationPollingUserValidation.class) public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlNotificationPollingUserModel>> queryPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlNotificationPollingUserQueryModel notificationPollingUserQueryModel) Returns a page of notification matching the query criteria.- Specified by:
queryPage
in interfaceHvlNotificationPollingUserRestService
- Parameters:
notificationPollingUserQueryModel
- the polling user query model- Returns:
- the hvl response
-
queryList
@Validated(HvlNotificationPollingUserValidation.class) public tr.com.havelsan.javarch.service.data.HvlResponse<List<HvlNotificationPollingUserModel>> queryList(@NotNull @Valid @RequestBody @NotNull @Valid HvlNotificationPollingUserQueryModel notificationPollingUserQueryModel) Returns a list of notification matching the query criteria.- Specified by:
queryList
in interfaceHvlNotificationPollingUserRestService
- Parameters:
notificationPollingUserQueryModel
- the polling user query model- Returns:
- the hvl response
-