How to create reference of ITeamRepository, IProjectArea and IProgressMonitor
Hi All,
I am following this link "https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/"
I am getting trouble in main method. It is asking me to create objects of TeamRepository, IProjectArea and IProgressMonitor.
for IProgressMonitor I found following way to create object.
"IProgressMonitor monitor = new NullProgressMonitor();"
but I am unable to figure out how to create objects of ITeamRepository and IProjectArea.
can anyone please tell me how can I do this in this context.
Thanks
|
3 answers
Ralph Schoon (63.5k●3●36●46)
| answered Jul 29 '15, 8:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
See the code for main in https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ or download any code attached to any of the client API example e.g. https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ or look into https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation the Plain-Java Client section or look into the snippets that come with the Plain Java API for example code for the basics needed in main.
Comments
Ralph Schoon
commented Jul 29 '15, 9:42 a.m.
| edited Jul 29 '15, 9:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
How to create a project area is described here: https://rsjazz.wordpress.com/2013/09/18/deploying-templates-and-creating-projects-using-the-plain-java-clients-library/ which is actually the post that is mentioned to be read in the one you mention and that shows how to create a project area and also shows the other code you are missing. Usually you don't create them, but you search for them as explained in other posts in the blog.
|
If you are using Plain Java API, you obtain the ITeamRepository instance logging in to the repository:
ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(repoURI);
You can refer to https://jazz.net/wiki/bin/view/Main/BuildJavaProgrammingExamples#First_things_First_Connecting_to for a fully Java client example.
Once you got the repo connection, you can obtain a IProjectArea instance from a project area name using the repository client services:
IProcessClientService processClient = (IProcessClientService) repo.getClientLibrary(IProcessClientService.class);You will find a lot of examples on wiki as well as on forum! And on Ralph Schoon's blog, too ;)
Cheers.
|
Hi,
I looked into some example to learn how to create ITeamRepository and IProjectArea object.
In many example I seen them declared exact same way "SEC Servizi" mentioned in his answer. That was useful. Example provided on "https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/" link I tried to run it.
I figured that new three components will be created but as my code is not running properly I am unable to see its output.
Could anybody please tell me what happens when we run this code.
Comments This is an iterative process.
This is something you have to do on your own. Doing this on the forum, if you have not even understood the very basics is just not possible.
|
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.