Here is one of the requirements that was put across one of the users, using IBM Rational Team Concert (RTC) tool:
For audit purpose, there is a need to generate report with repository workspaces information created by different users in their local machines.
1) To see what components the user has loaded
2) How many files have been loaded.
This is the simple scenario, where user will create repository workspace in his windows machine and also load the components to the same windows machine. There is a need to get that repository workspace name and only the loaded component names rather than all components of the stream.
Is this possible? If not, what are the alternatives?
--> A Java program might have been written to get all repository workspace using WorkSpaceManager and IWorkspaceSearchCriteria,
then creating object for workspace connection class by passing workspace object and with connection object one is getting components.
However the problem here is when one gets the component from connection object, it gives the list of all components of the workspace rather than the information on what the user has loaded into the local system.
Is there a way to get the required data using java?
--> It is also about usage of API. Perhaps an API may have been developed, the program to get the repository workspaces created by users and the only thing to know is if there any method in API using which one can get loaded components details of workspace.
Here are the details one can use, if there is such a requirement:
--> One can get the details on what components the user had loaded on a particular Stream from the Eclipse client GUI.
However, even this provides information of all components of the workspace rather than the information on what the user has loaded into the local system.
--> Since there is no official API, customers can use the CLI as much as possible. 'lscm status' might be one option.
--> There is a RepoUtil.getComponentsInSandbox() function that is called by the CLI's output gorp (JSONPrintUtil), which suggests that the CLI knows about it at some level, and and may return it in either the JSON output or the human-readable output.
Unfortunately, the CLI's source (including RepoUtil) is not shipped as part of the JPJC libraries. So one cannot expect to find it.
--> In the past users have been told that they can use internal classes if they are willing to explore, willing to accept that new versions may break them, and won't seek IBM's help when they are broken.
If one is willing to accept these caveats, then one can explore FileSystemCore.getSharingManager().allShares(), which will list all of
the share roots. One can walk those to see which component has items shared into the sandbox. Note that one will have to collate the workspace/component pairs.
With this, one gets an empty array of IShare when one runs FileSystemCore.getSharingManager().allShares(null).
--> However, the list of loaded component isn't available on the repository workspace, since it's only maintained on each client machine.
If one really want to do this, they will have to run the program on each dev box. The RTC repository doesn't know anything about sandboxes on the client machines. So it isn't possible to tell what components or files users have loaded into their sandboxes from the repository.
If one is looking for something on server side, these options won't work. This is raised as an RFE here:
So if the end goal is to generate a report with only loaded components at different users, there is no way to get such report except go to each individual machine and get the report.