LdapPersonAttributeDao query Principal ID substitution

View: New views
1 Messages — Rating Filter:   Alert me  

LdapPersonAttributeDao query Principal ID substitution

by Sean R. McNamara :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All,

I've been working on converting all our custom Principals to use the
Directory Person model -- the main goal being to get access to
additional Principal attributes from our custom directory software.  I'm
basing the attribute resolution code loosely on the
org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao , but I
can't seem to figure out exactly where or how the {0} 'variable' is
substituted for the Principal ID in the query property.

I adapting the example config
(http://www.ja-sig.org/wiki/display/CASUM/Attributes):

        <bean id="attribRepository"
                class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
                <property name="baseDN"
                        value="ou=people,o=company,c=fr" />
                <!-- This query is used to find the entry for populating attributes. {0} will be replaced by the new Principal ID extracted from the ldap-->
                <property name="query" value="(uid={0})" />

                <property name="contextSource" ref="contextSource" />
                <property name="ldapAttributesToPortalAttributes">
                        <map>
                                <!-- Mapping beetween LDAP entry's attributes (key) and Principal"s (value) -->
                                <entry key="cn" value="Name"/>
                                <entry value="Telephone" key="telephoneNumber" />
                                <entry value="Fax" key="facsimileTelephoneNumber" />
                        </map>
                </property>
        </bean>


Into:

       <bean id="attributeRepository"
                class="org.jasig.services.persondir.support.dnd.DNDPersonAttributeDao">
                <property name="query" value="{0}" />
                <property name="fieldsToAttributes">
                        <map>
                                <entry key="uid" value="uid" />
                                <entry key="lastname" value="lastname" />
                        </map>
                </property>
        </bean>




Everything seems swell until the point where the query attribute needs to be used, at which point I see that it's still set to it's
literal value:

DNDPersonAttributeDao: in getUserAttributesIfNeeded; about to query: {0}

Any one have any experience or thoughts on this?

Thanks!

..Sean.

_______________________________________________
cas-dev mailing list
cas-dev@...
http://tp.its.yale.edu/mailman/listinfo/cas-dev