Not able to find stream using server side scm java api
![]() Hello everyone,
I am using CLM 606.
I have created a plugin to duplicate a stream.
IWorkspaceSearchCriteria search = IWorkspaceSearchCriteria.FACTORY.newInstance().setKind(IWorkspaceSearchCriteria.STREAMS);
search.setExactName(MajorMinorStream);
ItemQueryResult foundStream = ScmQueryservice.findWorkspaces(search, Integer.MAX_VALUE, null);
try {
if (foundStream != null) {
DestworkspaceHandle = (IWorkspaceHandle)foundStream.getItemHandles().get(0); // Move to catch through this statement error index=0,size=0
}
We have created team area per application and added APP RM role to APP RM_1 user.
And then I have used below code to find the streamusing ITPM role(ITPM_1).
I am able to get stream using above code for few applications but it fails for few applications.
Please let me know if I missed anything wrong in code.
Thanks in Advance
Pallavi Deore
|
2 answers
![]()
Ralph Schoon (62.3k●3●36●43)
| answered Mar 31 '20, 10:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 31 '20, 10:26 a.m.
The code that I can see in the SDK
So your code above does not do all the checks. Fix that.
As David states you can only find where you have access permissions. Repository workspaces are usually owned by a user and very often not visible to other users. Streams could be not visible as well. You have to have a JazzAdmin repository permission to be able to see (and query for) all the repository workspaces and streams.
|