Interface DatabaseCatalog
- All Known Implementing Classes:
DatabaseCatalogImpl
public interface DatabaseCatalog
The catalog interface provides a list of visible namespaces and tables, fronting the schema service with an
appropriate
PermissionFilterProvider
and providing a common point for both
Enterprise and DnD workers to get catalog information.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A class that holds parallel arrays of catalog information about visible tables. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Configuration property that controls whether the catalog filters namespaces to only those the user has access to at least one table in.static final String
Configuration property that controls whether the catalog filters tables to only those the user may retrieve. -
Method Summary
Modifier and TypeMethodDescriptionallVisibleNamespacesAndTables
(Predicate<String> namespacePredicate) Retrieve all visible tables, and their namespace and namespace set.getNamespaceSet
(String namespace) Retrieve the namespace set for a given namespace.getTableNames
(String namespace) Gets the list of tables inside of namespace that are visible to a user.getVisibleNamespacesSorted
(Predicate<String> predicate) Gets the list of visible namespaces for a user.
-
Field Details
-
ACL_FILTER_NAMESPACES_PROPERTY
Configuration property that controls whether the catalog filters namespaces to only those the user has access to at least one table in.- See Also:
-
ACL_FILTER_TABLES_PROPERTY
Configuration property that controls whether the catalog filters tables to only those the user may retrieve.- See Also:
-
-
Method Details
-
getVisibleNamespacesSorted
Gets the list of visible namespaces for a user.- Parameters:
predicate
- a predicate evaluated against each namespace before evaluating the filters.- Returns:
- a list of namespaces that are visible for the user
-
getTableNames
Gets the list of tables inside of namespace that are visible to a user.- Parameters:
namespace
- the namespace to interrogate- Returns:
- the list of visible tables in namespace
-
allVisibleNamespacesAndTables
DatabaseCatalog.CatalogInformation allVisibleNamespacesAndTables(Predicate<String> namespacePredicate) Retrieve all visible tables, and their namespace and namespace set. Filtered by namespacePredicate.- Parameters:
namespacePredicate
- the predicate to apply to the namespaces- Returns:
- a CatalogInformation class containing information for the responsive tables
-
getNamespaceSet
Retrieve the namespace set for a given namespace.- Parameters:
namespace
- the namespace to interrogate- Returns:
- the NamespaceSet for the given namespace.
-