Interface CustomizedCatalogRepository<D>
- All Known Subinterfaces:
CatalogRepository<D>,JpaCatalogRepository<D>
- All Known Implementing Classes:
JpaCustomizedCatalogRepository
public interface CustomizedCatalogRepository<D>
-
Method Summary
Modifier and TypeMethodDescriptionvoidbulkUpdateApplicationCatalogRefByCatalog(Catalog updatedCatalog) Bulk updatesApplicationCatalogRef.namefor entries whose context id matches the given updated catalog idfindByTypeAndTenantIdAndOwningApplicationIsNull(String catalogType, String tenantId) Finds all catalogs by type and tenant ID that do not belong to an application.findDirectChildren(String catalogId) Find direct, unarchived, children for the given catalog ID.readCatalogRelationships(String catalogId) Given a catalog ID, read itself and all catalogs that are descendants (direct or indirect) of it.
-
Method Details
-
readCatalogRelationships
Given a catalog ID, read itself and all catalogs that are descendants (direct or indirect) of it. Order is not guaranteed.For example, given catalog IDs A, B, and C, and a catalog graph of A <- B <- C (with A being the parent of B and B the parent of C):
- a query of 'A' will return A, B, and C
- a query of 'B' will return B and C
- a query of 'C' will return C
- Parameters:
catalogId- The ID of the catalog for which to read descendants.- Returns:
- A list of catalog IDs for which to read descendants
-
bulkUpdateApplicationCatalogRefByCatalog
Bulk updatesApplicationCatalogRef.namefor entries whose context id matches the given updated catalog id- Parameters:
updatedCatalog- the updated catalog
-
findByTypeAndTenantIdAndOwningApplicationIsNull
List<D> findByTypeAndTenantIdAndOwningApplicationIsNull(@NonNull String catalogType, @Nullable String tenantId) Finds all catalogs by type and tenant ID that do not belong to an application.- Parameters:
catalogType- the catalog type to filter ontenantId- the tenant ID to filter on- Returns:
- all catalogs by type and tenant ID that do not belong to an application
-
findDirectChildren
List<org.apache.commons.lang3.tuple.Pair<String,String>> findDirectChildren(@NonNull String catalogId) Find direct, unarchived, children for the given catalog ID. For all direct children, a list of child catalog ID/name pairs will be returned.- Parameters:
catalogId- the catalog id- Returns:
- a list of child catalog IDs if any exist, otherwise an empty list
-