Class FeatureContext.Builder
java.lang.Object
cloud.opencode.base.feature.FeatureContext.Builder
- Enclosing class:
FeatureContext
Builder for FeatureContext
FeatureContext构建器
- Since:
- JDK 25, opencode-base-feature V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd an attribute 添加属性attributes(Map<String, Object> attributes) Add all attributes from a map 从映射添加所有属性build()Build the context 构建上下文Set tenant ID 设置租户IDSet user ID 设置用户ID
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
userId
Set user ID 设置用户ID- Parameters:
userId- the user ID | 用户ID- Returns:
- this builder | 此构建器
-
tenantId
Set tenant ID 设置租户ID- Parameters:
tenantId- the tenant ID | 租户ID- Returns:
- this builder | 此构建器
-
attribute
Add an attribute 添加属性- Parameters:
key- the attribute key | 属性键value- the attribute value | 属性值- Returns:
- this builder | 此构建器
-
attributes
Add all attributes from a map 从映射添加所有属性- Parameters:
attributes- the attributes map | 属性映射- Returns:
- this builder | 此构建器
-
build
Build the context 构建上下文- Returns:
- new FeatureContext | 新的FeatureContext
-