Class HvlNotificationTemplateServiceImpl
java.lang.Object
tr.com.havelsan.javarch.notification.content.provider.service.HvlNotificationTemplateServiceImpl
- All Implemented Interfaces:
HvlNotificationTemplateService
@Service
public class HvlNotificationTemplateServiceImpl
extends Object
implements HvlNotificationTemplateService
The class which implements
HvlNotificationTemplateService
-
Constructor Summary
ConstructorDescriptionHvlNotificationTemplateServiceImpl
(HvlNotificationTemplateRepository notificationTemplateRepository, HvlNotificationTemplateQueryGenerator notificationTemplateQueryGenerator, HvlNotificationTemplateMapper notificationTemplateMapper) Instantiates a new HvlNotificationTemplateService. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Delete notification template by uuid.findOrElseThrow
(@NotNull @Valid HvlNotificationTemplateQueryModel templateQueryModel) FindHvlNotificationTemplateModel
by code or else throw .Gets notification template by uuid.prepareMailTemplateContent
(@NotBlank String content, @NotBlank String language) Returns notification template content with attributes.static com.querydsl.core.types.QBean<HvlNotificationTemplateDataModel>
prepareNotificationTemplateDataProjection
(HvlNotificationTemplateQuery notificationTemplateQuery) Prepare predefined proxy data projection q bean.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(HvlNotificationTemplateRepository notificationTemplateRepository, HvlNotificationTemplateQueryGenerator notificationTemplateQueryGenerator, HvlNotificationTemplateMapper notificationTemplateMapper) Instantiates a new HvlNotificationTemplateService.- Parameters:
notificationTemplateRepository
- the notification template repositorynotificationTemplateQueryGenerator
- the notification template query generatornotificationTemplateMapper
- the notification template mapper
-
-
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
-
findOrElseThrow
@Transactional(readOnly=true) 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
@Transactional(readOnly=true) 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
@Transactional(readOnly=true) 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
@Transactional(readOnly=true) 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
@Transactional(readOnly=true) 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
@Transactional(readOnly=true) 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
-
prepareNotificationTemplateDataProjection
public static com.querydsl.core.types.QBean<HvlNotificationTemplateDataModel> prepareNotificationTemplateDataProjection(HvlNotificationTemplateQuery notificationTemplateQuery) Prepare predefined proxy data projection q bean.- Returns:
- the q bean
-