Persistable handles for various items
Hello,
One of our requirements is that we record which stream, component, baseline an eclipse project is coming from, and record it for later use. Later use being that we could reconnect back to the stream, create branches etc. from the recorded information. Though the streams, components, baselines have IDs, UIDs, etc., there seems to be no easy way to retrieve information about a stream, component, baseline except by using their names. Ex: IWorkspaceManager.findAllWorkspaces(IAuditableHandle scopeHandle, String namePattern, IProgressMonitor progressMonitor) Since names are changeable for streams, components, it does not seem to be a good reference that we can persist and later reuse. Is there a better way to ID streams, components, baselines without using names, and if so how could one query the server for information about them so that the client could reconnect. Regards, Sri. |
One answer
This isn't a problem to find without having to search the repository, try the following (written from memory but is close to what you want)
IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repository); IWorkspaceHandle workspaceHandle = IWorkspace.ITEM_TYPE.create(repository, workspaceUUID, null); IWorkspaceConnection connection = wm.getWorkspaceConnection(workspaceHandle, monitor); connection.getComponents(); |
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.