Package de.hybris.platform.product
Interface UnitService
- All Known Implementing Classes:
DefaultUnitService
public interface UnitService
Service to read and update
UnitModels.- Spring Bean ID:
- unitService
-
Method Summary
Modifier and TypeMethodDescriptionReturns all Units.Returns all unit types (e.g.getUnitForCode(String code) getUnitsForUnitType(String unitType) Returns all units for specific unit type
-
Method Details
-
getUnitForCode
- Parameters:
code- theUnitModel.CODE- Returns:
- for the given
codetheUnitModel - Throws:
IllegalArgumentException- ifcodeisnull.UnknownIdentifierException- if no unit was foundAmbiguousIdentifierException- if more than one unit was found by this code
-
getAllUnits
Returns all Units.- Returns:
- a set containing all units.
-
getAllUnitTypes
Returns all unit types (e.g. 'weight', 'size' ).- Returns:
- a set of type strings
-
getUnitsForUnitType
Returns all units for specific unit type- Parameters:
unitType- search only units for this unit type- Returns:
- found units that match unit type
-