Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <mapping>
- <name>PERS User Assignment Mapping</name>
- <strength>strong</strength>
- <expression>
- <script>
- <code>
- import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType;
- import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;
- import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType;
- import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType;
- import java.util.*;
- <!-- Get role -->
- role = midpoint.searchObjectByName(RoleType.class, "role_account_pers");
- if(role != null)
- {
- roleOrt = new ObjectReferenceType();
- roleOrt.setOid(role.getOid());
- roleOrt.setType(RoleType.COMPLEX_TYPE);
- <!-- build assignment -->
- AssignmentType assignment = new AssignmentType();
- assignment.asPrismContainerValue()
- assignment.setTargetRef(roleOrt);
- return assignment
- }
- </code>
- </script>
- </expression>
- <target>
- <path>assignment</path>
- </target>
- </mapping>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement