AnsweredAssumed Answered

OpenLDAP adding custom property

Question asked by power on May 30, 2012
I am using alfresco enterprise 4.0
Using OpenLDAP.

I need to integrate my custom property and need to do sync with alfresco person object.
my custom property is : [clm:userEnterpriNum] which is not available in openLdap but thorugh query I am getting that enterprise number.
alfresco having one custom property clm:userEnterpriNum which we applied as aspect for user object.

How do I sync that property in alfresco person object.

I followed below steps :

step 1 :  making respective entry in  common-ldap-context.xml for  <bean id="userRegistry" class="org.alfresco.repo.security.sync.ldap.LDAPUserRegistry">

<property name="enterpriseNumberQuery">
            <value>${ldap.synchronization.enterpriseNumberQuery}</value>
</property>

<entry key="clm:userEnterpriNum">
                    <value>${ldap.synchronization.userEnterpriseNumberAttributeName}</value>
</entry>



step 2 : making entry of key in ldap-authentication.properties file

ldap.synchronization.userEnterpriseNumberAttributeName=description
ldap.synchronization.enterpriseNumberQuery=<my query>


I am getting error :
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'enterpriseNumberQuery' of bean class [org.alfresco.repo.security.sync.ldap.LDAPUserRegistry]: Bean property 'enterpriseNumberQuery' is not writable or has an invalid setter method.
        at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1024)
        at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:903)
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76)
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1358)

Any idea, how to include my custom property and sync to repository for user object.

Thanks in advance.

Outcomes