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
Hi, Hi, Here is parameter description: You could pass new URI(ProjectAreaName), e.g. new URI("prj1"). Kevin Jazz Foundation Process Team |
Hi,
Thanks for replay.. findProcessArea method is throwing error when I give ProjectArea name as String. I suppose it needs areaURI in string format. I tried with different options URI.create("https://radhikabandari.in.ibm.com:9443/ccm/process/project-areas/_cgoIABWmEeGnN4lxE3OfSw")) other than UUID i give project name then it is giving error invalied URI. https://radhikabandari.in.ibm.com:9443/ccm/projectareaname https://radhikabandari.in.ibm.com:9443/ccm/process/project-areas/projectareaname Any help.. Regards, Radhika |
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.
|
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 |
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 |
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 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 |
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,
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 |
I think I got it using
IProcessItemService client = (IProcessItemService) repo.getClientLibrary(IProcessItemService.class); |
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.