grouper-users - RE: [grouper-users] Using JEXL in source's Description attribute
Subject: Grouper Users - Open Discussion List
List archive
- From: Gagné Sébastien <>
- To: "Francesco Malvezzi" <>, <>
- Subject: RE: [grouper-users] Using JEXL in source's Description attribute
- Date: Mon, 24 Sep 2012 13:24:30 -0400
Thanks for the information, I was able to test my JEXL, but my problem is
somewhat different
First my working JEXL
Defined as the following, my virtual attribute does work :
<init-param>
<param-name>subjectVirtualAttribute_0_descriptionUnique</param-name>
<param-value>${subject.getAttributeValue('displayName')}
(${subject.getAttributeValue('sAMAccountName')})</param-value>
</init-param>
gsh 1% sub = SubjectFinder.findById("gagns")
subject: id='gagns' type='person' source='ldap' name='Gagne Sebastien Display
Name'
gsh 3% sub.getAttributeValue("descriptionUnique")
Gagne Sebastien (gagns)
But my problem is that I cannot use that virtual attribute as the subject's
description. Even before the UI configurations, the Subject API is dropping
the subjects with identical descriptions.
With description = sAMAccountName (note the same name is there 3 time):
gsh 5% ss = SubjectFinder.findAll("marchanr")
subject: id='marchanr' type='person' source='ldap' name='Marchand Robert 0'
subject: id='marchanr2' type='person' source='ldap' name='Marchand Robert'
subject: id='marchanr3' type='person' source='ldap' name='Marchand Robert'
subject: id='marchanr4' type='person' source='ldap' name='Marchand Robert'
With description = displayName (I'm missing #3 and #4 since it's the same
displayName) :
gsh 1% ss = SubjectFinder.findAll("marchanr")
subject: id='marchanr' type='person' source='ldap' name='Marchand Robert 0'
subject: id='marchanr2' type='person' source='ldap' name='Marchand Robert'
With description = descriptionUnique (my virtual attribute) :
gsh 1% ss = SubjectFinder.findAll("marchanr")
subject: id='marchanr2' type='person' source='ldap' name='Marchand Robert'
I only get one result because the description is empty if I use the virtual
attribute :
gsh 1% sub = SubjectFinder.findById("gagns")
subject: id='gagns' type='person' source='ldap' name='Gagne Sebastien Display
Name'
gsh 2% sub.id
gagns
gsh 3% sub.name
Gagne Sebastien Display Name
gsh 4% sub.description
gsh 5% sub.description.length()
0
-----Message d'origine-----
De :
[mailto:]
De la part de Francesco Malvezzi
Envoyé : 24 septembre 2012 02:43
À :
Objet : Re: [grouper-users] Using JEXL in source's Description attribute
Il 22/09/2012 15:42, Gagné Sébastien ha scritto:
> Hi,
>
> Regarding my previous post about identical Description results being
> dropped from search, I'm trying to combine the user's displayName and
> Login into the description, but so far I've failed.
>
>
>
> I tried using JEXL straight in the description attribute and it didn't
> work :
>
> <init-param>
>
> <param-name>Description_AttributeType</param-name>
>
>
> <param-value>${subject.getAttributeValue('displayName')}</param-value>
>
> </init-param>
>
>
>
> I tried using a virtual attribute, but it didn't work :
>
> <init-param>
>
>
> <param-name>subjectVirtualAttribute_0_descriptionUnique</param-name>
>
>
> <param-value>${subject.getAttributeValue('displayName')}</param-value>
>
> </init-param>
I am using this one (sources.xml, inside my ldap source):
<init-param>
<param-name>subjectVirtualAttribute_1_displayName0</param-name>
<param-value>${subject.name}, ${subject.description}</param-value>
</init-param>
You could test this is in gsh with:
subject.getAttributeValue("displayName0")
I had to edit the file:
/opt/grouper.ui/conf/resources/grouper/media.properties in these section
(very scattered)
subject.display.default=displayName0
[...]
#grouperUi.subjectImg.sourceId.0 = pennperson
#grouperUi.subjectImg.image.0 = user.png ## screen EL has "subject" as an
object
#grouperUi.subjectImg.screenEl.0 = ${subject.description}
grouperUi.subjectImg.sourceId.0 = unimore #is my name of the ldap source
grouperUi.subjectImg.image.0 = user.png
# screen EL has "subject" as an object
grouperUi.subjectImg.screenEl.0 =
${subject.getAttributeValue("displayName0")}
regards,
Francesco
- [grouper-users] Using JEXL in source's Description attribute, Gagné Sébastien, 09/22/2012
- Re: [grouper-users] Using JEXL in source's Description attribute, Francesco Malvezzi, 09/24/2012
- RE: [grouper-users] Using JEXL in source's Description attribute, Gagné Sébastien, 09/24/2012
- Re: [grouper-users] Using JEXL in source's Description attribute, Dominique Petitpierre, 09/24/2012
- RE: [grouper-users] Using JEXL in source's Description attribute, Gagné Sébastien, 09/24/2012
- Re: [grouper-users] Using JEXL in source's Description attribute, Francesco Malvezzi, 09/24/2012
Archive powered by MHonArc 2.6.16.