Server side plug-in which detects delivering of components between cross-CCMs
I am developing a server side plug-in which needs to detect the delivery of components between streams / repository workspaces in different CCM servers and change their "owned by" and "visibility" attributes.
I created a Jazz component with service and common parts. The service is activated in response of a deliver operation (with id = com.ibm.team.scm.server.deliver). The Jazz component implements a participant which traverses the changes sets in DeliverOperationData parameter of the participant's "run" method. Then for each change set it finds the corresponding component and the component ComponentOwner. From there it finds the component visibility and if it is equal to "IReadScope.READSCOPE_PRIVATE", the participant changes the component's "Owner By" and "visibility" attributes to a given team area and IReadScope.READSCOPE_TEAM_AREA_PRIVATE, respectively.
Can you please help me find the answers to the following questions:
1) What is the preferred approach to find/detect the source and destination CCMs when delivering components between CCMs?
2) Do you find the described pseudo algorithm good enough to detect the delivery components between servers and change the components owners and visibility from private to a common team area?
3) Why do I need to have "requiredService" tags in the plugin.xml?
4) I use the following code to take an instance to a team area:
IProcessServerService processServer = (IProcessServerService) getService(IProcessServerService.class);
processServer.findProcessArea(areaURI, properties);
How the service knows which CCM to search for the team area in if the repository is not present as a parameter?
5) It looks like the deliver (server) operation is not invoked when a new component() is being delivered/added to a destination workspace (stream or repository workspace). I need to deliver a change set too to enable that operation. How can I detect delivering components without any change sets (i.e. newly created ones)?
Thanks for your support!
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 15 '17, 8:09 p.m.Krasimir Malchev
Jun 16 '17, 6:17 a.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 16 '17, 9:41 a.m.