It's all about the answers!

Ask a question

How can I (unsafely) delete a stream using the plain java API?


Andy Jewell (24236374) | asked Jan 25 '16, 6:53 p.m.
edited Jan 26 '16, 2:07 a.m. by Ralph Schoon (63.4k33646)
I am trying to delete a stream using plain java API.  This works:

    public static void deleteStream(final RtcSession session,IWorkspaceConnection stream_to_delete, IWorkspaceConnection workspace_for_snapshot) throws TeamRepositoryException{
        final IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(session.getRepo());
        wm.safelyDeleteStream((IWorkspaceHandle) stream_to_delete.getContextHandle(), workspace_for_snapshot, session.getMonitor());
    }

But I need to provide a workspace to save a snapshot of the stream.  The UI has an option to just delete the stream without creating a snapshot.  Does anyone know where that is in the API?  I assume there's a way to do it??

Andy

Accepted answer


permanent link
Ralph Schoon (63.4k33646) | answered Jan 26 '16, 2:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you tried wm.deleteWorkspace(workspaceHandle, progressMonitor)? As far as I know streams and repository workspaces are pretty much the same.
Andy Jewell selected this answer as the correct answer

Comments
Andy Jewell commented Jan 26 '16, 10:45 a.m.

By cracky, it works.. ;)  Thank you!

Your answer


Register or 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.