Package com.evolveum.midpoint.model.api
Record Class ActivitySubmissionOptions
java.lang.Object
java.lang.Record
com.evolveum.midpoint.model.api.ActivitySubmissionOptions
@Experimental
public record ActivitySubmissionOptions(@Nullable TaskType taskTemplate, @NotNull String[] archetypes, @Nullable FocusType owner)
extends Record
-
Constructor Summary
ConstructorDescriptionActivitySubmissionOptions
(@Nullable TaskType taskTemplate, @NotNull String[] archetypes, @Nullable FocusType owner) Creates an instance of aActivitySubmissionOptions
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull String[]
Returns the value of thearchetypes
record component.static ActivitySubmissionOptions
create()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable FocusType
owner()
Returns the value of theowner
record component.@Nullable TaskType
Returns the value of thetaskTemplate
record component.final String
toString()
Returns a string representation of this record class.updateTaskTemplate
(@NotNull Consumer<TaskType> taskTemplateUpdater) Creates or updatestaskTemplate
with specified updater.withArchetypes
(@NotNull String... oids) If present, the new task will have specified archetype OID(s), regardless of any other options.withTaskTemplate
(@Nullable TaskType task) The provided task object will be used as a "starting point" when constructing the resulting task.
-
Constructor Details
-
ActivitySubmissionOptions
public ActivitySubmissionOptions(@Nullable @Nullable TaskType taskTemplate, @NotNull @NotNull String[] archetypes, @Nullable @Nullable FocusType owner) Creates an instance of aActivitySubmissionOptions
record class.- Parameters:
taskTemplate
- the value for thetaskTemplate
record componentarchetypes
- the value for thearchetypes
record componentowner
- the value for theowner
record component
-
-
Method Details
-
create
-
withTaskTemplate
The provided task object will be used as a "starting point" when constructing the resulting task. Beware, some parts (e.g., the activity definition) will be completely replaced. See theModelInteractionService.submit(ActivityDefinitionType, ActivitySubmissionOptions, Task, OperationResult)
implementation for the details. -
withArchetypes
If present, the new task will have specified archetype OID(s), regardless of any other options. -
withOwner
-
updateTaskTemplate
public ActivitySubmissionOptions updateTaskTemplate(@NotNull @NotNull Consumer<TaskType> taskTemplateUpdater) Creates or updatestaskTemplate
with specified updater. -
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)
. -
taskTemplate
Returns the value of thetaskTemplate
record component.- Returns:
- the value of the
taskTemplate
record component
-
archetypes
Returns the value of thearchetypes
record component.- Returns:
- the value of the
archetypes
record component
-
owner
Returns the value of theowner
record component.- Returns:
- the value of the
owner
record component
-