Interface CommonCatalogService<P extends Catalog>

    • Method Detail

      • readCatalogInheritanceGraph

        InheritanceLines readCatalogInheritanceGraph​(@NonNull
                                                     List<org.springframework.data.util.Pair<String,​String>> catalogRefs)
        Given a list of catalog ids, find all parent catalog ids up the inheritance graph. This should demonstrate the full tree of catalogs up to the originating root nodes.
        Parameters:
        catalogRefs - A list of catalog ids and immediate assigned mutabilities (see MutabilityType).
        Returns:
        All parent catalog ids up the inheritance graph
      • readTopDownCatalogInheritanceGraph

        InheritanceLines readTopDownCatalogInheritanceGraph​(@NonNull
                                                            List<String> catalogRefs)
        Given a list of catalog ids, find all child catalog ids down the inheritance graph. This should demonstrate the full tree of catalogs down to leaf nodes.
        Parameters:
        catalogRefs - A list of catalog ids.
        Returns:
        All parent catalog ids up the inheritance graph
      • readCatalogChildren

        List<String> readCatalogChildren​(@NonNull
                                         String startingCatalogId)
        Find one level deep of child catalogs whose Catalog.getParents() includes this catalog.
        Parameters:
        startingCatalogId - The parent catalog whose immediate children will be returned
        Returns:
        The immediate children
      • readApplicationOwnedInheritedCatalog

        @Nullable
        P readApplicationOwnedInheritedCatalog​(@NonNull
                                               String startingCatalogId,
                                               @NonNull
                                               String applicationId)
        Find any application owned catalog that inherits from the starting catalog based on the requested application.
        Parameters:
        startingCatalogId - The ancestor catalog from which to check inheritance
        applicationId - The id of the application that should own the inherited catalog
        Returns:
        The id of the application owned catalog
      • readLevel

        Long readLevel​(@NonNull
                       String catalogContextId)
        Find the calculated sorting level for the given catalog
        Parameters:
        catalogContextId - The contextId for the catalog
        Returns:
        The sorting level
      • readByVendorRefs

        List<P> readByVendorRefs​(@NonNull
                                 Set<String> vendorRefs,
                                 @Nullable
                                 ContextInfo contextInfo)
        Finds all catalogs associated to the given vendorRefs via Catalog.getVendorRef().
        Parameters:
        vendorRefs - the set of vendor refs to find associated catalogs for. Must be non-empty.
        contextInfo - context information surrounding sandboxing and multitenant state
        Returns:
        all catalogs found for the given vendor refs