Class DefaultCatalogPrefixParser
java.lang.Object
org.apache.polaris.service.catalog.DefaultCatalogPrefixParser
- All Implemented Interfaces:
CatalogPrefixParser
@ApplicationScoped
public class DefaultCatalogPrefixParser
extends Object
implements CatalogPrefixParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncatalogNameToPrefix(org.apache.polaris.core.context.RealmContext realm, String catalogName) Produces the "prefix" according to the Iceberg REST Catalog API specification for the given Polaris catalog name in the specified realm.prefixToCatalogName(org.apache.polaris.core.context.RealmContext realm, String prefix) Produces the name of a Polaris catalog from the given Iceberg Catalog REST API "prefix" for the specified realm.
-
Constructor Details
-
DefaultCatalogPrefixParser
public DefaultCatalogPrefixParser()
-
-
Method Details
-
prefixToCatalogName
public String prefixToCatalogName(org.apache.polaris.core.context.RealmContext realm, String prefix) Description copied from interface:CatalogPrefixParserProduces the name of a Polaris catalog from the given Iceberg Catalog REST API "prefix" for the specified realm.- Specified by:
prefixToCatalogNamein interfaceCatalogPrefixParser- Parameters:
realm- identifies the realm where the API request is to be served.prefix- the "prefix" according to the Iceberg REST Catalog API specification.- Returns:
- Polaris Catalog name
-
catalogNameToPrefix
public String catalogNameToPrefix(org.apache.polaris.core.context.RealmContext realm, String catalogName) Description copied from interface:CatalogPrefixParserProduces the "prefix" according to the Iceberg REST Catalog API specification for the given Polaris catalog name in the specified realm.- Specified by:
catalogNameToPrefixin interfaceCatalogPrefixParser- Parameters:
realm- identifies the realm owning the catalogcatalogName- name of a Polaris catalog.- Returns:
- the "prefix" for the Iceberg REST client to be used for requests to the given catalog.
-