Class OrderMailActionServiceImpl
java.lang.Object
ch.tocco.nice2.optional.debitor.impl.action.OrderMailActionServiceImpl
- All Implemented Interfaces:
OrderMailActionService
-
Constructor Summary
ConstructorsConstructorDescriptionOrderMailActionServiceImpl(EmailTemplateLoadService emailTemplateLoadService, MailFactory mailFactory, EntityExplorerActionSelectionService selectionService, PrincipalService principalService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckSelection(EntityExplorerActionSelection selection) checks if a mail should be sent based on the selectionvoidsendEmail(EntityExplorerActionSelection selection, String templateName, String reason) calls sendEmail(EntityExplorerActionSelection selection, String templateName, String reason, String target) with empty string for targetvoidsendEmail(EntityExplorerActionSelection selection, String templateName, String reason, String target) send a mail with a specified template with a special attribute set
-
Constructor Details
-
OrderMailActionServiceImpl
public OrderMailActionServiceImpl(EmailTemplateLoadService emailTemplateLoadService, MailFactory mailFactory, EntityExplorerActionSelectionService selectionService, PrincipalService principalService)
-
-
Method Details
-
checkSelection
public boolean checkSelection(EntityExplorerActionSelection selection) throws RpcExecutionException, PersistException Description copied from interface:OrderMailActionServicechecks if a mail should be sent based on the selection- Specified by:
checkSelectionin interfaceOrderMailActionService- Parameters:
selection- selection to check- Throws:
RpcExecutionExceptionPersistException
-
sendEmail
public void sendEmail(EntityExplorerActionSelection selection, String templateName, String reason) throws UnsupportedEncodingException, PersistException, jakarta.mail.internet.AddressException, MailException, RpcExecutionException Description copied from interface:OrderMailActionServicecalls sendEmail(EntityExplorerActionSelection selection, String templateName, String reason, String target) with empty string for target- Specified by:
sendEmailin interfaceOrderMailActionService- Throws:
UnsupportedEncodingExceptionPersistExceptionjakarta.mail.internet.AddressExceptionMailExceptionRpcExecutionException
-
sendEmail
public void sendEmail(EntityExplorerActionSelection selection, String templateName, String reason, String target) throws UnsupportedEncodingException, PersistException, jakarta.mail.internet.AddressException, MailException, RpcExecutionException Description copied from interface:OrderMailActionServicesend a mail with a specified template with a special attribute set- Specified by:
sendEmailin interfaceOrderMailActionService- Parameters:
templateName- template to sendreason- attribute to be settarget- attribute to be set- Throws:
UnsupportedEncodingExceptionPersistExceptionjakarta.mail.internet.AddressExceptionMailExceptionRpcExecutionException
-