/
Includes - Archiving.xml
125 lines (121 loc) · 4.21 KB
/
Includes - Archiving.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<objectTemplate xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
oid="includes-archiving">
<name>Includes - Archiving</name>
<description>
Archive previous attribute values that need to be retained.
</description>
<mapping>
<name>Auto Archive Level</name>
<strength>strong</strength>
<source>
<name>currentLevel</name>
<c:path xmlns:bshp="http://midpoint.bshp.edu/xml/ns/bshp">extension/bshp:academicLevel</c:path>
</source>
<expression>
<script>
<code>
oldObj = midpoint.getFocusContext().getObjectOld().asObjectable();
oldValue = basic.getPropertyValue(oldObj, "extension/academicLevel");
if (oldValue != currentLevel && oldValue != null) {
return oldValue;
}
</code>
</script>
</expression>
<target>
<c:path xmlns:bshp="http://midpoint.bshp.edu/xml/ns/bshp">extension/bshp:prevAcademicLevel</c:path>
</target>
<condition>
<script>
<code>operation != 'add'</code>
</script>
</condition>
</mapping>
<mapping>
<name>Auto Archive Status</name>
<strength>strong</strength>
<source>
<name>academicStatus</name>
<c:path xmlns:bshp="http://midpoint.bshp.edu/xml/ns/bshp">extension/bshp:academicStatus</c:path>
</source>
<expression>
<script>
<code>
oldObj = midpoint.getFocusContext().getObjectOld().asObjectable();
oldValue = basic.getPropertyValue(oldObj, "extension/academicStatus");
if (oldValue != academicStatus && oldValue != null) {
return oldValue;
}
</code>
</script>
</expression>
<target>
<c:path xmlns:bshp="http://midpoint.bshp.edu/xml/ns/bshp">extension/bshp:prevAcademicStatus</c:path>
</target>
<condition>
<script>
<code>operation != 'add'</code>
</script>
</condition>
</mapping>
<mapping>
<name>Auto Archive Username</name>
<strength>strong</strength>
<source>
<c:path>name</c:path>
</source>
<expression>
<script>
<code>
oldObj = midpoint.getFocusContext().getObjectOld().asObjectable();
oldValue = basic.getPropertyValue(oldObj, "name");
if (oldValue != name && oldValue != null) {
return oldValue;
}
</code>
</script>
</expression>
<target>
<c:path xmlns:bshp="http://midpoint.bshp.edu/xml/ns/bshp">extension/bshp:previousUsername</c:path>
</target>
<condition>
<script>
<code>operation != 'add'</code>
</script>
</condition>
</mapping>
<mapping>
<name>Auto Archive Lastname</name>
<strength>strong</strength>
<source>
<c:path>familyName</c:path>
</source>
<expression>
<script>
<code>
oldObj = midpoint.getFocusContext().getObjectOld().asObjectable();
oldValue = basic.getPropertyValue(oldObj, "familyName");
if (oldValue != familyName && oldValue != null) {
return oldValue;
}
</code>
</script>
</expression>
<target>
<c:path xmlns:bshp="http://midpoint.bshp.edu/xml/ns/bshp">extension/bshp:previousLastname</c:path>
</target>
<condition>
<script>
<code>operation != 'add'</code>
</script>
</condition>
</mapping>
</objectTemplate>