Using the SDK
I would like to programmatically update the User profile. After downloading the SDK for version 3.0.1 I couldn't find any documentation on how to connect and use the SDK outside of eclipse.
The first question is: Can you update the user information with an API (SDK or REST/SOAP)? If so, what's the mechanism?
Thanks.
The first question is: Can you update the user information with an API (SDK or REST/SOAP)? If so, what's the mechanism?
Thanks.
13 answers
If you want to create a stand alone application that will access RTC server, you should use the plain java library. (some snippets are included)
You can download the libary as well as some documentation at https://jazz.net/downloads/rational-team-concert/releases/3.0.1.2?p=allDownloads under the plain zip section
The SDK is meant to be used for extending/adding functionality to the RTC client/server.
For additional info:
https://jazz.net/wiki/bin/view/Main/RtcSdk30
https://jazz.net/wiki/bin/view/Main/RtcSdk20
and this forum
Now to answer your question;
Yes you should be able to udate user info using either the library or the SDK (Don't know about REST/SOAP, never tried it)
I personally never tried to update user info, but I've some experience accessing it. You should look for IContributor class since it represent a user in RTC.
Hope this gets you started!
You can download the libary as well as some documentation at https://jazz.net/downloads/rational-team-concert/releases/3.0.1.2?p=allDownloads under the plain zip section
The SDK is meant to be used for extending/adding functionality to the RTC client/server.
For additional info:
https://jazz.net/wiki/bin/view/Main/RtcSdk30
https://jazz.net/wiki/bin/view/Main/RtcSdk20
and this forum
Now to answer your question;
Yes you should be able to udate user info using either the library or the SDK (Don't know about REST/SOAP, never tried it)
I personally never tried to update user info, but I've some experience accessing it. You should look for IContributor class since it represent a user in RTC.
Hope this gets you started!
There is a nice article written by IBM:
http://www.ibm.com/developerworks/rational/library/automate-management-rational-team-concert-users/index.html#author1
describing some basics code snippets for using a java application with the RTC SDK 3.0.1.3 to add, archive, and restore users accounts.
In viewing other older jazz.net threads I am uncertain that the RTC SDKcan be used for handling listing and setting the floating license(s) associated with a user account.
Does anyone have any code snippets that would outline how this would be done, if it is indeed possible? Does the presence of the class
com.ibm.team.repository.services.internal.license.LicenseAdminRestService indicate that support is now available in the RTC SDK to handle the floating licenses associated with user accounts?
http://www.ibm.com/developerworks/rational/library/automate-management-rational-team-concert-users/index.html#author1
describing some basics code snippets for using a java application with the RTC SDK 3.0.1.3 to add, archive, and restore users accounts.
In viewing other older jazz.net threads I am uncertain that the RTC SDKcan be used for handling listing and setting the floating license(s) associated with a user account.
Does anyone have any code snippets that would outline how this would be done, if it is indeed possible? Does the presence of the class
com.ibm.team.repository.services.internal.license.LicenseAdminRestService indicate that support is now available in the RTC SDK to handle the floating licenses associated with user accounts?
The SDK contains ILicenseService.class and the Plain Java Client Library has ILicenseClient.class. The SDK also contains some unit tests around it. The ILicenseClient.class is doumented in the Plain Java Client Library Javadoc. I would assume that you can manage licenses with the client libraries, especially since the Eclipse Client allows to do it.
The rest service is internal and I would avoid trying to use it.
The rest service is internal and I would avoid trying to use it.
the ILicenseClient and ILicenseService classes allow you to CHECK the contributor license type.. but not SET it..
I work with Don..
We are trying to automate user addition to RTC from our HR feed/ldap system. and assign a Stakeholder license.
so, if there is some other way to help with this we're all ears
Sam
I work with Don..
We are trying to automate user addition to RTC from our HR feed/ldap system. and assign a Stakeholder license.
so, if there is some other way to help with this we're all ears
Sam
If you SHIFT-ALT-F1 (Plugin Spy) on the contributor editor in an Eclipse that has the SDK deployed, you can look at the code. In package com.ibm.team.process.internal.ide.ui.editors.contributor.ContributorEditor you will find
Not sure that is available in the Plain Java Client Libraries, but you could try.
I have not tried this myself. I was just spying so to speak.
// Apply license changes
LicenseAdminLibrary licenseAdminLibrary = new LicenseAdminLibrary(repository);
IProgressMonitor licenseMonitor = new SubProgressMonitor(monitor, context.fModifiedLicenses.size() * 1000);
IContributorLicenseType[] availableLicenseTypes = context.fAvailableLicenseTypes;
List<IContributorLicenseType> licensesToAdd = new ArrayList<IContributorLicenseType>();
for (int i = 0; i < availableLicenseTypes.length; i++) {
IContributorLicenseType license = availableLicenseTypes[i];
Boolean value = (Boolean) context.fModifiedLicenses.get(license);
if (Boolean.TRUE.equals(value)) {
//just put it in the list and process it later so that all of
//the removes are done before any add
licensesToAdd.add(license);
licensesChanged = true;
} else if (Boolean.FALSE.equals(value)) {
licenseAdminLibrary.unassignLicense(contributor, license.getId(), new SubProgressMonitor(licenseMonitor, 1000));
licensesChanged = true;
context.fModifiedLicenses.put(license, null);
} else {
licenseMonitor.worked(1000);
context.fModifiedLicenses.put(license, null);
}
}
//now do the adds
......
Not sure that is available in the Plain Java Client Libraries, but you could try.
I have not tried this myself. I was just spying so to speak.
page 1of 1 pagesof 2 pages