Class MailArgs
java.lang.Object
ch.tocco.nice2.optional.address.impl.action.mail.MailArgs
-
Constructor Summary
ConstructorDescriptionMailArgs
(MailActionService.MailInfo mailInfo, EntityExplorerActionSelection selection, boolean fixateReceiverListFeature) MailArgs
(MailActionService.MailInfo mailInfo, EntityExplorerActionSelection selection, EntityExplorerActionSelection receiverSelection, boolean fixateReceiverListFeature) -
Method Summary
Modifier and TypeMethodDescriptionboolean
load
(CommandExecutor executor, EntityExplorerActionSelectionService selectionService, MailReceiverService mailReceiverService, Context persistCtx, boolean isFirstBatch) Load required data.loadNew
(Context persistCtx, EntityExplorerActionSelectionService selectionService, MailReceiverService mailReceiverService, boolean isFirstBatch) Load all required data “the old way”, don't fixate the selection etc.loadPrepared
(CommandExecutor executor, EntityExplorerActionSelectionService selectionService) Used inside the send-mail task: After this object is deserialized it is in the state after a call toprepare(CommandExecutor, EntityExplorerActionSelectionService, MailReceiverService)
.prepare
(CommandExecutor executor, EntityExplorerActionSelectionService selectionService, MailReceiverService mailReceiverService) Prepare the arguments by creating the list of receivers.
-
Constructor Details
-
MailArgs
public MailArgs(MailActionService.MailInfo mailInfo, EntityExplorerActionSelection selection, boolean fixateReceiverListFeature) -
MailArgs
public MailArgs(MailActionService.MailInfo mailInfo, EntityExplorerActionSelection selection, EntityExplorerActionSelection receiverSelection, boolean fixateReceiverListFeature)
-
-
Method Details
-
prepare
public MailArgs prepare(CommandExecutor executor, EntityExplorerActionSelectionService selectionService, MailReceiverService mailReceiverService) throws NoEntityToLoadException Prepare the arguments by creating the list of receivers. The list is then stored in this class. The lists are serialized into theJobDataMap
object when a send-mail task is submitted.- Throws:
NoEntityToLoadException
-
getMailInfo
-
getSelection
-
getSender
-
getSelectionEntityList
-
getMailReceivers
-
isFixateReceiverListFeature
public boolean isFixateReceiverListFeature() -
loadPrepared
public MailArgs loadPrepared(CommandExecutor executor, EntityExplorerActionSelectionService selectionService) Used inside the send-mail task: After this object is deserialized it is in the state after a call toprepare(CommandExecutor, EntityExplorerActionSelectionService, MailReceiverService)
. Then this method re-fetches the receiver list based on the stored primary keys. -
loadNew
public MailArgs loadNew(Context persistCtx, EntityExplorerActionSelectionService selectionService, MailReceiverService mailReceiverService, boolean isFirstBatch) throws NoEntityToLoadException Load all required data “the old way”, don't fixate the selection etc. This is to provide the old behaviour.- Throws:
NoEntityToLoadException
-
load
public MailArgs load(CommandExecutor executor, EntityExplorerActionSelectionService selectionService, MailReceiverService mailReceiverService, Context persistCtx, boolean isFirstBatch) throws NoEntityToLoadException Load required data. It checks whether the fixate-feature is enabeld and uses the corresponding way of loading the data by delegating to eitherloadPrepared(CommandExecutor, EntityExplorerActionSelectionService)
orloadNew(Context, EntityExplorerActionSelectionService, MailReceiverService, boolean)
.- Throws:
NoEntityToLoadException
-