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 CorrespondenceActionService
CorrespondenceActionService.CorrespondenceActionResult, CorrespondenceActionService.PreviewMode -
Constructor Summary
ConstructorsConstructorDescriptionCorrespondenceActionServiceImpl(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 ofConcernedRecipients based on theselectedEntitys and the providedRecipientParameters.getTargets(EntityExplorerActionSelection selection, RecipientParameters parameters) Returns a list ofCommunicationTargets based on theselectedEntitys and the providedRecipientParameters.booleanvoidsetShowInvalidSelectionTab(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:
getCorrespondenceSignaturein interfaceCorrespondenceActionService- Throws:
PersistExceptionUnresolvableUriExceptionUriStoreException
-
getRecipients
public List<ConcernedRecipient.ClientRepresentation> getRecipients(EntityExplorerActionSelection selection, RecipientParameters parameters) Description copied from interface:CorrespondenceActionServiceReturns a list ofConcernedRecipients based on theselectedEntitys and the providedRecipientParameters. This method calls theRecipientActionService.getRecipients(EntityExplorerActionSelection, RecipientParameters), but adds some special behavior for handling recipientsSerial_correspondencescorrectly.- Specified by:
getRecipientsin interfaceCorrespondenceActionService- Parameters:
selection- the entities for which the recipients are evaluated.parameters- theRecipientParametersproviding the conditions for evaluating the recipients.- Returns:
- the
ConcernedRecipients contains allConcernedRecipients and theirEffectiveRecipients. - See Also:
-
getTargets
public List<CommunicationTarget.ClientRepresentation> getTargets(EntityExplorerActionSelection selection, RecipientParameters parameters) Description copied from interface:CorrespondenceActionServiceReturns a list ofCommunicationTargets based on theselectedEntitys and the providedRecipientParameters.- Specified by:
getTargetsin interfaceCorrespondenceActionService- Parameters:
selection- the entities for which the recipients are evaluated.parameters- theRecipientParametersproviding the conditions for evaluating the recipients.- Returns:
- the
CommunicationTargets
-
createPdf
public CorrespondenceActionService.CorrespondenceActionResult createPdf(RebindValue[] values, EntityExplorerActionSelection selection, RecipientParameters recipientParameters, CommunicationTarget.ClientRepresentation[] targetArray, @Nullable @Nullable String key, @Nullable @Nullable String template) - Specified by:
createPdfin 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:
createPdfBackgroundin 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:
doSavein 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:
doSaveBackgroundin 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:
doPreviewin interfaceCorrespondenceActionService
-
getDefaultOutputLanguage
public String getDefaultOutputLanguage(EntityExplorerActionSelection selection, String path) throws PersistException, RpcExecutionException - Specified by:
getDefaultOutputLanguagein interfaceCorrespondenceActionService- Throws:
PersistExceptionRpcExecutionException
-
getSelectionEntityListConfirmed
public List<String> getSelectionEntityListConfirmed(EntityExplorerActionSelection selection) throws RpcExecutionException - Specified by:
getSelectionEntityListConfirmedin interfaceCorrespondenceActionService- Throws:
RpcExecutionException
-
isShowInvalidSelectionTab
public boolean isShowInvalidSelectionTab()- Specified by:
isShowInvalidSelectionTabin interfaceCorrespondenceActionService
-
getNumberOfCorrespondences
- Specified by:
getNumberOfCorrespondencesin interfaceCorrespondenceActionService
-
setShowInvalidSelectionTab
@Value("${features.showInvalidSelectionInTab}") public void setShowInvalidSelectionTab(boolean showInvalidSelectionTab)
-