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 SiteMessageModel
createMessage(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 localeSiteMessageModel
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.protected java.lang.String
formatContent(SiteMessageType type, java.lang.String content)
protected I18NService
getI18nService()
protected ModelService
getModelService()
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 SiteMessageDao
getSiteMessageDao()
java.util.List<SiteMessageForCustomerModel>
getSiteMessagesForCustomer(CustomerModel customer)
Gets all site message of the customerprotected KeyGenerator
getSiteMessageUidGenerator()
void
setI18nService(I18NService i18nService)
void
setModelService(ModelService modelService)
void
setSiteMessageContentFormatters(java.util.Map<SiteMessageType,SiteMessageContentFormatter> siteMessageContentFormatters)
void
setSiteMessageDao(SiteMessageDao siteMessageDao)
void
setSiteMessageUidGenerator(KeyGenerator siteMessageUidGenerator)
-
-
-
Method Detail
-
getPaginatedMessagesForType
public SearchPageData<SiteMessageForCustomerModel> getPaginatedMessagesForType(CustomerModel customer, SiteMessageType type, SearchPageData searchPageData)
Description copied from interface:SiteMessageService
Gets paginated site messages for the given type- Specified by:
getPaginatedMessagesForType
in 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:SiteMessageService
Gets all paginated site messages- Specified by:
getPaginatedMessagesForCustomer
in 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:SiteMessageService
Creates a site message by given title, link, content, message type, notification type and locale- Specified by:
createMessage
in 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:SiteMessageService
Creates a site message by given subject, link, body, message type, notification type and locale- Specified by:
createMessage
in 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:SiteMessageService
Gets all site message of the customer- Specified by:
getSiteMessagesForCustomer
in 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)
-
-