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
ConstructorsConstructorDescriptionActivitySubmissionOptions(@Nullable TaskType taskTemplate, @NotNull String[] archetypes, @Nullable FocusType owner) Creates an instance of aActivitySubmissionOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull String[]Returns the value of thearchetypesrecord component.static ActivitySubmissionOptionscreate()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable FocusTypeowner()Returns the value of theownerrecord component.@Nullable TaskTypeReturns the value of thetaskTemplaterecord component.final StringtoString()Returns a string representation of this record class.updateTaskTemplate(@NotNull Consumer<TaskType> taskTemplateUpdater) Creates or updatestaskTemplatewith 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 aActivitySubmissionOptionsrecord class.- Parameters:
taskTemplate- the value for thetaskTemplaterecord componentarchetypes- the value for thearchetypesrecord componentowner- the value for theownerrecord 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 updatestaskTemplatewith 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 thetaskTemplaterecord component.- Returns:
- the value of the
taskTemplaterecord component
-
archetypes
Returns the value of thearchetypesrecord component.- Returns:
- the value of the
archetypesrecord component
-
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-