Class DefaultSiteMessageService
java.lang.Object
de.hybris.platform.notificationservices.service.impl.DefaultSiteMessageService
- All Implemented Interfaces:
SiteMessageService
Default implementation of
SiteMessageService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMessage(String subject, String body, SiteMessageType type, ItemModel externalItem, NotificationType notificationType) Creates a site message by given subject, link, body, message type, notification type and localecreateMessage(String title, String content, SiteMessageType type, ItemModel externalItem, NotificationType notificationType, Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.since 1905, replace with the next createMessage.protected StringformatContent(SiteMessageType type, String content) protected I18NServiceprotected ModelServicegetPaginatedMessagesForCustomer(CustomerModel customer, SearchPageData searchPageData) Gets all paginated site messagesgetPaginatedMessagesForType(CustomerModel customer, SiteMessageType type, SearchPageData searchPageData) Gets paginated site messages for the given typeprotected Map<SiteMessageType,SiteMessageContentFormatter> protected SiteMessageDaogetSiteMessagesForCustomer(CustomerModel customer) Gets all site message of the customerprotected KeyGeneratorvoidsetI18nService(I18NService i18nService) voidsetModelService(ModelService modelService) voidsetSiteMessageContentFormatters(Map<SiteMessageType, SiteMessageContentFormatter> siteMessageContentFormatters) voidsetSiteMessageDao(SiteMessageDao siteMessageDao) voidsetSiteMessageUidGenerator(KeyGenerator siteMessageUidGenerator)
-
Constructor Details
-
DefaultSiteMessageService
public DefaultSiteMessageService()
-
-
Method Details
-
getPaginatedMessagesForType
public SearchPageData<SiteMessageForCustomerModel> getPaginatedMessagesForType(CustomerModel customer, SiteMessageType type, SearchPageData searchPageData) Description copied from interface:SiteMessageServiceGets paginated site messages for the given type- Specified by:
getPaginatedMessagesForTypein interfaceSiteMessageService- Parameters:
customer- the specific customertype- the given message typesearchPageData- pagination parameters- Returns:
- paginated result
-
getPaginatedMessagesForCustomer
public SearchPageData<SiteMessageForCustomerModel> getPaginatedMessagesForCustomer(CustomerModel customer, SearchPageData searchPageData) Description copied from interface:SiteMessageServiceGets all paginated site messages- Specified by:
getPaginatedMessagesForCustomerin interfaceSiteMessageService- Parameters:
customer- the specific customersearchPageData- pagination parameters- Returns:
- paginated result
-
createMessage
@Deprecated(since="1905", forRemoval=true) public SiteMessageModel createMessage(String title, String content, SiteMessageType type, ItemModel externalItem, NotificationType notificationType, Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.since 1905, replace with the next createMessage.Description copied from interface:SiteMessageServiceCreates a site message by given title, link, content, message type, notification type and locale- Specified by:
createMessagein interfaceSiteMessageService- Parameters:
title- the message titlecontent- the message contenttype- the message typeexternalItem- the related item modelnotificationType- the notification typelocale- the locale, if null, default current locale- Returns:
- the created message model
-
createMessage
public SiteMessageModel createMessage(String subject, String body, SiteMessageType type, ItemModel externalItem, NotificationType notificationType) Description copied from interface:SiteMessageServiceCreates a site message by given subject, link, body, message type, notification type and locale- Specified by:
createMessagein interfaceSiteMessageService- Parameters:
subject- the message subjectbody- the message bodytype- the message typeexternalItem- the related item modelnotificationType- the notification type- Returns:
- the created message model
-
getSiteMessagesForCustomer
Description copied from interface:SiteMessageServiceGets all site message of the customer- Specified by:
getSiteMessagesForCustomerin interfaceSiteMessageService- Parameters:
customer- the specific customer- Returns:
- list of site message for customer
-
formatContent
-
getSiteMessageDao
-
setSiteMessageDao
-
getModelService
-
setModelService
-
getI18nService
-
setI18nService
-
getSiteMessageUidGenerator
-
setSiteMessageUidGenerator
-
getSiteMessageContentFormatters
-
setSiteMessageContentFormatters
public void setSiteMessageContentFormatters(Map<SiteMessageType, SiteMessageContentFormatter> siteMessageContentFormatters)
-