BaseStoreDefinitionStore
@Component public class BaseStoreDefinitionStore implements DefinitionStore
源码Source
io/agentscope/builder/web/catalog/BaseStoreDefinitionStore.java:34–142基类存储定义存储,负责持久化与读取数据。位于 io.agentscope.builder.web.catalog 包,实现 DefinitionStore。核心成员包括 putText、getText、delete、deletePrefix、list、BaseStoreDefinitionStore。
DefinitionStore backed by the shared BaseStore under namespace definitions / {ownerId} / {agentId}.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public BaseStoreDefinitionStore(BaseStore baseStore) | 初始化 `BaseStoreDefinitionStore` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void putText(String ownerId, String agentId, String relativePath, String content) | 执行 `putText` 方法。 Performs the put text operation. |
public Optional<String> getText(String ownerId, String agentId, String relativePath) | 获取文本。 Returns the text. |
public void delete(String ownerId, String agentId, String relativePath) | 删除数据。 Performs the delete operation. |
public void deletePrefix(String ownerId, String agentId, String prefix) | 删除 `deletePrefix`。 Deletes the prefix. |
public List<String> list(String ownerId, String agentId, String prefix) | 执行列表相关操作。 Performs the list operation. |
构造器详情Constructor Detail
BaseStoreDefinitionStore
public BaseStoreDefinitionStore(BaseStore baseStore)
初始化 BaseStoreDefinitionStore 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseStore | BaseStore | 基类存储(类型 `BaseStore`)。The base store. |
源码Source
io/agentscope/builder/web/catalog/BaseStoreDefinitionStore.java:41–43方法详情Method Detail
putText
public void putText(String ownerId, String agentId, String relativePath, String content)
执行 putText 方法。
Performs the put text operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
relativePath | String | relative 路径(类型 `String`)。The relative path. |
content | String | 内容(类型 `String`)。The content. |
源码Source
io/agentscope/builder/web/catalog/BaseStoreDefinitionStore.java:45–53getText
public Optional<String> getText(String ownerId, String agentId, String relativePath)
获取文本。
Returns the text.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
relativePath | String | relative 路径(类型 `String`)。The relative path. |
Optional<String>返回可选。Returns optional.
源码Source
io/agentscope/builder/web/catalog/BaseStoreDefinitionStore.java:55–63delete
public void delete(String ownerId, String agentId, String relativePath)
删除数据。
Performs the delete operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
relativePath | String | relative 路径(类型 `String`)。The relative path. |
源码Source
io/agentscope/builder/web/catalog/BaseStoreDefinitionStore.java:65–68deletePrefix
public void deletePrefix(String ownerId, String agentId, String prefix)
删除 deletePrefix。
Deletes the prefix.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
prefix | String | prefix(类型 `String`)。The prefix. |
源码Source
io/agentscope/builder/web/catalog/BaseStoreDefinitionStore.java:70–76list
public List<String> list(String ownerId, String agentId, String prefix)
执行列表相关操作。
Performs the list operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
prefix | String | prefix(类型 `String`)。The prefix. |
List<String>返回列出。Returns list.
源码Source
io/agentscope/builder/web/catalog/BaseStoreDefinitionStore.java:78–95