is there anyway to get the workspace handle from its name?
currently i am using
to get the handle, but the UUID are not hard to memorize and the requirement wants me to use the workspace name only.
so i want to ask is there any other way?
I have checked https://jazz.net/wiki/bin/view/Main/RTCSDK20_SourceControl
but it does not mention the exact way
thanks
IWorkspaceHandle wh = (IWorkspaceHandle) IWorkspace.ITEM_TYPE.createItemHandle(UUID.valueOf("_o5XGcMkdEd6y7LdSH_YGOA"), null);
to get the handle, but the UUID are not hard to memorize and the requirement wants me to use the workspace name only.
so i want to ask is there any other way?
I have checked https://jazz.net/wiki/bin/view/Main/RTCSDK20_SourceControl
but it does not mention the exact way
thanks
One answer
You can populate an IWorkspaceSearchCriteria with the name, and then call
SCMPlatform.getWorkspaceManager(repo).findWorkspaces(query, limit,
progress).
Note that this is a search, so it's not as efficient as directly
identifying your workspace by UUID. Also, workspace names are not
necessarily unique, so the query returns a list of matches back to you,
and you will need to make some sort of decision if you get more than 1
back.
On Wed, 04 Nov 2009 05:23:05 -0500, imey
<aimettiyang> wrote:
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
SCMPlatform.getWorkspaceManager(repo).findWorkspaces(query, limit,
progress).
Note that this is a search, so it's not as efficient as directly
identifying your workspace by UUID. Also, workspace names are not
necessarily unique, so the query returns a list of matches back to you,
and you will need to make some sort of decision if you get more than 1
back.
On Wed, 04 Nov 2009 05:23:05 -0500, imey
<aimettiyang> wrote:
currently i am using
IWorkspaceHandle wh = (IWorkspaceHandle)
IWorkspace.ITEM_TYPE.createItemHandle(UUID.valueOf("_o5XGcMkdEd6y7LdSH_YGOA"),
null);
to get the handle, but the UUID are not hard to memorize and the
requirement wants me to use the workspace name only.
so i want to ask is there any other way?
I have checked
https://jazz.net/wiki/bin/view/Main/RTCSDK20_SourceControl
but it does not mention the exact way
thanks
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/