Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/dependency-…
Browse files Browse the repository at this point in the history
…upgrade
  • Loading branch information
tonydamage committed May 25, 2023
2 parents 0c040f2 + 15e18c2 commit 07b776d
Show file tree
Hide file tree
Showing 188 changed files with 102 additions and 1,517 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@
<executionState>closed</executionState>
<category>Utility</category>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/execute-deltas/handler-3</handlerUri>
<recurrence>single</recurrence>
<binding>tight</binding>
</task>
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@
<executionState>runnable</executionState>
<category>BulkActions</category>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/scripting/handler-3</handlerUri>
<recurrence>single</recurrence>
<binding>tight</binding>
</task>
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ public abstract class SchemaConstants {
public static final ItemName MODEL_EXTENSION_UPDATE_ID_MATCH = new ItemName(NS_MODEL_EXTENSION, "updateIdMatch");

public static final ItemName MODEL_EXTENSION_RETRY_LIVE_SYNC_ERRORS = new ItemName(NS_MODEL_EXTENSION, "retryLiveSyncErrors");
public static final ItemName MODEL_EXTENSION_LIVE_SYNC_ERROR_HANDLING_STRATEGY = new ItemName(NS_MODEL_EXTENSION, "liveSyncErrorHandlingStrategy");
public static final ItemName MODEL_EXTENSION_UPDATE_LIVE_SYNC_TOKEN_IN_DRY_RUN = new ItemName(NS_MODEL_EXTENSION, "updateLiveSyncTokenInDryRun");
public static final ItemName MODEL_EXTENSION_LIVE_SYNC_BATCH_SIZE = new ItemName(NS_MODEL_EXTENSION, "liveSyncBatchSize");
public static final ItemName MODEL_EXTENSION_KIND = new ItemName(NS_MODEL_EXTENSION, "kind");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ static boolean isActivityBasedPersistentSubtask(@NotNull TaskType task) {
public static @Nullable TaskRecurrenceType getSpecifiedRecurrence(@NotNull TaskType task) {
if (task.getSchedule() != null && task.getSchedule().getRecurrence() != null) {
return task.getSchedule().getRecurrence();
} else if (task.getRecurrence() != null) {
return task.getRecurrence();
} else {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,16 @@
</xsd:documentation>
<xsd:appinfo>
<a:container/>
<a:schemaMigration>
<a:element>tns:accountPasswordPolicy</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:accountPasswordPolicyRef</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
Expand Down Expand Up @@ -514,22 +524,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="accountPasswordPolicy" type="c:ValuePolicyType" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
<a:objectReference>tns:accountPasswordPolicyRef</a:objectReference>
<a:deprecated>true</a:deprecated>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="accountPasswordPolicyRef" type="c:ObjectReferenceType" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
<a:objectReferenceTargetType>c:ValuePolicyType</a:objectReferenceTargetType>
<a:deprecated>true</a:deprecated>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@
<a:operation>moved</a:operation>
<a:replacement>tns:executionState</a:replacement>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:errorHandlingStrategy</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:modelOperationContext</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:recurrence</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
Expand Down Expand Up @@ -414,17 +429,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="recurrence" type="tns:TaskRecurrenceType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
DEPRECATED. Moved to schedule/recurrence and made optional.
</xsd:documentation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.4</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="binding" type="tns:TaskBindingType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -473,22 +477,6 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="modelOperationContext" type="tns:LensContextType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Model context of the operation that is to be executed within this task.
This is NOT a live information: it is a serialized form of a model context.
Currently there is a specialized task handler that takes this context,
unmarshalls and executes it.

Note: This item will be moved to an activity definition in the future.
</xsd:documentation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.4</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="policyRule" type="tns:PolicyRuleType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand All @@ -502,20 +490,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="errorHandlingStrategy" type="tns:ActivityErrorHandlingStrategyType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Error handling strategy for this task. EXPERIMENTAL.
DEPRECATED. Set error handling strategy in activity instead.
</xsd:documentation>
<xsd:appinfo>
<a:experimental>true</a:experimental>
<a:since>4.3</a:since>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.4</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="autoScaling" type="tns:TaskAutoScalingType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -3985,6 +3959,11 @@
<xsd:appinfo>
<a:since>3.8</a:since>
<a:container>true</a:container>
<a:schemaMigration>
<a:element>tns:boundaryCharacters</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
Expand All @@ -4000,21 +3979,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="boundaryCharacters" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Characters that make up the boundaries. These characters must be sorted.
Reserved characters: '-', '$' (to be implemented later)
Escaping character: '\'

DEPRECATED. Please use boundary instead.
</xsd:documentation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.3</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="depth" type="xsd:int" minOccurs="0" default="1">
<xsd:annotation>
<xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@
<xsd:appinfo>
<a:container/>
<a:since>3.7</a:since>
<a:schemaMigration>
<a:element>tns:executionRecord</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
Expand All @@ -340,14 +345,6 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="executionRecord" type="c:ApprovalStageExecutionRecordType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Approvers that are expected to be part of this stage.
(Some might be "for sure" and some might be "expected", but currently we do not distinguish between these.)
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="executionPreview" type="c:ApprovalStageExecutionPreviewType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -407,39 +404,6 @@
<xsd:attribute name="id" type="xsd:long"/>
</xsd:complexType>

<xsd:complexType name="ApprovalStageExecutionRecordType">
<xsd:annotation>
<xsd:documentation>
Record of an actual execution of an approval stage.
Note that this structure is deprecated. Everything we need can be found in the case object
attached to (enclosing) ApprovalSchemaExecutionInformationType.
</xsd:documentation>
<xsd:appinfo>
<a:container/>
<a:since>3.7</a:since>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.1</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="event" type="c:CaseEventType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Events related to this stage. Currently might contain WorkItemEventType and StageCompletionEventType instances.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="workItem" type="c:CaseWorkItemType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Currently active work items.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:long"/>
</xsd:complexType>

<xsd:simpleType name="ApprovalLevelOutcomeType">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -1367,10 +1331,7 @@
</xsd:element>
<xsd:element name="title" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>3.7</a:deprecatedSince>
</xsd:appinfo>
<xsd:documentation>Simpler (plain string) form of "localizableTitle".</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="part" type="tns:InformationPartType" minOccurs="0" maxOccurs="unbounded" />
Expand All @@ -1394,10 +1355,7 @@
</xsd:element>
<xsd:element name="text" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>3.7</a:deprecatedSince>
</xsd:appinfo>
<xsd:documentation>Simpler (plain string) form of "localizableText".</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="hasMarkup" type="xsd:boolean" minOccurs="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,17 @@
<xsd:annotation>
<xsd:appinfo>
<a:extension ref="c:TaskType"/>
<a:schemaMigration>
<a:element>tns:liveSyncErrorHandlingStrategy</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="tns:freshnessInterval" minOccurs="0"/>
<xsd:element ref="tns:dryRun" minOccurs="0"/>
<xsd:element ref="tns:retryLiveSyncErrors" minOccurs="0"/>
<xsd:element ref="tns:liveSyncErrorHandlingStrategy" minOccurs="0"/>
<xsd:element ref="tns:updateLiveSyncTokenInDryRun" minOccurs="0"/>
<xsd:element ref="tns:lastScanTimestamp" minOccurs="0"/>
<xsd:element ref="tns:lastReconciliationStartTimestamp" minOccurs="0"/>
Expand Down Expand Up @@ -166,23 +170,6 @@
</xsd:annotation>
</xsd:element>

<xsd:element name="liveSyncErrorHandlingStrategy" type="c:ActivityErrorHandlingStrategyType">
<xsd:annotation>
<xsd:documentation>
Specifies a strategy for handling errors during Live Synchronization.
DEPRECATED. Use task.errorHandlingStrategy instead.
</xsd:documentation>
<xsd:appinfo>
<a:displayName>TaskExtension.liveSyncErrorHandlingStrategy</a:displayName>
<a:displayOrder>801</a:displayOrder>
<a:minOccurs>0</a:minOccurs>
<a:maxOccurs>1</a:maxOccurs>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.3</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>

<xsd:element name="updateLiveSyncTokenInDryRun" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,23 +730,6 @@ public void testCampaign() throws SchemaException, IOException {
assertEquals("Wrong # of triggers", 2, campaign.asObjectable().getTrigger().size());
}

@Test(enabled = false)
public void testReplaceModelOperationContext() throws Exception {
PrismObject<TaskType> prismObject = PrismTestUtil.parseObject(new File(TEST_DIR, "task-modelOperationContext-before.xml"));

ObjectDelta<TaskType> delta = getPrismContext().deltaFactory().object().createEmptyModifyDelta(TaskType.class, prismObject.getOid());
//noinspection unchecked
delta.addModificationReplaceContainer(TaskType.F_MODEL_OPERATION_CONTEXT);

PrismObject<TaskType> changed = prismObject.clone();
ItemDeltaCollectionsUtil.applyTo(delta.getModifications(), changed);
Collection<? extends ItemDelta> processedModifications = prismObject.diffModifications(changed, LITERAL);

ItemDeltaCollectionsUtil.applyTo(processedModifications, prismObject);

assertNull(prismObject.findContainer(TaskType.F_MODEL_OPERATION_CONTEXT));
}

@Test
public void testDiffSameValues() throws Exception {
PrismObject<ResourceType> before = PrismTestUtil.parseObject(new File(TEST_DIR, "resource-white-before.xml"));
Expand Down

0 comments on commit 07b776d

Please sign in to comment.