fetch the History of a component in a stream in EWM client using RTC API
Hello,
IChangeHistory change = streamConnection.changeHistory(component); System.out.println(change.previousHistory(monitor)); System.out.println(change.getHistoryDescriptor(false, monitor).toString()); System.out.println(change.recent(monitor)); } the output:
null com.ibm.team.scm.client.internal.ClientEraDescriptor@e60c466 [com.ibm.team.scm.client.internal.ClientChangeSetEntry@3c577368, com.ibm.team.scm.client.internal.ClientChangeSetEntry@57c7ec30, com.ibm.team.scm.client.internal.ClientChangeSetEntry@729de0e1, com.ibm.team.scm.client.internal.ClientChangeSetEntry@2c8c42c, com.ibm.team.scm.client.internal.ClientChangeSetEntry@5032b2e]
here they are fetching operationHistory of a stream, which gives the output for me.
the method:
private static void getChangeHistoryOfComponent2(String uuidOfComponent,ITeamRepository teamRepository) throws TeamRepositoryException {
ParmsGetComponentHistory parms = new ParmsGetComponentHistory(); parms.componentItemId= uuidOfComponent; parms.desiredPageSize = 1;
IScmRichClientRestService scmService = (IScmRichClientRestService) ((IClientLibraryContext) teamRepository).getServiceInterface(IScmRichClientRestService.class); ScmComponentHistory componentHistory = scmService.getComponentHistory(parms); if (componentHistory.getHistoryEntries().size() > 0) { ScmWorkspaceHistoryEntry entry = (ScmWorkspaceHistoryEntry) componentHistory.getHistoryEntries().get(0); ScmWorkspaceOperationDescription description = entry.getDescription();
System.out.println(description);
}
}
Exception in thread "main" com.ibm.team.repository.common.TeamRepositoryException: Internal error at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:377) at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:347) at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeFault(MarshallerUtil.java:312) at com.ibm.team.repository.transport.client.RemoteTeamServer.constructExceptionFromFault(RemoteTeamServer.java:2556) at com.ibm.team.repository.transport.client.RemoteTeamServer.appendNestedException(RemoteTeamServer.java:2539) at com.ibm.team.repository.transport.client.RemoteTeamServer.throwHttpClientError(RemoteTeamServer.java:2438) at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1425) at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1245) at com.ibm.team.repository.transport.client.RemoteTeamService.executeCancelableHttpMethod(RemoteTeamService.java:659) at com.ibm.team.repository.transport.client.RemoteTeamService.invokeModelledRestService(RemoteTeamService.java:273) at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:190) at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43) at jdk.proxy2/jdk.proxy2.$Proxy26.getComponentHistory(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:254) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:110) at jdk.proxy2/jdk.proxy2.$Proxy26.getComponentHistory(Unknown Source) at com.mbag.mbse.BaselineHandler.getChangeHistoryOfComponent2(BaselineHandler.java:74) at com.mbag.mbse.BaselineHandler.main(BaselineHandler.java:62) Caused by: java.lang.IllegalArgumentException
... 22 more
at this line ScmComponentHistory componentHistory = scmService.getComponentHistory(parms);
|
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Apr 29, 9:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER I am not a expert for the EWM SCM API. The only suggestion I can provide here is:
Note that the answers you refer to also state that some of the classes being used are not API.
|
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.