Package com.axelor.ai.tool.data
Class ReadRecordTool
java.lang.Object
com.axelor.ai.tool.system.ModelAwareSystemTool<ReadRecordTool.Input>
com.axelor.ai.tool.data.ReadRecordTool
- All Implemented Interfaces:
SystemTool<ReadRecordTool.Input>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallTitle(ReadRecordTool.Input input, String name) A batch is not one record; how many it was belongs to the card that lists them.code()Unique code matching AiTool.systemTool field.Brief description of what this tool does.protected ToolResultexecuteForJsonModel(ReadRecordTool.Input input, MetaJsonModel jsonModel, Access access) Subclass hook — called for a custom model once it is allowed.protected ToolResultexecuteForModel(ReadRecordTool.Input input, Class<? extends Model> modelClass, Access access) Subclass hook — called for a JPA entity once the model is allowed.The input record class.name()Human-readable display name (e.g.protected OperationThe operation this tool performs, which the model's permissions are checked for.safety()Safety classification for approval decisions.Methods inherited from class com.axelor.ai.tool.system.ModelAwareSystemTool
beforeApproval, checkForJsonModel, checkForModel, customFieldsByName, entityCustomFieldNames, entityCustomFields, entityFieldNames, execute, extractCustomFields, invalidChoice, invalidJsonValues, invalidValues, jsonFieldNames, jsonModelFields, jsonPropertyOf, parseAttrs, saveRecord, selectionOptions, selectionOptions, serializeAttrs, unknownFields, unknownFieldsMessage, unknownJsonFields, validateFields, validateJsonFieldsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axelor.ai.tool.system.SystemTool
provideContext, refusal, runsOutsideTransaction, undoneByRollback
-
Field Details
-
CODE
- See Also:
-
-
Constructor Details
-
ReadRecordTool
public ReadRecordTool()
-
-
Method Details
-
operation
Description copied from class:ModelAwareSystemToolThe operation this tool performs, which the model's permissions are checked for.- Specified by:
operationin classModelAwareSystemTool<ReadRecordTool.Input>
-
safety
Description copied from interface:SystemToolSafety classification for approval decisions. Tools default toToolSafety.WRITE. Override toToolSafety.READ_ONLYfor safe tools that never require approval orToolSafety.DESTRUCTIVEfor tools that should always require approval. -
code
Description copied from interface:SystemToolUnique code matching AiTool.systemTool field. -
name
Description copied from interface:SystemToolHuman-readable display name (e.g. "Search Records"). -
description
Description copied from interface:SystemToolBrief description of what this tool does. -
inputType
Description copied from interface:SystemToolThe input record class. ReturnVoid.classfor tools with no input. -
callTitle
A batch is not one record; how many it was belongs to the card that lists them.- Parameters:
input- the call's input, or null when the tool takes nonename- the tool's configured display name
-
executeForModel
protected ToolResult executeForModel(ReadRecordTool.Input input, Class<? extends Model> modelClass, Access access) Description copied from class:ModelAwareSystemToolSubclass hook — called for a JPA entity once the model is allowed.- Specified by:
executeForModelin classModelAwareSystemTool<ReadRecordTool.Input>- Parameters:
access- what the call may do; the tool asks it about every record and field it touches, and may throwAccessDeniedfrom anywhere to refuse the call
-
executeForJsonModel
protected ToolResult executeForJsonModel(ReadRecordTool.Input input, MetaJsonModel jsonModel, Access access) Description copied from class:ModelAwareSystemToolSubclass hook — called for a custom model once it is allowed.- Specified by:
executeForJsonModelin classModelAwareSystemTool<ReadRecordTool.Input>
-