[midPoint] groovy , mulitple intents

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Wed Jan 23 09:38:46 CET 2019


Hi!

I'd rather use different objectClass for this.
You will not be bound to the intent name.

Regards,
WS

W dniu 22.01.2019 o 17:53, Jason Everling pisze:
> Within the scriptedsql groovy scripts, can intent be used? It's the first of this for me, something like
> 
> if (intent == 'manager') {
> switch (objectClass) {
>      case "__ACCOUNT__":
>      sql.eachRow("SELECT * FROM table ORDER BY id",
> {result.add([__UID__:it.id <http://it.id>, __NAME__:it.id <http://it.id>,id:it.id <http://it.id>,firstname:it.firstname,lastname:it.lastname,memberOf:it.memberOf.split(";") as List])}
>      );
>      break
>      default:
>      result;
> }
> return result;
> } else {
> switch (objectClass) {
>      case "__ACCOUNT__":
>      sql.eachRow("SELECT * FROM table2 ORDER BY id",
> {result.add([__UID__:it.id <http://it.id>, __NAME__:it.id <http://it.id>,__ENABLE__:!(it.disabled as Boolean),id:it.id <http://it.id>,firstname:it.firstname,initials:it.initials,lastname:it.lastname,memberOf:it.memberOf.split(";") as List])}
>      );
>      break
> case "Organization":
>      sql.eachRow("SELECT * FROM orgs ORDER BY guid",
> {result.add([__UID__:it.orgs, __NAME__:it.org <http://it.org>,orgs:it.org <http://it.org>,identifier:it.identifier,description:it.description])}
>      );
>      break
>      default:
>      result;
> }
> return result;
> }
> 
> JASON
> 
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
> 

-- 
Wojciech Staszewski
Administrator Systemów Sieciowych
tel. kom: 663 680 236
www.diagnostyka.pl
Diagnostyka Sp. z o. o.
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków
Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)
NIP: 675-12-65-009; REGON: 356366975
Kapitał zakładowy: 33 756 500 zł.

Pomyśl o środowisku zanim wydrukujesz ten e-mail.



More information about the midPoint mailing list