Interface CMSVersionDao

    • Method Detail

      • findByUid

        java.util.Optional<CMSVersionModel> findByUid​(java.lang.String uid)
        Finds the CMSVersionModel uniquely identified by its uid
        Parameters:
        uid - the CMSVersionModel uid
        Returns:
        the CMSVersionModel that matches the criteria or empty if not found
        Throws:
        java.lang.IllegalArgumentException - if uid is empty
      • findByItemUidAndLabel

        java.util.Optional<CMSVersionModel> findByItemUidAndLabel​(java.lang.String itemUid,
                                                                  java.lang.String label,
                                                                  CatalogVersionModel itemCatalogVersion)
        Finds the CMSVersionModel for an item identified by its itemUid containing the given label
        Parameters:
        itemUid - the uid of the item model
        label - the label of the cms version model
        itemCatalogVersion - the CatalogVersionModel to which the item belongs to
        Returns:
        the CMSVersionModel that matches the criteria or empty if not found
        Throws:
        java.lang.IllegalArgumentException - if either itemUid, label, or itemCatalogVersion is empty or null
      • findPageVersionedByTransactionId

        java.util.Optional<AbstractPageModel> findPageVersionedByTransactionId​(java.lang.String transactionId)
        Finds the page associated to a transaction ID.

        When a page is versioned, the page and all its associated items are versioned. Each of them has a different version, but they all share the same transactionId; only one page can be associated to a transaction ID.

        Parameters:
        transactionId - The ID of the transaction for which to find its associated page.
        Returns:
        an Optional containing the page associated to the given transactionId; can be Optional#empty() when the transactionId identifies a transaction where a page was not versioned.