Class DefaultTravelEmailGenerationService
java.lang.Object
de.hybris.platform.acceleratorservices.email.impl.DefaultEmailGenerationService
de.hybris.platform.travelservices.email.impl.DefaultTravelEmailGenerationService
- All Implemented Interfaces:
de.hybris.platform.acceleratorservices.email.EmailGenerationService,TravelEmailGenerationService
public class DefaultTravelEmailGenerationService
extends de.hybris.platform.acceleratorservices.email.impl.DefaultEmailGenerationService
implements TravelEmailGenerationService
Service to render travel related email messages
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<EmailMessageModel>createEmailMessages(String emailSubject, String emailBody, de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext<BusinessProcessModel> emailContext) Create email messages list.protected voidcreateEmailMessagesForAdditionalNotifications(String emailSubject, String emailBody, de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext<BusinessProcessModel> emailContext, List<EmailMessageModel> emailMessageModels, EmailAddressModel fromAddress) Create email messages for additional notification emailsprotected voidcreatePersonalizedEmailByRecipient(RendererTemplateModel subjectRenderTemplate, RendererTemplateModel bodyRenderTemplate, de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext<BusinessProcessModel> emailContext, List<EmailMessageModel> emailMessageModels, Set<String> additionalNotificationEmails) Creates personalized email for the traveller that placed the booking and for all the email addresses providedprotected booleandifferentiateEmailForAdditionSecurity(OrderModel orderModel, Set<String> additionalNotificationEmails) Returns true if the emails need to be personalized based on the recipient because the additional security is enabledgenerateEmails(BusinessProcessModel businessProcessModel, EmailPageModel emailPageModel) Generate list of email messages.protected booleanisOrderPlacedWithGuestUser(AbstractOrderModel abstractOrderModel) Returns true if the provided order (or the one related toAbstractOrderModelcart) was placed through a guest checkout.Methods inherited from class de.hybris.platform.acceleratorservices.email.impl.DefaultEmailGenerationService
createEmailMessage, generate, getEmailContextFactory, getEmailService, getRendererService, setEmailContextFactory, setEmailService, setRendererService, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.acceleratorservices.email.EmailGenerationService
generate
-
Constructor Details
-
DefaultTravelEmailGenerationService
public DefaultTravelEmailGenerationService()
-
-
Method Details
-
generateEmails
public List<EmailMessageModel> generateEmails(BusinessProcessModel businessProcessModel, EmailPageModel emailPageModel) Description copied from interface:TravelEmailGenerationServiceGenerate list of email messages.- Specified by:
generateEmailsin interfaceTravelEmailGenerationService- Parameters:
businessProcessModel- the business process modelemailPageModel- the email page model- Returns:
- the list
-
createPersonalizedEmailByRecipient
protected void createPersonalizedEmailByRecipient(RendererTemplateModel subjectRenderTemplate, RendererTemplateModel bodyRenderTemplate, de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext<BusinessProcessModel> emailContext, List<EmailMessageModel> emailMessageModels, Set<String> additionalNotificationEmails) Creates personalized email for the traveller that placed the booking and for all the email addresses provided- Parameters:
subjectRenderTemplate-bodyRenderTemplate-emailContext-emailMessageModels-additionalNotificationEmails-
-
differentiateEmailForAdditionSecurity
protected boolean differentiateEmailForAdditionSecurity(OrderModel orderModel, Set<String> additionalNotificationEmails) Returns true if the emails need to be personalized based on the recipient because the additional security is enabled- Parameters:
orderModel-additionalNotificationEmails-- Returns:
-
isOrderPlacedWithGuestUser
Returns true if the provided order (or the one related toAbstractOrderModelcart) was placed through a guest checkout. The control on instanceof is done to prevent misbehaviour during the amendment journey. This because, during the amendment, a new user is created for a non registered traveller that is performing an amendment.- Parameters:
abstractOrderModel- the abstract order model- Returns:
- boolean
-
createEmailMessages
protected List<EmailMessageModel> createEmailMessages(String emailSubject, String emailBody, de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext<BusinessProcessModel> emailContext) Create email messages list.- Parameters:
emailSubject- the email subjectemailBody- the email bodyemailContext- the email context- Returns:
- the list
-
createEmailMessagesForAdditionalNotifications
protected void createEmailMessagesForAdditionalNotifications(String emailSubject, String emailBody, de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext<BusinessProcessModel> emailContext, List<EmailMessageModel> emailMessageModels, EmailAddressModel fromAddress) Create email messages for additional notification emails- Parameters:
emailSubject- the email subjectemailBody- the email bodyemailContext- the email contextemailMessageModels- the email message modelsfromAddress- the from address
-