public class DefaultCoverageCalculationService extends java.lang.Object implements CoverageCalculationService
CoverageCalculationService uses
CoverageCalculationStrategyRegistry to lookup matching
strategy and redirect the calculation to it.| Constructor and Description |
|---|
DefaultCoverageCalculationService() |
| Modifier and Type | Method and Description |
|---|---|
CoverageInfo |
calculate(ItemModel item,
java.lang.String domainId)
Calculates the coverage of the given
item |
CoverageInfo |
calculate(ItemModel item,
java.lang.String templateCode,
java.lang.String domainId)
Calculates the coverage of the given
item |
void |
setStrategyRegistry(CoverageCalculationStrategyRegistry strategyRegistry) |
public CoverageInfo calculate(ItemModel item, java.lang.String domainId)
CoverageCalculationServiceitem.
The domainId can by used to distinguish between multiple
coverage calculation strategies per domain (e.g. text translation coverage,
print related coverage etc.)calculate in interface CoverageCalculationServiceitem - the item to calculate the coverage fordomainId - the domain Id if applicableCoverageInfo object with cumulated coverage information or null if no strategy
was registered for given item and domain IDpublic CoverageInfo calculate(ItemModel item, java.lang.String templateCode, java.lang.String domainId)
CoverageCalculationServiceitem.
The domainId can by used to distinguish between multiple
coverage calculation strategies per domain (e.g. text translation coverage,
print related coverage etc.)calculate in interface CoverageCalculationServiceitem - the item to calculate the coverage fortemplateCode - the item template to be used for finding the proper calculation strategydomainId - the domain Id if applicableCoverageInfo object with cumulated coverage information or null if no strategy
was registered for given item and domain IDpublic void setStrategyRegistry(CoverageCalculationStrategyRegistry strategyRegistry)
Copyright © 2018 SAP SE. All Rights Reserved.