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

How to load a workspace component wise using java api

Till now i have been using scm load command to load a workspace component wise ...but now i need to perform the same operation using a java api ..can anyone suggest a solution for this ....to load a workspace component wise in a local folder using a java api ..

I am using this way to load a workspace thru java api ..

1) IFilesystemRestClient client = (IFilesystemRestClient ) teamRepository.getClientLibrary(IFilesystemRestClient .class);
2) ParmsLoad plo = new ParmsLoad();
3) plo.backupDilemmaHandler = new ParmsBackupDilemmaHandler();
4) plo.backupDilemmaHandler.backupEnabled = false;
5) plo.componentVersionablesToLoad = new ParmsLoadComponentVersionables[] {new ParmsLoadComponentVersionables()};
6)plo.componentVersionablesToLoad.sandboxPath = subfolder; //selected path
7)
// plo.componentVersionablesToLoad.componentItemId = component.getItemId().getUuidValue(); // component you want to load

8) try{
9) client.getLoadCFA(plo,null);
10) flag =1;
}
11) catch(Exception e){
12) System.out.println(e);
// load 1 component at a time
13) loop
14) //list of components
plo.componentVersionablesToLoad.componentItemId = component.getItemId().getUuidValue(); // component you want to load
15) client.postLoadCFA(plo, null);

//unload it
loop;
}
16) if(flag==0){
// load the entire workspace
17) client.postLoadCFA(plo, null);

//unload it
}
But here i just want to know that

1) how to intialize client (as its value is null) after the line 1.
2) does client.postLoadCFA() loads all components by default i.e if i dont write statement 7 , as in case of no collision i want the enitre workspace to load

0 votes


Be the first one to answer this question!

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,938

Question asked: May 10 '10, 1:53 a.m.

Question was seen: 4,985 times

Last updated: May 10 '10, 1:53 a.m.

Confirmation Cancel Confirm