Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



13 answers

Permanent link
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!

0 votes


Permanent link
David,

thanks for the info..i appreciate it.

0 votes


Permanent link
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?

0 votes


Permanent link
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.

0 votes


Permanent link
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

0 votes


Permanent link
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


// 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.

0 votes


Permanent link
thx.. it might be simpler also.. it seems the JTS has support for a 'default' license type for new user creates/imports..
(last item in the Jts Admin, License Admin page

Sam

0 votes


Permanent link
Yes, that is there for some time now, it addresses some use cases. I wasn't sure about yours.

0 votes


Permanent link
Yes, that is there for some time now, it addresses some use cases. I wasn't sure about yours.


Looks like this feature will do the work for the default license type configuration

Sam

0 votes


Permanent link
Hi All,
As i am newbee to RTC. I want to modify the RTC code for one instance. But i am not aware of what is RTC server instance and how it is linked to project area. How to apply these chages made by features and plugin jar files to server.
please share knowldge on this.

Thanks,
Kavita

0 votes

1–15 items
page 1of 1 pagesof 2 pages

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,929

Question asked: Feb 22 '12, 1:07 p.m.

Question was seen: 10,035 times

Last updated: Feb 22 '12, 1:07 p.m.

Confirmation Cancel Confirm