<div dir="ltr"><div>Hi all,</div><div><br></div><div>I want to write a connector which will work with attributes of midPoint Users and Services. In my CreateOP I need to do something like the following pseudocode:</div><div><br></div>Uid create(oc, attr, oo) {<div>    if (<a href="http://attr.name">attr.name</a> from User){</div><div>        doCreateUser(<a href="http://attr.name">attr.name</a>);</div><div>    }</div><div>    else{</div><div>        doCreateService(<a href="http://attr.name">attr.name</a>);</div><div>    }</div><div>}</div><div><br></div><div><br><div>The problem is that I can't distinguish between attribute __name__ of User and Service. They both have the same name so I can't call the proper function. Is there a way to distinguish them using only one connector? (I know I can do it easily by implementing two connectors)</div><div><br></div><div>I tried to solve it using two ObjectClasses but I can't figure out how to setup SchemaHandler so User maps to UserClass and Service maps to ServiceClass. They both map to the one which I set as default.</div><div><br></div><div><div><schemaHandling></div><div>      <objectType></div><div>         <kind>account</kind></div><div>         <intent>Service</intent></div><div>         <displayName>Service</displayName></div><div>         <default>false</default></div><div>         <objectClass>ri:ServiceClass</objectClass></div><div>         <attribute></div><div>            <c:ref>icfs:name</c:ref> </div><div>            <tolerant>true</tolerant></div><div>            <exclusiveStrong>false</exclusiveStrong></div><div>            <outbound></div><div>               <authoritative>true</authoritative></div><div>               <exclusive>false</exclusive></div><div>               <strength>normal</strength></div><div>               <source></div><div>                  <c:path>name</c:path>      ###<i>(here I need it to map icfs:name of Service)</i></div><div>               </source></div><div>            </outbound></div><div>         </attribute></div><div>      </objectType></div><div>      <objectType></div><div>         <kind>account</kind></div><div>         <intent>User</intent></div><div>         <displayName>User</displayName></div><div>         <default>true</default></div><div>         <objectClass>ri:UserClass</objectClass></div><div>         <attribute></div><div>            <c:ref>icfs:name</c:ref></div><div>            <tolerant>true</tolerant></div><div>            <exclusiveStrong>false</exclusiveStrong></div><div>            <outbound></div><div>               <authoritative>true</authoritative></div><div>               <exclusive>false</exclusive></div><div>               <strength>normal</strength></div><div>               <source></div><div>                  <c:path>name</c:path>      ###<i>(here I need it to map icfs:name of User)</i></div><div>               </source></div><div>            </outbound></div><div>         </attribute></div><div>      </objectType></div><div>   </schemaHandling></div></div><div><br></div><div><br></div><div>Thank you for your answers,</div><div><br></div><div>Jiri</div><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Jiří Brom<br><br>e-mail: <a href="mailto:bromjiri@gmail.com" target="_blank">bromjiri@gmail.com</a><br>CZ: +420723860707<br>AT: +436607144324</div></div></div>
</div></div>