Reading the list of project Area
Hello,
I'd like to know how to read a list of project area once I have a repository connection. It looks like I need to use the api "fetchCompleteItems" but how should I initialize the list of itemHandle to return repo.itemManager().fetchCompleteItems(projectAreaList, IItemManager.DEFAULT, monitor); Any help is welcome. Thanks |
12 answers
Jared Burns (4.5k●2●9)
| answered Aug 19 '09, 11:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Wed, 19 Aug 2009 16:08:01 +0000, marly wrote:
Hello, You need to use the Process component's client library: IProcessItemService. This has a method to retrieve the list of all project areas. Retrieve the client library using: repo.getClientLibrary(IProcessItemService.class) -- Jared Burns Jazz Process Team |
marly wrote:
I'd like to know how to read a list of project area once I have a Something like this might work: IProcessItemService processItemService = (IProcessItemService)teamRepository.getClientLibrary(IProcessItemService.class); for (Object obj: processItemService.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, null)) { IProjectArea projectArea = (IProjectArea)obj; // ... } |
I think I got it using
IProcessItemService client = (IProcessItemService) repo.getClientLibrary(IProcessItemService.class); |
Hi,
I want to get the projectAreaHandle of a specific project using plan java code(Serve libraries only, need to deploy Operation advisor in server). I tried below code IProcessService IPS = getService(IProcessService.class); IProcessServerService processService = getService(IProcessServerService.class); String uri = processService.getURIForProcessArea(ipah1); System.out.println("URI........."+uri); IAuditableCommon iac = ((ISaveParameter) data).getSaveOperationParameter().getAuditableCommon(); IProjectArea projectArea2 = (IProjectArea)iac.findProcessAreaByURI(URI.create("https://radhikabandari.in.ibm.com:9443/ccm/process/project-areas/_cgoIABWmEeGnN4lxE3OfSw"), ItemProfile.PROJECT_AREA_FULL, monitor); The method findProcessAreaByURI() is returning null. Any help would be appreciated. Thanks & Regards Radhika |
URI.create("https://radhikabandari.in.ibm.com:9443/ccm/process/project-areas/_cgoIABWmEeGnN4lxE3OfSw"
thats the wrong URI.. they never will include the server address.. you may have to look thru the source to get the right URI syntax. Sam |
Hi Radhika,
You shouldn't need to find the project area by its full URI. Connecting to the repository should get you the ITeamRepository object for "https://radhikabandari.in.ibm.com:9443/ccm" and then it looks like this is the UUID of the project area "_cgoIABWmEeGnN4lxE3OfSw" so search for the project area by UUID. Here is a method that I wrote which gets it by name, I'm sure you could pass it the UUID instead of the name: public static IProjectArea getProjectArea(ITeamRepository repo,IProgressMonitor monitor,String projectAreaName) throws TeamRepositoryException{ Let me know if it works, Henry |
Hello Sam,
Try using IProcessService#findProcessArea(String, String[]) The first argument is simply the name of the project. The second argument is the array of properties you want the project area to have. This will return the project area, not its handle. See the javadoc on the method for more details. Martha Jazz Developer, Process Team URI.create("https://radhikabandari.in.ibm.com:9443/ccm/process/project-areas/_cgoIABWmEeGnN4lxE3OfSw" |
Hi,
I need to work with server libraries only. I am not supposed use client libraries com.ibm.team.process.client.ProcessClient; com.ibm.team.process.client.IProcessItemService...because I will be deploying the plugin on server. Can you please suggest me some code using server libraries. Thank you, Radhika |
Hi, Hi Radhika, I think Martha has already provided the answer, IProcessService is exactly a server side service, what you need to do are: 1. Define your own service that extends AbstractService. 2. Add com.ibm.team.process.internal.common.service.IProcessService as prerequisite. 3. Call getService(IProcessService.class) in your own service, and then follow Martha's instruction to get project area information. Kevin Jazz Foundation Process Team |
Sorry Radhika, I don't know what the server libraries are, I just use anything that ships with the JPJC library which I suppose is designed for clients.
|
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.