Record Class Assignee
java.lang.Object
java.lang.Record
cloud.opencode.base.flow.model.Assignee
- Record Components:
type- assignee type — 参与者类型value- resolved id / role / dept / expr — 解析串
Participant descriptor on a step.
节点上的参与者描述。
A value is interpreted by the host's AssigneeResolver based
on type: a user id, a ${expr} placeholder, a role code, or a
department code.
value 的语义由宿主 AssigneeResolver 根据 type
解析:userId、${expr}、角色 code、部门 code。
Validation (constructor):
typemust be non-nullvaluemust be non-null and non-blankvalue.length()must be<= 256
构造期校验:type/value 非空、value 长度
<= 256;超长抛 IllegalActionException(
FlowErrorCode.INPUT_INVALID_TEXT)。
- Since:
- JDK 25, opencode-base-flow V1.0.5
- Author:
- Leon Soo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHard upper bound onvaluelength. -
Constructor Summary
ConstructorsConstructorDescriptionAssignee(AssigneeType type, String value) Compact constructor that validates inputs. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.value()Returns the value of thevaluerecord component.
-
Field Details
-
MAX_VALUE_LENGTH
public static final int MAX_VALUE_LENGTHHard upper bound onvaluelength.value长度硬上限。- See Also:
-
-
Constructor Details
-
Assignee
Compact constructor that validates inputs. 紧凑构造器,做入参校验。- Throws:
NullPointerException- whentypeorvalueis nullIllegalActionException- when value is blank or longer thanMAX_VALUE_LENGTH- Since:
- JDK 25, opencode-base-flow V1.0.5
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
-
value
-