It's all about the answers!

Ask a question

Using the SDK


Mike Sava (611) | asked Feb 22 '12, 1:07 p.m.
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.

13 answers



permanent link
Donald Faul (21122) | answered May 31 '12, 11:39 a.m.
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

Sam, unfortunately, the com.ibm.team.repository.common.IContributor methods to create a new user account don't pick up the Default license type as set in the JTS license administrator, so this assignment will need to made another way.

permanent link
Ralph Schoon (63.1k33646) | answered May 24 '12, 9:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In addition this overview on extending: https://jazz.net/library/article/784
and this workshop https://jazz.net/library/content/articles/rtc/3.0.1/extensions-workshop/ should get you started.

The workshop works best for me, setting up the environment.

permanent link
sam detweiler (12.5k6195201) | answered May 24 '12, 8:59 a.m.
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


see
https://jazz.net/wiki/bin/view/Main/RTCSDK20_DevelopmentEnvironmentSetup

permanent link
kavita herur (5876593) | answered May 24 '12, 6:54 a.m.
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

permanent link
sam detweiler (12.5k6195201) | answered May 23 '12, 10:55 a.m.
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

permanent link
Ralph Schoon (63.1k33646) | answered May 23 '12, 10:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Yes, that is there for some time now, it addresses some use cases. I wasn't sure about yours.

permanent link
sam detweiler (12.5k6195201) | answered May 23 '12, 10:05 a.m.
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

permanent link
Ralph Schoon (63.1k33646) | answered May 23 '12, 9:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

permanent link
sam detweiler (12.5k6195201) | answered May 23 '12, 9:06 a.m.
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

permanent link
Ralph Schoon (63.1k33646) | answered May 23 '12, 2:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

Your answer


Register or 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.