Class HvlNotificationTemplateServiceImpl
java.lang.Object
tr.com.havelsan.javarch.notification.mail.starter.service.HvlNotificationTemplateServiceImpl
- All Implemented Interfaces:
HvlNotificationTemplateService
@Service
public class HvlNotificationTemplateServiceImpl
extends Object
implements HvlNotificationTemplateService
The class which implements {HvlNotificationTemplateService}
-
Constructor Summary
ConstructorDescriptionHvlNotificationTemplateServiceImpl
(HvlNotificationTemplateManager templateManager, HvlNotificationTemplateOperationalManager templateOperationalManager) Instantiates a new HvlNotificationTemplateService -
Method Summary
Modifier and TypeMethodDescriptionvoid
activateByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Method used to activate mail template according to uuid.void
deactivateByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Method used to deactivate mail template according to uuid.void
Delete notification template by uuid.findOrElseThrow
(@NotNull @Valid HvlNotificationTemplateQueryModel templateQueryModel) FindHvlNotificationTemplateModel
by code or else throw .Gets notification template by uuid.boolean
Is template enabled boolean.prepareMailTemplateContent
(@NotBlank String content, @NotBlank String language) Returns notification template content with attributes.preview
(@NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Preview notification template.query
(@NotNull @Valid HvlNotificationTemplateQueryModel templateQueryModel) Query hvl notification template model.tr.com.havelsan.javarch.data.commons.pageable.HvlPage
<HvlNotificationTemplateDataModel> queryDataPage
(@NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Returns a page of mail template matching the query criteria.void
save
(@NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Save notification template.void
update
(@NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Update notification template.
-
Constructor Details
-
HvlNotificationTemplateServiceImpl
public HvlNotificationTemplateServiceImpl(HvlNotificationTemplateManager templateManager, HvlNotificationTemplateOperationalManager templateOperationalManager) Instantiates a new HvlNotificationTemplateService- Parameters:
templateManager
- the template providertemplateOperationalManager
- the template operational manager
-
-
Method Details
-
save
public void save(@NotNull @Valid @NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Save notification template.- Specified by:
save
in interfaceHvlNotificationTemplateService
- Parameters:
notificationTemplateModel
- the notification template model
-
update
public void update(@NotNull @Valid @NotNull @Valid HvlNotificationTemplateModel notificationTemplateModel) Update notification template.- Specified by:
update
in interfaceHvlNotificationTemplateService
- Parameters:
notificationTemplateModel
- the notification template model
-
delete
Delete notification template by uuid.- Specified by:
delete
in interfaceHvlNotificationTemplateService
- Parameters:
uuid
- the uuid
-
activateByUuid
public void activateByUuid(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Method used to activate mail template according to uuid.- Specified by:
activateByUuid
in interfaceHvlNotificationTemplateService
- Parameters:
uuid
- the uuid
-
deactivateByUuid
public void deactivateByUuid(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Method used to deactivate mail template according to uuid.- Specified by:
deactivateByUuid
in interfaceHvlNotificationTemplateService
- Parameters:
uuid
- the uuid
-
isEnabled
Is template enabled boolean.- Specified by:
isEnabled
in interfaceHvlNotificationTemplateService
- Parameters:
code
- the code- Returns:
- the boolean
-
findOrElseThrow
public HvlNotificationTemplateModel findOrElseThrow(@NotNull @Valid @NotNull @Valid HvlNotificationTemplateQueryModel templateQueryModel) FindHvlNotificationTemplateModel
by code or else throw .- Specified by:
findOrElseThrow
in interfaceHvlNotificationTemplateService
- Parameters:
templateQueryModel
- the template query model- Returns:
- the hvl notification template model
-
query
public HvlNotificationTemplateModel query(@NotNull @Valid @NotNull @Valid HvlNotificationTemplateQueryModel templateQueryModel) Query hvl notification template model.- Specified by:
query
in interfaceHvlNotificationTemplateService
- Parameters:
templateQueryModel
- the template query model- Returns:
- the hvl notification template model
-
preview
public HvlNotificationTemplateContentModel preview(@NotNull @Valid @NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Preview notification template.- Specified by:
preview
in interfaceHvlNotificationTemplateService
- Parameters:
notificationTemplateQueryModel
- the notification mail preview query model- Returns:
- the hvl notification template model
-
getByUuid
public HvlNotificationTemplateModel getByUuid(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Gets notification template by uuid.- Specified by:
getByUuid
in interfaceHvlNotificationTemplateService
- Parameters:
uuid
- the uuid- Returns:
- the predefined proxy model
-
queryDataPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlNotificationTemplateDataModel> queryDataPage(@NotNull @Valid @NotNull @Valid HvlNotificationTemplateQueryModel notificationTemplateQueryModel) Returns a page of mail template matching the query criteria.- Specified by:
queryDataPage
in interfaceHvlNotificationTemplateService
- Parameters:
notificationTemplateQueryModel
- the notification template query model- Returns:
- the page of notification template projection model
-
prepareMailTemplateContent
public String prepareMailTemplateContent(@NotBlank @NotBlank String content, @NotBlank @NotBlank String language) Returns notification template content with attributes.- Specified by:
prepareMailTemplateContent
in interfaceHvlNotificationTemplateService
- Parameters:
content
- the contentlanguage
- the language- Returns:
- the string
-