Class AiExposurePolicy

java.lang.Object
com.kingsrook.qqq.backend.core.actions.ai.exposure.AiExposurePolicy

public class AiExposurePolicy extends Object
Default assistant-channel exposure, from explicit AiTableMetaData / AiFieldMetaData or conservative defaults. FieldAccessHelper combines this policy with locks and the instance resolver; this is not final access: Tables: the assistant's own tables (assistant*), user-session tables (userSession*) and OAuth tables (*oauth*) are NONE; others get the settings' defaultExposure. Fields: hidden fields, password (masked-type) fields and fields with a FieldSecurityLock (a conservative assistant default) are NONE; others get the settings' defaultExposure. A field's effective exposure is then capped by its table's exposure.
  • Constructor Details

  • Method Details

    • getTableExposure

      public AiExposure getTableExposure(QTableMetaData table)
      The effective exposure of a table (NONE for a null table).
    • getFieldExposure

      public AiExposure getFieldExposure(QTableMetaData table, QFieldMetaData field)
      The effective exposure of a field of a table (capped by the table's).
    • getUncappedFieldExposure

      public AiExposure getUncappedFieldExposure(QFieldMetaData field)
      The exposure of a field on its own - before its table's exposure caps it.
    • getFieldExposureReason

      public String getFieldExposureReason(QTableMetaData table, QFieldMetaData field)
      Why a field's exposure is what it is: "metadata" (explicit AiFieldMetaData), "hidden", "password", "field security lock", "table" (capped by its table's exposure) or "default".
    • isDefaultNoneTableName

      public static boolean isDefaultNoneTableName(String tableName)
      Whether a table name is one that defaults to NONE: the assistant's own tables, user-session tables, and OAuth (token) tables.