Interface CoverageCalculationService
-
- All Known Implementing Classes:
DefaultCoverageCalculationService
public interface CoverageCalculationServiceThis service provides functionality to calculate the state of an item in terms of data coverage. An item (e.g. Product) with lot of unfilled important attributes has low coverage. An item with all important attributes filled with correct data has high coverage. How this coverage information is calculated, which attributes are taking into account and if semantic of the data is considered as well is up to the implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CoverageInfocalculate(ItemModel item, java.lang.String domainId)Calculates the coverage of the givenitem.CoverageInfocalculate(ItemModel item, java.lang.String templateCode, java.lang.String domainId)Calculates the coverage of the givenitem.
-
-
-
Method Detail
-
calculate
CoverageInfo calculate(ItemModel item, java.lang.String domainId)
Calculates the coverage of the givenitem. ThedomainIdcan by used to distinguish between multiple coverage calculation strategies per domain (e.g. text translation coverage, print related coverage etc.)- Parameters:
item- the item to calculate the coverage fordomainId- the domain Id if applicable- Returns:
- the
CoverageInfoobject with cumulated coverage information ornullif no strategy was registered for given item and domain ID
-
calculate
CoverageInfo calculate(ItemModel item, java.lang.String templateCode, java.lang.String domainId)
Calculates the coverage of the givenitem. ThedomainIdcan by used to distinguish between multiple coverage calculation strategies per domain (e.g. text translation coverage, print related coverage etc.)- Parameters:
item- the item to calculate the coverage fortemplateCode- the item template to be used for finding the proper calculation strategydomainId- the domain Id if applicable- Returns:
- the
CoverageInfoobject with cumulated coverage information ornullif no strategy was registered for given item and domain ID
-
-