Package de.hybris.platform.product
Interface UnitService
-
- All Known Subinterfaces:
SAPUnitService
- All Known Implementing Classes:
DefaultUnitService
,SAPDefaultUnitService
public interface UnitService
Service to read and updateUnitModel
s.- Spring Bean ID:
- unitService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<UnitModel>
getAllUnits()
Returns all Units.java.util.Set<java.lang.String>
getAllUnitTypes()
Returns all unit types (e.g.UnitModel
getUnitForCode(java.lang.String code)
java.util.Set<UnitModel>
getUnitsForUnitType(java.lang.String unitType)
Returns all units for specific unit type
-
-
-
Method Detail
-
getUnitForCode
UnitModel getUnitForCode(java.lang.String code)
- Parameters:
code
- theUnitModel.CODE
- Returns:
- for the given
code
theUnitModel
- Throws:
java.lang.IllegalArgumentException
- ifcode
isnull
.UnknownIdentifierException
- if no unit was foundAmbiguousIdentifierException
- if more than one unit was found by this code
-
getAllUnits
java.util.Set<UnitModel> getAllUnits()
Returns all Units.- Returns:
- a set containing all units.
-
getAllUnitTypes
java.util.Set<java.lang.String> getAllUnitTypes()
Returns all unit types (e.g. 'weight', 'size' ).- Returns:
- a set of type strings
-
getUnitsForUnitType
java.util.Set<UnitModel> getUnitsForUnitType(java.lang.String unitType)
Returns all units for specific unit type- Parameters:
unitType
- search only units for this unit type- Returns:
- found units that match unit type
-
-