Record Class WorkflowInitContext
java.lang.Object
java.lang.Record
com.yworkflow.definition.model.init.WorkflowInitContext
- Record Components:
properties- configuration propertiesextensionProvider- extension providerclock- time provider
public record WorkflowInitContext(Properties properties, ExtensionProvider extensionProvider, WorkflowClock clock)
extends Record
Holder of configuration and components that are passed during Workflow Initialization.
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowInitContext(Properties properties, ExtensionProvider extensionProvider, WorkflowClock clock) Creates an instance of aWorkflowInitContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns the value of theclockrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionProviderrecord component.final inthashCode()Returns a hash code value for this object.static WorkflowInitContextCreate a default (empty) WorkflowInitContext.Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.withClock(WorkflowClock clock) Create a WorkflowInitContext updated with the clock.withExtensionProvider(ExtensionProvider extensionProvider) Create a WorkflowInitContext updated with the ExtensionProvider.withProperties(Properties properties) Create a WorkflowInitContext updated with the configuration properties.
-
Constructor Details
-
WorkflowInitContext
public WorkflowInitContext(Properties properties, ExtensionProvider extensionProvider, WorkflowClock clock) Creates an instance of aWorkflowInitContextrecord class.- Parameters:
properties- the value for thepropertiesrecord componentextensionProvider- the value for theextensionProviderrecord componentclock- the value for theclockrecord component
-
-
Method Details
-
withProperties
Create a WorkflowInitContext updated with the configuration properties.- Parameters:
properties- configuration properties to update the context with- Returns:
- updated context
-
withExtensionProvider
Create a WorkflowInitContext updated with the ExtensionProvider.- Parameters:
extensionProvider- ExtensionProvider to update the context with- Returns:
- updated context
-
withClock
Create a WorkflowInitContext updated with the clock.- Parameters:
clock- clock to update the context with- Returns:
- updated context
-
initContext
Create a default (empty) WorkflowInitContext.- Returns:
- the context
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
extensionProvider
Returns the value of theextensionProviderrecord component.- Returns:
- the value of the
extensionProviderrecord component
-
clock
Returns the value of theclockrecord component.- Returns:
- the value of the
clockrecord component
-