> On Oct 18, 2016, at 9:47 AM, Patrick Brunmayr <p.brunm...@linzag.at> wrote:
> The questions is more where to make these changes! Is it useful to have some 
> more generic methods on the User class like
> *   getObjectClass
> *   getAuxClasses
> *   setAuxClasses
> *   hasAuxClass
> *   getAttributes
> *   getAttribute
> *   setAttribute
> *   hasAttribute
> Is this to LDAP specific ?

Yes.  As a general rule we try to keep the ldap smell out of the api exposed to 
the caller.  

My thoughts were more along the lines that you extend the user entity with your 
custom attributes.


public class MyUser extends User


> On Oct 18, 2016, at 9:47 AM, Patrick Brunmayr <p.brunm...@linzag.at> wrote:
> Or another approach would be to have some kind of Eventlistener to react on 
> the add and update methods. There
> you get an LDAP connection and the user object as parameters. You can then 
> implement your custom logic there.
> More generic is to have access to the methods above and the add and update 
> methods must check the extra
> aux classes and attributes and reflect them back into LDAP.
> Would be nice to have some kinde of configuration which extra classes to 
> handle in the web UI. Then there
> should be a the possibility to edit there attributes if its not much effort.

Yeah listener or callback that is registered.  i.e. myUserHandler (LDAPEntry 
le, User ue)

then you simply add the attributes that are needed by upcasting to your 
extended user object grabbing the attributes, adding to entry, and returning 
control to main method. 

The web UI is a separate matter.  Doable, but not as simple.  Care would have 
to be taken to make it easy to upgrade.


Reply via email to