Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

how to get all the componet of current project and the componet's baseline names using RTC Server api

HI 

how to get all the componet of current project and the componet's baseline names  using RTC Server SDK  api
public void run(AdvisableOperation operation,
IProcessConfigurationElement advisorConfiguration,
IAdvisorInfoCollector collector, IProgressMonitor monitor)
throws TeamRepositoryException {
Object data = operation.getOperationData();
if (data instanceof ISaveParameter) {
ISaveParameter saveParameter = (ISaveParameter) data;
IAuditable oldauditable = saveParameter.getOldState(); 
IWorkItem oldWorkItem = (IWorkItem) oldauditable;
IAuditable auditable = ((ISaveParameter) data).getNewState();
IWorkItemServer service = getService(IWorkItemServer.class);
if (auditable instanceof IWorkItem) {
IWorkItem newWorkItem = (IWorkItem) auditable;
/



/
}

}
}

0 votes

Comments

 thank you very much ,you are the best


Accepted answer

Permanent link

1) IComponentSearchCriteria.getFilterByOwnerOptional().. you add to this collection the IProjectAreaHandles or ITeamAreaHandles. This will return all components owned by those process areas. Pass the IComponentSearchCriteria into IScmQueryService.findComponents()

2) Then use: IBaselineSearchCriteria.setComponentRequired(component) to return all baselines in that component. It will return handles (so you'll have only the itemID). Pass the IBaselineSearchCriteria into IScmQueryService.findBaselines()

3) Then simply fetch the full IBaseline from the handles from step 2, and then use IBaseline.getName()

Gou Peng selected this answer as the correct answer

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 84

Question asked: Oct 09 '19, 3:27 a.m.

Question was seen: 1,346 times

Last updated: Nov 06 '19, 4:06 p.m.

Confirmation Cancel Confirm