It's all about the answers!

Ask a question

Java API - How to get a Contributor by Name?


Cliff Gardiner (5439) | asked Jan 26, 3:54 p.m.

Hello,
working with both CLM 4.0.7 and 6.0.3, I'm building some code to get Contributors, and if they cannot be found import them from LDAP, as part of a user management utility.  I know how to get all users for the repository or specific users by ID but there is no method in teamRepository.contributorManager to fetch Contributors by name.  I would expect there to be one that returns a list, but no luck.

Does anyone know of a way to do this?  Something internal (again) perhaps?  I want to avoid fetching all (thousands) of users then interrogating that list to see if a user is present, if at all possible, as that's a really inelegant solution and will surely gobble up a lot of RAM (I've no idea how much per 1000 Contributors, say).

Can anyone help?


Comments
Ralph Schoon commented Jan 27, 4:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 I don't have an answer. I don't think there is a simple method. Note that you might only get contributor handles and you could resolve them in batches. You can check if contributors have a supporting QueryModel.ROOT and try if that allows to query and search by name.


Cliff Gardiner commented Jan 27, 3:12 p.m.

Thanks Ralph, that's pretty much what I suspected.  To me this an obvious thing to want to do - my organisation, and I'm sure many others, have codified userIDs so if that's not provided, being able to search on name, as you can through an RTC client, is crucial.  This is also why I was wondering if there's an internal method - we have to resort to internal for certain other common admin functions ....

I'll try your suggestion though I confess I'm not optimistic!

Accepted answer


permanent link
Ralph Schoon (47.1k13440) | answered Feb 14, 9:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Cliff, please find the answer to your question here: 

Query Models or how to find stuff in the RTC API

Cliff Gardiner selected this answer as the correct answer

Comments
Cliff Gardiner commented Feb 15, 3:18 a.m.

Marvellous, thanks Ralph.  What would we do without you?

Your answer


Register or to post your answer.