Class DefaultCoverageCalculationService
java.lang.Object
de.hybris.platform.validation.coverage.impl.DefaultCoverageCalculationService
- All Implemented Interfaces:
CoverageCalculationService
Default implementation of coverage calculation service. This implementation of the
CoverageCalculationService uses
CoverageCalculationStrategyRegistry to lookup matching
strategy and redirect the calculation to it.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalculates the coverage of the givenitem.Calculates the coverage of the givenitem.voidsetStrategyRegistry(CoverageCalculationStrategyRegistry strategyRegistry)
-
Constructor Details
-
DefaultCoverageCalculationService
public DefaultCoverageCalculationService()
-
-
Method Details
-
calculate
Description copied from interface:CoverageCalculationServiceCalculates 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.)- Specified by:
calculatein interfaceCoverageCalculationService- 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
Description copied from interface:CoverageCalculationServiceCalculates 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.)- Specified by:
calculatein interfaceCoverageCalculationService- 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
-
setStrategyRegistry
-