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

how to get the active project areas by java API

How to get the active project areas by java API (may be in an ArrayList)?

1

0 votes

Comments

What is the context in which you are trying to get project areas(serverside advisor/contributor, plain java client application or something else) ? 

I was looking for plain java client only. Thank you.


Accepted answer

Permanent link

From a plain java client you could do the following:

IProcessItemService service = (IProcessItemService) repository.getClientLibrary(IProcessItemService.class);
List<IProjectArea> activeProjectAreas = new ArrayList();
List<IProjectArea> allProjectAreas;
projectAreas = service.findAllProjectAreas(service.ALL_PROPERTIES,monitor);
for (Iterator<IProjectArea> iterator = projectAreas.iterator(); iterator.hasNext();) {
 IProjectArea iProjectArea = iterator.next();
 
 if (iProjectArea.isArchived()==false) {
  activeProjectAreas.add(iProjectArea)
 }
}
Harish Raj selected this answer as the correct answer

3 votes


One other answer

Permanent link
 Hi,

Could you please provide the api for the server side Participant to get the project areas..
this would be of great help.

Thanks

0 votes

Comments

  public void run(AdvisableOperation operation,

IProcessConfigurationElement participantConfig,
IParticipantInfoCollector collector, IProgressMonitor monitor)
throws TeamRepositoryException {
IProcessArea processArea = operation.getProcessArea();
iProjectAreaHandle = processArea.getProjectArea();

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
× 411

Question asked: Nov 21 '12, 3:01 a.m.

Question was seen: 5,576 times

Last updated: Mar 12 '13, 9:32 a.m.

Confirmation Cancel Confirm