Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a3ede2
commit 10d7ea5
Showing
2 changed files
with
254 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
249 changes: 249 additions & 0 deletions
249
...hrodingertest/src/test/resources/labs/M10/objecttemplate/object-template-example-user.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2010-2019 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<objectTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" | ||
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" | ||
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" | ||
oid="10000000-9999-9999-0000-a000fe000001"> | ||
<name>ExAmPLE User Template</name> | ||
<mapping> | ||
<name>ExAmPLE, Inc. User Template: Fullname</name> | ||
<description>Generate fullname (enforcing, no weak mapping)</description> | ||
<strength>strong</strength> | ||
<source> | ||
<path>givenName</path> | ||
</source> | ||
<source> | ||
<path>familyName</path> | ||
</source> | ||
<expression> | ||
<script> | ||
<code> | ||
basic.concatName(givenName, familyName) | ||
</code> | ||
</script> | ||
</expression> | ||
<target> | ||
<path>fullName</path> | ||
</target> | ||
</mapping> | ||
<mapping> | ||
<name>ExAmPLE, Inc. User Template: Active org. assignment</name> | ||
<strength>strong</strength> | ||
<source> | ||
<path>extension/empStatus</path> | ||
</source> | ||
<expression> | ||
<assignmentTargetSearch> | ||
<targetType>c:OrgType</targetType> | ||
<filter> | ||
<q:equal> | ||
<q:path>c:name</q:path> | ||
<q:value>ACTIVE</q:value> | ||
</q:equal> | ||
</filter> | ||
</assignmentTargetSearch> | ||
</expression> | ||
<target> | ||
<path>assignment</path> | ||
</target> | ||
<condition> | ||
<script> | ||
<code>empStatus == 'A'</code> | ||
</script> | ||
</condition> | ||
</mapping> | ||
<mapping> | ||
<name>ExAmPLE, Inc. User Template: Inactive org. assignment</name> | ||
<strength>strong</strength> | ||
<source> | ||
<path>extension/empStatus</path> | ||
</source> | ||
<expression> | ||
<assignmentTargetSearch> | ||
<targetType>c:OrgType</targetType> | ||
<filter> | ||
<q:equal> | ||
<q:path>c:name</q:path> | ||
<q:value>INACTIVE</q:value> | ||
</q:equal> | ||
</filter> | ||
</assignmentTargetSearch> | ||
</expression> | ||
<target> | ||
<path>assignment</path> | ||
</target> | ||
<condition> | ||
<script> | ||
<code>empStatus == 'I'</code> | ||
</script> | ||
</condition> | ||
</mapping> | ||
<mapping> | ||
<name>ExAmPLE, Inc. User Template: Former employees org. assignment</name> | ||
<strength>strong</strength> | ||
<source> | ||
<path>extension/empStatus</path> | ||
</source> | ||
<expression> | ||
<assignmentTargetSearch> | ||
<targetType>c:OrgType</targetType> | ||
<filter> | ||
<q:equal> | ||
<q:path>c:name</q:path> | ||
<q:value>FORMER</q:value> | ||
</q:equal> | ||
</filter> | ||
</assignmentTargetSearch> | ||
</expression> | ||
<target> | ||
<path>assignment</path> | ||
</target> | ||
<condition> | ||
<script> | ||
<code>empStatus == 'F'</code> | ||
</script> | ||
</condition> | ||
</mapping> | ||
<mapping> | ||
<name>ExAmPLE, Inc. User Template: Department org. assignment</name> | ||
<strength>strong</strength> | ||
<source> | ||
<path>extension/empStatus</path> | ||
</source> | ||
<source> | ||
<!-- <path>organizationalUnit</path>--> | ||
<path>costCenter</path> | ||
</source> | ||
<expression> | ||
<assignmentTargetSearch> | ||
<targetType>c:OrgType</targetType> | ||
<filter> | ||
<q:equal> | ||
<!--<q:path>c:displayName</q:path>--> | ||
<!-- name is "alphanumeric" identifier --> | ||
<q:path>c:name</q:path> | ||
<!-- "alphanumeric" identifier is in costCenter --> | ||
<expression> | ||
<script> | ||
<!-- <code>return organizationalUnit</code>--> | ||
<code>return costCenter</code> | ||
</script> | ||
</expression> | ||
</q:equal> | ||
</filter> | ||
</assignmentTargetSearch> | ||
</expression> | ||
<target> | ||
<path>assignment</path> | ||
</target> | ||
<condition> | ||
<script> | ||
<code>empStatus == 'A'</code> | ||
</script> | ||
</condition> | ||
</mapping> | ||
<mapping> | ||
<name>ExAmPLE, Inc. User Template: Manager of Department org. assignment</name> | ||
<strength>strong</strength> | ||
<source> | ||
<path>extension/isManager</path> | ||
</source> | ||
<source> | ||
<path>extension/empStatus</path> | ||
</source> | ||
<source> | ||
<path>costCenter</path> | ||
<!-- <path>organizationalUnit</path>--> | ||
</source> | ||
<expression> | ||
<assignmentTargetSearch> | ||
<targetType>c:OrgType</targetType> | ||
<filter> | ||
<q:equal> | ||
<!--<q:path>c:displayName</q:path>--> | ||
<!-- name is "alphanumeric" identifier --> | ||
<q:path>c:name</q:path> | ||
<!-- identifier is "alphanumeric" identifier --> | ||
<expression> | ||
<script> | ||
<code>return costCenter</code> | ||
</script> | ||
</expression> | ||
</q:equal> | ||
</filter> | ||
<assignmentProperties> | ||
<relation>org:manager</relation> | ||
</assignmentProperties> | ||
</assignmentTargetSearch> | ||
</expression> | ||
<target> | ||
<path>assignment</path> | ||
</target> | ||
<condition> | ||
<script> | ||
<code>empStatus == 'A' && isManager</code> | ||
</script> | ||
</condition> | ||
</mapping> | ||
<mapping> | ||
<name>Internal Employee role assignment</name> | ||
<description>Assign 'Internal Employee' role to active and inactive users.</description> | ||
<strength>strong</strength> | ||
<source> | ||
<path>extension/empStatus</path> | ||
</source> | ||
<expression> | ||
<assignmentTargetSearch> | ||
<targetType>c:RoleType</targetType> | ||
<filter> | ||
<q:equal> | ||
<q:path>c:name</q:path> | ||
<q:value>Internal Employee</q:value> | ||
</q:equal> | ||
</filter> | ||
</assignmentTargetSearch> | ||
</expression> | ||
<target> | ||
<path>assignment</path> | ||
</target> | ||
<condition> | ||
<script> | ||
<code>(empStatus == 'A' || empStatus == 'I')</code> | ||
</script> | ||
</condition> | ||
</mapping> | ||
<!-- MID-101, LAB 10-3: Uncomment these lines to see lookup tables and attribute schema | ||
override --> | ||
<!-- | ||
<item> | ||
<ref>extension/empStatus</ref> | ||
<valueEnumerationRef oid="3db10c46-23b1-11e8-be0c-a31e9d8ba9d8" /> | ||
</item> | ||
<item> | ||
<ref>telephoneNumber</ref> | ||
<help>Mobile Telephone Number</help> | ||
</item> | ||
<item> | ||
<ref>honorificSuffix</ref> | ||
<limitations> | ||
<layer>presentation</layer> | ||
<access> | ||
<read>true</read> | ||
<add>false</add> | ||
<modify>false</modify> | ||
</access> | ||
</limitations> | ||
</item> | ||
--> | ||
<!-- MID-101, LAB 10-3: End of comment --> | ||
</objectTemplate> |