IWorkspaceHandle and IVersionableHandle?
![]()
Murad Korejo (26●9●9)
| asked Oct 04 '10, 12:25 p.m.
retagged Dec 02 '13, 3:11 p.m. by David Lafreniere (4.8k●7)
Hi,
I'm looking at the first code snippet on this page: https://jazz.net/wiki/bin/view/Main/RTCSDK20_SourceControl ITeamRepository repo = ...; IVersionableHandle versionableHandle = ...; //fetch workspace from IItemManager IItemManager itemManager = repo.itemManager(); IWorkspace workspace = (IWorkspace) itemManager.fetchCompleteItem(workspaceHandle, monitor); //fetch workspace connection from IWorkspaceManager IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repo); IWorkspaceConnection workspaceConnection = workspaceManager.getWorkspaceConnection(workspaceHandle, monitor); //fetch a list of components from IItemManager List<IComponentHandle> componentHandles = workspace.getComponents(); List<IComponent> components = itemManager.fetchCompleteItems(components, componentHandles); //fetch a versionable from IConfiguration IComponentHandle componentHandle = components.get(0); IConfiguration configuration = workspaceConnection.configuration(componentHandle); IVersionable versionable = configuration.fetchCompleteItem(versionable); //cast IVersionable to IFileItem if (IFileItem.ITEM_TYPE.equals(versionable.getItemType())) { IFileItem file = (IFileItem) versionable; } Can someone please clarify the purpose of IWorkspaceHandle and IVersionableHandle? How should I initialize workspaceHandle and versionbleHandle? Thanks! |
3 answers
![]()
Michael Valenta (3.7k●3)
| answered Oct 05 '10, 8:55 a.m.
FORUM MODERATOR / JAZZ DEVELOPER edited Oct 13 '17, 3:28 p.m. by David Lafreniere (4.8k●7) I suspect that the code snippet assumes that you already have a handle
Comments I am trying to access the source files that are in the repositry.
Hi there,
|
![]()
I found that this helps too for accessing source files :)
http://jazz.net/forums/viewtopic.php?t=10310&highlight=ifileitem |