Class TableMetaDataPersonalizerAction
java.lang.Object
com.kingsrook.qqq.backend.core.actions.metadata.personalization.TableMetaDataPersonalizerAction
action to execute the TableMetaDataPersonalizerInterface assigned to the
QInstance, e.g., to adjust a TableMetaData object to "personalize" the table
for the current user, before (or within) certain backend actions.
e.g., to hide fields from a subset of users - as the query action passes the
table being queried through this class, so removing a field from the table
should effectively hide such a field's data.
It is vitally important that the
QTableMetaData
returned by the execute
method return a clone if it makes any changes, to avoid changing the meta data
for the whole application!-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QTableMetaData
execute
(AbstractTableActionInput tableActionInput) execute the personalizer, using the table in the tableActionInput param, returning the table that was modified (as a clone!)
-
Constructor Details
-
TableMetaDataPersonalizerAction
public TableMetaDataPersonalizerAction()
-
-
Method Details
-
execute
execute the personalizer, using the table in the tableActionInput param, returning the table that was modified (as a clone!) or the original table if no personalization applied. Note that the output table (e.g., w/ personalizations) will NOT be set in the input `tableActionInput` - though callers may very likely want to do this themselves afterwards.- Parameters:
tableActionInput
- an action-input - e.g., to QueryAction or TableMetaDataAction - with a table set in it (most likely through tableName being set), and likely an InputSource, so the personalizer implementation can choose to only apply the changes to USER-based actions, if appropriate.- Returns:
- either the original unmodified
QTableMetaData
, or, if personaliztions were applied, a clone of that table meta data.k - Throws:
QException
-