Class HvlNotificationMailTemplateController
java.lang.Object
tr.com.havelsan.javarch.notification.mail.starter.controller.HvlNotificationMailTemplateController
- All Implemented Interfaces:
HvlNotificationTemplateRestService
@RestController
@RequestMapping("${hvl.notification.mail.service.controller-path:/notification/template}")
public class HvlNotificationMailTemplateController
extends Object
implements HvlNotificationTemplateRestService
The class in which service endpoints are defined for notification template operations.
-
Constructor Summary
ConstructorDescriptionHvlNotificationMailTemplateController
(HvlNotificationTemplateService notificationTemplateService) Instantiates a new HvlNotificationMailRestController. -
Method Summary
Modifier and TypeMethodDescriptiontr.com.havelsan.javarch.service.data.HvlResponse
<Void> activateByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Method used to activate mail template according to uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> deactivateByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Method used to deactivate mail template according to uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> Deletes notification template by uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlNotificationTemplateModel> Gets notification template model by uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<Boolean> Notification template enabled by codetr.com.havelsan.javarch.service.data.HvlResponse
<HvlNotificationTemplateContentModel> preview
(@NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Provides preview for mail with parameterstr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlNotificationTemplateDataModel>> queryDataPage
(@NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Returns a page of mail template matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> save
(@NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Saves notification template.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> update
(@NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Updates notification template.
-
Constructor Details
-
HvlNotificationMailTemplateController
public HvlNotificationMailTemplateController(HvlNotificationTemplateService notificationTemplateService) Instantiates a new HvlNotificationMailRestController.- Parameters:
notificationTemplateService
- the notification template service
-
-
Method Details
-
save
@PreAuthorize("hasAuthority(\'notification_manager\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> save(@NotNull @Valid @RequestBody @NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Saves notification template.- Specified by:
save
in interfaceHvlNotificationTemplateRestService
- Parameters:
notificationTemplateModel
- the notification template model- Returns:
- the hvl response
-
update
@PreAuthorize("hasAuthority(\'notification_manager\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> update(@NotNull @Valid @RequestBody @NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Updates notification template.- Specified by:
update
in interfaceHvlNotificationTemplateRestService
- Parameters:
notificationTemplateModel
- the notification template model- Returns:
- the hvl response
-
delete
@PreAuthorize("hasAuthority(\'notification_manager\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> delete(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Deletes notification template by uuid.- Specified by:
delete
in interfaceHvlNotificationTemplateRestService
- Parameters:
uuid
- the uuid- Returns:
- the hvl response
-
activateByUuid
@PreAuthorize("hasAuthority(\'notification_manager\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> activateByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Method used to activate mail template according to uuid.- Specified by:
activateByUuid
in interfaceHvlNotificationTemplateRestService
- Parameters:
uuid
- the uuid- Returns:
- the hvl response
-
deactivateByUuid
@PreAuthorize("hasAuthority(\'notification_manager\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> deactivateByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Method used to deactivate mail template according to uuid.- Specified by:
deactivateByUuid
in interfaceHvlNotificationTemplateRestService
- Parameters:
uuid
- the uuid- Returns:
- the hvl response
-
isEnabled
public tr.com.havelsan.javarch.service.data.HvlResponse<Boolean> isEnabled(@NotBlank @Size(max=100) @PathVariable("code") @NotBlank @Size(max=100) String code) Notification template enabled by code- Specified by:
isEnabled
in interfaceHvlNotificationTemplateRestService
- Parameters:
code
- the code- Returns:
- the hvl response
-
getByUuid
@PreAuthorize("hasAuthority(\'notification_manager\')") public tr.com.havelsan.javarch.service.data.HvlResponse<HvlNotificationTemplateModel> getByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Gets notification template model by uuid.- Specified by:
getByUuid
in interfaceHvlNotificationTemplateRestService
- Parameters:
uuid
- the uuid- Returns:
- the hvl response
-
queryDataPage
@PreAuthorize("hasAuthority(\'notification_manager\')") public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlNotificationTemplateDataModel>> queryDataPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Returns a page of mail template matching the query criteria.- Specified by:
queryDataPage
in interfaceHvlNotificationTemplateRestService
- Parameters:
notificationTemplateQueryModel
- the mail template query model- Returns:
- the hvl response
-
preview
public tr.com.havelsan.javarch.service.data.HvlResponse<HvlNotificationTemplateContentModel> preview(@NotNull @Valid @RequestBody @NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Provides preview for mail with parameters- Specified by:
preview
in interfaceHvlNotificationTemplateRestService
- Parameters:
notificationTemplateQueryModel
- the notification mail preview query model- Returns:
- the hvl response
-