Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand "dependent children" linked objects test
Project sub-orgs (project_users, project_groups) are automatically created/modified/deleted on project creation/rename/deletion.
- Loading branch information
Showing
5 changed files
with
228 additions
and
61 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
37 changes: 37 additions & 0 deletions
37
model/model-intest/src/test/resources/linked/archetype-project-groups.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,37 @@ | ||
<!-- | ||
~ Copyright (c) 2020 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
oid="a85bddc9-4ff0-475f-8ccc-17f9038d4ce1"> | ||
<name>project-groups</name> | ||
<documentation> | ||
"Groups" sub-org for project org. | ||
</documentation> | ||
|
||
<inducement> | ||
<focusMappings> | ||
<mapping> | ||
<strength>strong</strength> | ||
<expression> | ||
<script> | ||
<code> | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType | ||
|
||
ARCHETYPE_PROJECT_OID = '4d3280a1-6514-4984-ac2c-7e56c05af258' | ||
parent = midpoint.findLinkedTarget(OrgType.class, ARCHETYPE_PROJECT_OID) | ||
parent ? parent.name + '_groups' : null | ||
</code> | ||
</script> | ||
</expression> | ||
<target> | ||
<path>name</path> | ||
</target> | ||
</mapping> | ||
</focusMappings> | ||
</inducement> | ||
|
||
</archetype> |
37 changes: 37 additions & 0 deletions
37
model/model-intest/src/test/resources/linked/archetype-project-users.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,37 @@ | ||
<!-- | ||
~ Copyright (c) 2020 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
oid="3af67ba4-183f-45e7-887e-4ae5ddff4cdf"> | ||
<name>project-users</name> | ||
<documentation> | ||
"Users" sub-org for project org. | ||
</documentation> | ||
|
||
<inducement> | ||
<focusMappings> | ||
<mapping> | ||
<strength>strong</strength> | ||
<expression> | ||
<script> | ||
<code> | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType | ||
|
||
ARCHETYPE_PROJECT_OID = '4d3280a1-6514-4984-ac2c-7e56c05af258' | ||
parent = midpoint.findLinkedTarget(OrgType.class, ARCHETYPE_PROJECT_OID) | ||
parent ? parent.name + '_users' : null | ||
</code> | ||
</script> | ||
</expression> | ||
<target> | ||
<path>name</path> | ||
</target> | ||
</mapping> | ||
</focusMappings> | ||
</inducement> | ||
|
||
</archetype> |
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
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