It's all about the answers!

Ask a question

How to share a project in Jazz source control programatically?


Ratheesh P (3546) | asked Sep 20 '13, 9:15 a.m.
I am writing an rtc (v4.0.1) eclipse client extension to create local repository workspace and share that as a C project in eclipse.
I could create workspace and add as a C project, but could not find an API to share it in Jazz source control.
It can be easily done by right clicking on this C project and then selecting "Team" > "Share".
Can any one mention  what is the java API to do this programatically?

Comments
Geoffrey Clemm commented Sep 11 '15, 8:59 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note: I've moved the follow-up question: https://jazz.net/forum/questions/206092 to its own question.

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Sep 20 '13, 10:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On a second thought, if you are in Eclipse, you can try to find the sharing wizard that is called and simply find the code that does the sharing and supply the correct information in your automation.
Ratheesh P selected this answer as the correct answer

One other answer



permanent link
Ralph Schoon (63.1k33645) | answered Sep 20 '13, 9:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Ratheesh,

what I did for a similar problem, is:
  • Iterate the file structure
  • Look up if folders in SCM exist in the component. If not create the IFolder
  • Look if the files exist and if not create the IFileItem
  • Store the content for the IFileItem and compar the content of the IFileItem, if that existed.
  • Deliver the file content if it is different to the existing one
  • Deliver all changes
  • create a baseline.

I plan to post some of the code in my blog later this month.



Comments
Ralph Schoon commented Sep 20 '13, 9:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't know if there is a unique share API call. You could try to debug what the share call does in the RTC Eclipse client.

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.