Class DatabaseTableAccessAclBase<Options,PreTable extends Table,PostTable extends Table>

java.lang.Object
io.deephaven.enterprise.database.DatabaseTableAccessAclBase<Options,PreTable,PostTable>
Type Parameters:
Options - the option type
PreTable - the table type returned from tableImpl(Object)
PostTable - the table type returned from postAclTableApply(IntermediateResults)
All Implemented Interfaces:
Database.DatabaseTableAccess<Options>, TableAccess<Options>
Direct Known Subclasses:
IcebergTableAccess

public abstract non-sealed class DatabaseTableAccessAclBase<Options,PreTable extends Table,PostTable extends Table> extends Object implements Database.DatabaseTableAccess<Options>
A base table access implementation that applies relevant access controls and logs audit events for Database.
  • Constructor Details

    • DatabaseTableAccessAclBase

      public DatabaseTableAccessAclBase(Database db)
  • Method Details

    • namespace

      protected abstract String namespace(@NotNull Options options)
      Extract the namespace from the type-specific options.
      Parameters:
      options - the options
      Returns:
      the namespace
    • tableName

      protected abstract String tableName(@NotNull Options options)
      Extract the table name from the type-specific options.
      Parameters:
      options - the options
      Returns:
      the table name
    • isRefreshing

      public abstract boolean isRefreshing(@NotNull Options options)
      Extract if the table should be refreshing from the type-specific options.
      Specified by:
      isRefreshing in interface Database.DatabaseTableAccess<Options>
      Parameters:
      options - the options
      Returns:
      if the table should be refreshing
    • event

      protected abstract String event(@NotNull Options options)
      Extract the audit event access string from the type-specific options.
      Parameters:
      options - the options
      Returns:
      the audit event access string
    • tableImpl

      protected abstract PreTable tableImpl(@NotNull Options options)
      The entrypoint for implementations to fetch an intermediate Table, which will subsequently have ACLs applied be being exposed to the user. Called from table(Object).
      Parameters:
      options - the options
      Returns:
      the base table
    • postAclTableApply

      protected abstract PostTable postAclTableApply(DatabaseTableAccessAclBase.IntermediateResults<Options,PreTable> intermediate)
      Provides a hook for implementations to apply a post-ACL table filter or transformation. The default implementations should return DatabaseTableAccessAclBase.IntermediateResults.aclOrPre(). Called from table(Object).
      Parameters:
      intermediate - the intermediate results
      Returns:
      the table
    • table

      public final PostTable table(@NotNull Options options)
      Fetch a Table for the specified options. Will invoke tableImpl(Object); then apply any ACLS and log audit events; and then invoke postAclTableApply(IntermediateResults).
      Specified by:
      table in interface Database.DatabaseTableAccess<Options>
      Specified by:
      table in interface TableAccess<Options>
      Parameters:
      options - the options
      Returns:
      the table
    • preAndPostTable

      protected final DatabaseTableAccessAclBase.PreAndPostTable<PreTable,PostTable> preAndPostTable(@NotNull Options options)
      Fetch a Table for the specified options. Will invoke tableImpl(Object); then apply any ACLS and log audit events; and then invoke postAclTableApply(IntermediateResults). Implementations may use this instead of table(Object) when there is some internal functionality that can only be achieved from the DatabaseTableAccessAclBase.PreAndPostTable.preAcl.
      Parameters:
      options - the options
      Returns:
      the pre and post table
    • schemaFor

      protected final Schema schemaFor(String namespace, String tableName)
      Get the schema for the given namespace and tableName.
      Parameters:
      namespace - the namespace
      tableName - the table name
      Returns:
      the schema