Package com.yworkflow.common.caller
Interface WorkflowCaller
- All Superinterfaces:
Comparable<WorkflowCaller>
- All Known Implementing Classes:
ImmutableWorkflowCaller
Represents a caller in the yWorkflow system. A caller is typically a user, system, or service
that interacts with workflow instances. The caller identity is used for access control, audit
trails, and determining available capabilities.
WorkflowCaller instances are immutable and can be compared for equality and ordering. They support both named callers (with a specific identity) and anonymous callers.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WorkflowCallerAn empty caller instance with an empty string value. -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkflowCallerCreates a new anonymous WorkflowCaller instance with no identity.static WorkflowCallerCreates a new WorkflowCaller instance with the specified caller identity.value()Returns the optional string value representing the caller's identity.Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
EMPTY
An empty caller instance with an empty string value.
-
-
Method Details
-
value
Returns the optional string value representing the caller's identity.- Returns:
- an Optional containing the caller identity if present, empty for anonymous callers
-
caller
Creates a new WorkflowCaller instance with the specified caller identity.- Parameters:
caller- the caller identity string- Returns:
- a new WorkflowCaller instance
-
anonymous
Creates a new anonymous WorkflowCaller instance with no identity.- Returns:
- a new anonymous WorkflowCaller instance
-