Interface UniqueItemIdentifierService
- All Known Implementing Classes:
DefaultUniqueItemIdentifierService
public interface UniqueItemIdentifierService
Interface definition for getting unique identifiers of Item Models.
-
Method Summary
Modifier and TypeMethodDescriptiongetItemData(ItemModel itemModel) Method to get the unique identifier and other information (not the PK) about an Item Model.getItemModel(ItemData itemData) <T> Optional<T>getItemModel(String key, Class<T> classType) Method to get the model item by the given keyUniqueItemIdentifierService.
-
Method Details
-
getItemData
Method to get the unique identifier and other information (not the PK) about an Item Model. For CMS Items, that means getting theCMSItemModel.getUid()and name, but for other Items, this could be different.- Parameters:
itemModel- the item model used to get the unique identifier.- Returns:
- an item data object that contains the item's unique identifier and any other information
-
getItemModel
- Parameters:
itemData- the container of item unique identifier and its type- Returns:
- the item model
-
getItemModel
Method to get the model item by the given keyUniqueItemIdentifierService.- Parameters:
key- the key of the item modelclassType- the class of the item model- Returns:
- a model for provided key
- Throws:
UnknownIdentifierException- if the model doesn't exist
-