Interface CMSAdminItemService

  • All Known Implementing Classes:
    DefaultCMSAdminItemService

    public interface CMSAdminItemService
    The Interface CMSAdminItemService provides methods for CMSItemModel.
    Spring Bean ID:
    cmsAdminItemService
    • Method Detail

      • findByItemData

        java.util.Optional<CMSItemModel> findByItemData​(CMSItemData itemData)
        Finds the CMSItemModel uniquely identified by its uid and the catalogVersion defined by the CMSItemData
        Parameters:
        itemData - the CMSItemData containing the uid and catalogVersion
        Returns:
        an Optional containing the concrete class instance of CMSItemModel, otherwise Optional#empty()
      • createItem

        <T extends CMSItemModel> T createItem​(java.lang.Class<T> modelClass)
        Will create a new instance of the given modelClass and set up what is necessary for the save
        Parameters:
        modelClass - a class (extending ItemModel) to instantiate
        Returns:
        a new item model
      • findByTypeCodeAndName

        SearchResult<CMSItemModel> findByTypeCodeAndName​(CatalogVersionModel catalogVersion,
                                                         java.lang.String typeCode,
                                                         java.lang.String name)
        Count the number of CMS Items on a given catalog, typeCode and name.
        Parameters:
        catalogVersion - the catalogVersion to count the cms items from
        typeCode - the type code we want to count from.
        name - the name of the cms item, never null.
        Returns:
        the number of cms items with the same name for a given catalog version adn type code.