<?xml version="1.0" encoding="UTF-8"?>
<agent-config>
  <objectMapping condition="" soffidObject="account" systemObject="account">
    <property name="keyAttribute" value="userName"/>
    <property name="path" value="/Users"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="accountName" systemAttribute="userName"/>
    <attributeMapping direction="OUTPUT" soffidAttribute="&quot;Shared account&quot;" systemAttribute="name{&quot;familyName&quot;}"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="accountDescription" systemAttribute="name{&quot;givenName&quot;}"/>
    <attributeMapping direction="OUTPUT" soffidAttribute="password" systemAttribute="password"/>
  </objectMapping>
  <objectMapping condition="!grantedAccountNames.isEmpty()" soffidObject="role" systemObject="role">
    <property name="keyAttribute" value="displayName"/>
    <property name="path" value="/Groups"/>
    <attributeMapping direction="OUTPUT" soffidAttribute="name" systemAttribute="displayName"/>
    <attributeMapping direction="OUTPUT" soffidAttribute="if (roleId == null) 
   return null;

v = new java.util.Vector ();
Collection accountList = serverService.getRoleAccounts(roleId, system);
for (account: accountList) 
{
   soffidAccount = new es.caib.seycon.ng.sync.engine.extobj.
       AccountExtensibleObject(account, serverService);   
   systemAccount = dispatcherService
        .search (dispatcherService.soffidToSystem (soffidAccount));
   map = new java.util.HashMap();
   map.put (&quot;value&quot;, systemAccount{&quot;id&quot;});
   map.put (&quot;display&quot;, systemAccount{&quot;userName&quot;});
   v.add (map);
}
return v;" systemAttribute="members"/>
    <attributeMapping direction="INPUT" soffidAttribute="description" systemAttribute="displayName"/>
    <attributeMapping direction="INPUT" soffidAttribute="name" systemAttribute="displayName.contains(&quot;/&quot;) ? 
  displayName.substring (displayName.indexOf(&quot;/&quot;)+1) : 
  displayName"/>
  </objectMapping>
  <objectMapping condition="" soffidObject="user" systemObject="user">
    <property name="path" value="/Users"/>
    <property name="keyAttribute" value="userName"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="lastName2" systemAttribute="name{&quot;middleName&quot;}"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="accountDescription" systemAttribute="displayName"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="fullName" systemAttribute="name{&quot;formatted&quot;}"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="lastName" systemAttribute="name{&quot;familyName&quot;}"/>
    <attributeMapping direction="INPUT" soffidAttribute="primaryGroup" systemAttribute="departmentNumber == null ? &quot;enterprise&quot; : departmentNumber"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="attributes{&quot;employeeNumber&quot;}" systemAttribute="employeeNumber"/>
    <attributeMapping direction="OUTPUT" soffidAttribute="l = new java.util.LinkedList(); 
if (shortName!=null &amp;&amp; mailDomain != null) {
   s = new java.util.HashSet(); 
   s.put(&quot;value&quot;,
           shortName+&quot;@&quot;+mailDomain); 
   s.put (&quot;type&quot;, &quot;work&quot; );
   l.add(s);
}
if (attributes{&quot;MAIL&quot;} != null) {
   s = new java.util.HashSet(); 
   s.put(&quot;value&quot;, attributes{&quot;EMAIL&quot;})
   s.put (&quot;type&quot;, &quot;home&quot; );
   l.add(s);
}
return l;" systemAttribute="emails"/>
    <attributeMapping direction="OUTPUT" soffidAttribute="primaryGroup" systemAttribute="departmentNumber"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="attributes{&quot;employeeType&quot;}" systemAttribute="employeeType"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="accountName" systemAttribute="externalId"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="givenName" systemAttribute="name{&quot;givenName&quot;}"/>
    <attributeMapping direction="INPUTOUTPUT" soffidAttribute="accountName" systemAttribute="userName"/>
  </objectMapping>
</agent-config>