Class DefaultSiteMessageService
- java.lang.Object
-
- de.hybris.platform.notificationservices.service.impl.DefaultSiteMessageService
-
- All Implemented Interfaces:
SiteMessageService
public class DefaultSiteMessageService extends java.lang.Object implements SiteMessageService
Default implementation ofSiteMessageService
-
-
Constructor Summary
Constructors Constructor Description DefaultSiteMessageService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SiteMessageModelcreateMessage(java.lang.String subject, java.lang.String body, SiteMessageType type, ItemModel externalItem, NotificationType notificationType)Creates a site message by given subject, link, body, message type, notification type and localeSiteMessageModelcreateMessage(java.lang.String title, java.lang.String content, SiteMessageType type, ItemModel externalItem, NotificationType notificationType, java.util.Locale locale)Deprecated.since 1905, replace with the next createMessage.protected java.lang.StringformatContent(SiteMessageType type, java.lang.String content)protected I18NServicegetI18nService()protected ModelServicegetModelService()SearchPageData<SiteMessageForCustomerModel>getPaginatedMessagesForCustomer(CustomerModel customer, SearchPageData searchPageData)Gets all paginated site messagesSearchPageData<SiteMessageForCustomerModel>getPaginatedMessagesForType(CustomerModel customer, SiteMessageType type, SearchPageData searchPageData)Gets paginated site messages for the given typeprotected java.util.Map<SiteMessageType,SiteMessageContentFormatter>getSiteMessageContentFormatters()protected SiteMessageDaogetSiteMessageDao()java.util.List<SiteMessageForCustomerModel>getSiteMessagesForCustomer(CustomerModel customer)Gets all site message of the customerprotected KeyGeneratorgetSiteMessageUidGenerator()voidsetI18nService(I18NService i18nService)voidsetModelService(ModelService modelService)voidsetSiteMessageContentFormatters(java.util.Map<SiteMessageType,SiteMessageContentFormatter> siteMessageContentFormatters)voidsetSiteMessageDao(SiteMessageDao siteMessageDao)voidsetSiteMessageUidGenerator(KeyGenerator siteMessageUidGenerator)
-
-
-
Method Detail
-
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 public SiteMessageModel createMessage(java.lang.String title, java.lang.String content, SiteMessageType type, ItemModel externalItem, NotificationType notificationType, java.util.Locale locale)
Deprecated.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(java.lang.String subject, java.lang.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
public java.util.List<SiteMessageForCustomerModel> getSiteMessagesForCustomer(CustomerModel customer)
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
protected java.lang.String formatContent(SiteMessageType type, java.lang.String content)
-
getSiteMessageDao
protected SiteMessageDao getSiteMessageDao()
-
setSiteMessageDao
public void setSiteMessageDao(SiteMessageDao siteMessageDao)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getI18nService
protected I18NService getI18nService()
-
setI18nService
public void setI18nService(I18NService i18nService)
-
getSiteMessageUidGenerator
protected KeyGenerator getSiteMessageUidGenerator()
-
setSiteMessageUidGenerator
public void setSiteMessageUidGenerator(KeyGenerator siteMessageUidGenerator)
-
getSiteMessageContentFormatters
protected java.util.Map<SiteMessageType,SiteMessageContentFormatter> getSiteMessageContentFormatters()
-
setSiteMessageContentFormatters
public void setSiteMessageContentFormatters(java.util.Map<SiteMessageType,SiteMessageContentFormatter> siteMessageContentFormatters)
-
-