Interface UniqueIdentifierConverter<T extends ItemModel>

Type Parameters:
T - type parameter which extends the ItemModel type
All Known Implementing Classes:
DefaultCatalogVersionModelUniqueIdentifierConverter, DefaultCategoryModelUniqueIdentifierConverter, DefaultCmsItemModelUniqueIdentifierConverter, DefaultCMSNavigationEntryModelUniqueIdentifierConverter, DefaultCMSPageTypeModelUniqueIdentifierConverter, DefaultMediaContainerModelUniqueIdentifierConverter, DefaultMediaModelUniqueIdentifierConverter, DefaultProductModelUniqueIdentifierConverter, DefaultUserGroupModelUniqueIdentifierConverter

public interface UniqueIdentifierConverter<T extends ItemModel>
Interface that defines apply methods for bidirectional conversion between ItemModel and ItemData.
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(ItemData itemData)
    Convert an ItemData object to the corresponding ItemModel entity.
    convert(T itemModel)
    Convert an ItemModel object to the corresponding ItemData instance.
    Returns the item type ItemModel#getItemType where the converter should be applied to.
  • Method Details

    • getItemType

      String getItemType()
      Returns the item type ItemModel#getItemType where the converter should be applied to.
      Returns:
      item type
    • convert

      ItemData convert(T itemModel)
      Convert an ItemModel object to the corresponding ItemData instance.
      Parameters:
      itemModel - - the item model entity that will be converted.
      Returns:
      an instance of the ItemData class that corresponds to the given ItemModel getItemType().
      Throws:
      IllegalArgumentException - when itemModel is null.
    • convert

      T convert(ItemData itemData)
      Convert an ItemData object to the corresponding ItemModel entity.
      Parameters:
      itemData - - the item data instance that will be used in the conversion.
      Returns:
      the ItemModel entity that corresponds to the given ItemData getItemType().