Interface CMSComponentDao

    • Method Detail

      • findCMSComponentsByIdAndCatalogVersions

        java.util.List<AbstractCMSComponentModel> findCMSComponentsByIdAndCatalogVersions​(java.lang.String id,
                                                                                          java.util.Collection<CatalogVersionModel> catalogVersions)
        Find cms components by id and catalog versions.
        Parameters:
        id - the id of CMS component
        catalogVersions - the collection of catalog versions
        Returns:
        the list of found CMS component objects or empty list when not found.
      • findCMSComponentsByIdsAndCatalogVersions

        <T extends AbstractCMSComponentModelSearchPageData<T> findCMSComponentsByIdsAndCatalogVersions​(java.util.Collection<java.lang.String> ids,
                                                                                                         java.util.Collection<CatalogVersionModel> catalogVersions,
                                                                                                         SearchPageData searchPageData)
        Find cms components by list of IDs and catalog versions with pagination and sorting.
        Type Parameters:
        T - the AbstractCMSComponentModel subclass type
        Parameters:
        ids - the collection of ids of CMS components
        catalogVersions - the collection of catalog versions
        searchPageData - the searchPageData contains requested pagination and sorting information
        Returns:
        the list of found CMS component objects in SearchPageData
      • findCMSComponents

        java.util.List<AbstractCMSComponentModel> findCMSComponents​(java.lang.String id,
                                                                    java.lang.String contentSlotId,
                                                                    java.util.Collection<CatalogVersionModel> catalogVersions)
        Find cms components by id, contentSlotId and catalog versions.
        Parameters:
        id - the id of CMS component.
        contentSlotId - the if of content slot
        catalogVersions - the collection of catalog versions
        Returns:
        the list of found CMS component objects or empty list when not found.
      • findCMSComponentsByIdAndCatalogVersion

        java.util.List<AbstractCMSComponentModel> findCMSComponentsByIdAndCatalogVersion​(java.lang.String id,
                                                                                         CatalogVersionModel catalogVersion)
        Find cms components by id and catalog version.
        Parameters:
        id - the id of CMS component
        catalogVersion - the catalog version
        Returns:
        the list of found CMS component objects.
      • findCMSComponentsById

        java.util.List<AbstractCMSComponentModel> findCMSComponentsById​(java.lang.String id)
        Find cms components by id.
        Parameters:
        id - the id of CMS component
        Returns:
        the list of found CMS component objects or empty list when not found.
      • findCMSComponentContainersByIdAndCatalogVersion

        java.util.List<AbstractCMSComponentContainerModel> findCMSComponentContainersByIdAndCatalogVersion​(java.lang.String id,
                                                                                                           CatalogVersionModel catalogVersion)
        Find cms component containers by id and catalog version.
        Parameters:
        id - the id of CMS component
        catalogVersion - the catalog version
        Returns:
        the list of found CMS component container objects or empty list when not found.
      • findCMSComponentsOfContainerByIdAndCatalogVersion

        @Deprecated
        java.util.List<SimpleCMSComponentModel> findCMSComponentsOfContainerByIdAndCatalogVersion​(java.lang.String id,
                                                                                                  CatalogVersionModel catalogVersion)
        Deprecated.
        since 1811, never used
        Find cms components of container by id and catalog version.
        Parameters:
        id - the id of CMS component
        catalogVersion - the catalog version
        Returns:
        the list of found simple CMS component objects or empty list when not found.
      • findAllCMSComponentsByCatalogVersion

        java.util.List<AbstractCMSComponentModel> findAllCMSComponentsByCatalogVersion​(CatalogVersionModel catalogVersion)
        Find cms components that belong to a given catalog version.
        Parameters:
        catalogVersion - - the catalog version
        Returns:
        the list of cms components belonging to the given catalog version or an empty list.
      • findAllCMSComponentsByCatalogVersions

        <T extends AbstractCMSComponentModelSearchPageData<T> findAllCMSComponentsByCatalogVersions​(java.util.Collection<CatalogVersionModel> catalogVersions,
                                                                                                      SearchPageData searchPageData)
        Find cms components that belong to a given catalog version.
        Parameters:
        catalogVersions - - the collection of catalog versions
        searchPageData - - the searchPageData contains requested pagination and sorting information
        Returns:
        the list of cms components belonging to the given catalog version and searchPageData; or an empty list.
      • findByCatalogVersionAndMask

        SearchResult<AbstractCMSComponentModel> findByCatalogVersionAndMask​(CatalogVersionModel catalogVersionModel,
                                                                            java.lang.String mask,
                                                                            PageableData pageableData)
        For a given mask used as filter and a PageableData query, will return a page object consisting of the content list of the requested page number and the total number of entities for the given mask
        Parameters:
        catalogVersionModel - the catalog version to filter on
        mask - the string value on which components will be filtered, implementations may choose to filter on the component name
        pageableData - the PageableData object containing the page request details. PageableData may contain a String value for sort, this will be used by a sorting strategy to select the most appropriate query or resort to a default one.
        Returns:
        a page object
      • getComponentReferenceCountOutsidePage

        long getComponentReferenceCountOutsidePage​(AbstractCMSComponentModel componentModel,
                                                   AbstractPageModel pageModel)
        Finds the number of times the given component is used outside a given page (e.g., other pages or shared slots).
        Parameters:
        componentModel - - The component whose references to count.
        pageModel - - The page not to be included in the component references count.
        Returns:
        The number of times the given component is used outside the given page.