need to connect with stream without using workspace
We are downloading one file from RTC server for this we are connecting with workspace(made in RTC UI) and getting particular components from there....
IWorkspaceManager manager = SCMPlatform.getWorkspaceManager(repo);
// Find the named workspace
IWorkspaceSearchCriteria cri = IWorkspaceSearchCriteria.FACTORY
.newInstance();
cri.getFilterByOwnerOptional().add(repo.loggedInContributor());
String wsName = "st14698_HSM_CVV_159515 ESB Gold V2.0 DIT Development Stream Workspace"; //made in RTC repository
cri.setExactName(wsName);
List<IWorkspaceHandle> findWorkspaces = manager.findWorkspaces(cri,
2, null);
if (findWorkspaces.size() == 0) {
System.err.println("Couldn't find any workspaces named \""
+ wsName + "\"");
}
if (findWorkspaces.size() > 1) {
System.err.println("Multiple workspaces named \"" + wsName
+ "\"");
}
IWorkspaceConnection connection = manager.getWorkspaceConnection(
findWorkspaces.get(0), null);
IComponentSearchCriteria componentSearchCriteria = IComponentSearchCriteria.FACTORY
.newInstance();
componentSearchCriteria
.setExactName("com.citi.rb.esb.gold.bw.securitybrokerage.xslt.component");
list = manager.findComponents(componentSearchCriteria,
Integer.MAX_VALUE, null);
if (list.size() == 0)
System.out.println("no components");
if (list.size() > 1)
System.out.println("more than one");
How can we use stream instead of workspace to connect directly without using workpsace...as its created by us... for everty changes i think we need to reload the same..
Thanks,
Sumit
|
One answer
the UI model is similar to the other SCM tools.. you cannot change files in the trunk/stream directly, you have to go thru a copy (branch/workspace)..
now, if you want to write code, then u could go directly to the stream and get the file. the RTC object is an IWorkspace. there is a flag that says if it is a Stream or not. otherwise they are identical. |
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.