[midPoint] groovy , mulitple intents
Jason Everling
jeverling at bshp.edu
Wed Jan 23 22:19:08 CET 2019
Thanks for the suggestion. I was thinking of going that route but this
resource has 5 different intents already, faculty, staff, student, alumni,
and administration. Maybe when I have the time to re-build this resource I
will use classes instead of intents. For now I just combined all the
different query types into a large view
JASON
On Wed, Jan 23, 2019 at 2:39 AM Wojciech Staszewski <
wojciech.staszewski at diagnostyka.pl> wrote:
> 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.
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190123/2b69aa99/attachment.htm>
More information about the midPoint
mailing list