Class CorrespondenceActionServiceImpl
java.lang.Object
ch.tocco.nice2.optional.correspondence.impl.action.CorrespondenceActionServiceImpl
- All Implemented Interfaces:
CorrespondenceActionService
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.optional.correspondence.impl.action.CorrespondenceActionService
CorrespondenceActionService.CorrespondenceActionResult, CorrespondenceActionService.PreviewMode
-
Constructor Summary
ConstructorDescriptionCorrespondenceActionServiceImpl
(org.slf4j.Logger log, Context context, EntityExplorerActionSelectionService selectionService, QueryBuilderFactory queryBuilderFactory, ConverterEngineFactory converterEngineFactory, TemplateEngineFactory templateEngineFactory, UriResolver uriResolver, TextResources textResources, AddressService addressService, RecipientService recipientService, L10N l10N, OutputCenterService outputCenterService, PrincipalService principalService, BusinessUnitManager businessUnitManager, SaveCorrespondenceService saveCorrespondenceService, CommandExecutor commandExecutor, TaskSchedulingService taskSchedulingService, OutputTemplateLessCompiler outputTemplateLessCompiler, ValidationResultPrinter validationResultPrinter, PdfUtilityService pdfUtilityService) -
Method Summary
Modifier and TypeMethodDescriptioncreatePdf
(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable String key, @Nullable String template) createPdfBackground
(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable String key, @Nullable String template) doPreview
(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable String key, @Nullable String template, CorrespondenceActionService.PreviewMode previewMode) doSave
(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable String key, @Nullable String template) doSaveBackground
(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable String key, @Nullable String template) getCorrespondenceSignature
(URI signatureId, int signatureNumber, URI localeId) getDefaultOutputLanguage
(EntityExplorerActionSelection selection, String path) getRecipients
(EntityExplorerActionSelection selection, RecipientParameters parameters) Returns a list ofConcernedRecipient
s based on theselectedEntity
s and the providedRecipientParameters
.getTargets
(EntityExplorerActionSelection selection, RecipientParameters parameters) Returns a list ofCommunicationTarget
s based on theselectedEntity
s and the providedRecipientParameters
.boolean
void
setShowInvalidSelectionTab
(boolean showInvalidSelectionTab)
-
Constructor Details
-
CorrespondenceActionServiceImpl
public CorrespondenceActionServiceImpl(org.slf4j.Logger log, Context context, EntityExplorerActionSelectionService selectionService, QueryBuilderFactory queryBuilderFactory, ConverterEngineFactory converterEngineFactory, TemplateEngineFactory templateEngineFactory, UriResolver uriResolver, TextResources textResources, AddressService addressService, RecipientService recipientService, L10N l10N, OutputCenterService outputCenterService, PrincipalService principalService, BusinessUnitManager businessUnitManager, SaveCorrespondenceService saveCorrespondenceService, CommandExecutor commandExecutor, TaskSchedulingService taskSchedulingService, OutputTemplateLessCompiler outputTemplateLessCompiler, ValidationResultPrinter validationResultPrinter, PdfUtilityService pdfUtilityService)
-
-
Method Details
-
getCorrespondenceSignature
public Map<String,Object> getCorrespondenceSignature(URI signatureId, int signatureNumber, URI localeId) throws PersistException, UnresolvableUriException, UriStoreException - Specified by:
getCorrespondenceSignature
in interfaceCorrespondenceActionService
- Throws:
PersistException
UnresolvableUriException
UriStoreException
-
getRecipients
public List<ConcernedRecipient.ClientRepresentation> getRecipients(EntityExplorerActionSelection selection, RecipientParameters parameters) Description copied from interface:CorrespondenceActionService
Returns a list ofConcernedRecipient
s based on theselectedEntity
s and the providedRecipientParameters
. This method calls theRecipientActionService.getRecipients(ch.tocco.nice2.netui.api.actions.entityoperation.EntityExplorerActionSelection, ch.tocco.nice2.optional.address.api.recipient.RecipientParameters)
, but adds some special behavior for handling recipientsSerial_correspondences
correctly.- Specified by:
getRecipients
in interfaceCorrespondenceActionService
- Parameters:
selection
- the entities for which the recipients are evaluated.parameters
- theRecipientParameters
providing the conditions for evaluating the recipients.- Returns:
- the
ConcernedRecipient
s contains allConcernedRecipient
s and theirEffectiveRecipient
s. - See Also:
-
getTargets
public List<CommunicationTarget.ClientRepresentation> getTargets(EntityExplorerActionSelection selection, RecipientParameters parameters) Description copied from interface:CorrespondenceActionService
Returns a list ofCommunicationTarget
s based on theselectedEntity
s and the providedRecipientParameters
.- Specified by:
getTargets
in interfaceCorrespondenceActionService
- Parameters:
selection
- the entities for which the recipients are evaluated.parameters
- theRecipientParameters
providing the conditions for evaluating the recipients.- Returns:
- the
CommunicationTarget
s
-
createPdf
public CorrespondenceActionService.CorrespondenceActionResult createPdf(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable @Nullable String key, @Nullable @Nullable String template) - Specified by:
createPdf
in interfaceCorrespondenceActionService
-
createPdfBackground
public CorrespondenceActionService.CorrespondenceActionResult createPdfBackground(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable @Nullable String key, @Nullable @Nullable String template) - Specified by:
createPdfBackground
in interfaceCorrespondenceActionService
-
doSave
public CorrespondenceActionService.CorrespondenceActionResult doSave(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable @Nullable String key, @Nullable @Nullable String template) - Specified by:
doSave
in interfaceCorrespondenceActionService
-
doSaveBackground
public CorrespondenceActionService.CorrespondenceActionResult doSaveBackground(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable @Nullable String key, @Nullable @Nullable String template) - Specified by:
doSaveBackground
in interfaceCorrespondenceActionService
-
doPreview
public CorrespondenceActionService.CorrespondenceActionResult doPreview(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable @Nullable String key, @Nullable @Nullable String template, CorrespondenceActionService.PreviewMode previewMode) - Specified by:
doPreview
in interfaceCorrespondenceActionService
-
getDefaultOutputLanguage
public String getDefaultOutputLanguage(EntityExplorerActionSelection selection, String path) throws PersistException, RpcExecutionException - Specified by:
getDefaultOutputLanguage
in interfaceCorrespondenceActionService
- Throws:
PersistException
RpcExecutionException
-
getSelectionEntityListConfirmed
public List<String> getSelectionEntityListConfirmed(EntityExplorerActionSelection selection) throws RpcExecutionException - Specified by:
getSelectionEntityListConfirmed
in interfaceCorrespondenceActionService
- Throws:
RpcExecutionException
-
isShowInvalidSelectionTab
public boolean isShowInvalidSelectionTab()- Specified by:
isShowInvalidSelectionTab
in interfaceCorrespondenceActionService
-
getNumberOfCorrespondences
- Specified by:
getNumberOfCorrespondences
in interfaceCorrespondenceActionService
-
setShowInvalidSelectionTab
@Value("${features.showInvalidSelectionInTab}") public void setShowInvalidSelectionTab(boolean showInvalidSelectionTab)
-