What is the meaning of these parameters?
IQueryDescriptor queryDescriptor = queryClient.findSharedQueries(arg0, arg1, arg2, arg3, arg4);
What is the meaning of these parameters? or where can I find QueryAPI? |
11 answers
On 11/8/10 3:38 AM, liumawang wrote:
IQueryDescriptor queryDescriptor = queryClient.findSharedQueries(arg0, List<IQueryDescriptor> findSharedQueries(IProjectAreaHandle projectAreaHandle, List<extends> sharingTargets, String queryType, ItemProfile<IQueryDescriptor> profile, IProgressMonitor monitor) throws TeamRepositoryException; sharingTargets: the list of team areas or project areas that you are interested in queryType: Currently always 'QueryTypes.WORK_ITEM_QUERY' -- Regards, Patrick RTC Work Item Component Lead |
On 11/8/10 3:38 AM, liumawang wrote: IQueryDescriptor queryDescriptor = queryClient.findSharedQueries(arg0, List<IQueryDescriptor> findSharedQueries(IProjectAreaHandle projectAreaHandle, List<extends> sharingTargets, String queryType, ItemProfile<IQueryDescriptor> profile, IProgressMonitor monitor) throws TeamRepositoryException; sharingTargets: the list of team areas or project areas that you are interested in queryType: Currently always 'QueryTypes.WORK_ITEM_QUERY' -- Regards, Patrick RTC Work Item Component Lead OK, I got it thank you! |
On 11/8/10 3:38 AM, liumawang wrote: IQueryDescriptor queryDescriptor = queryClient.findSharedQueries(arg0, List<IQueryDescriptor> findSharedQueries(IProjectAreaHandle projectAreaHandle, List<extends> sharingTargets, String queryType, ItemProfile<IQueryDescriptor> profile, IProgressMonitor monitor) throws TeamRepositoryException; sharingTargets: the list of team areas or project areas that you are interested in queryType: Currently always 'QueryTypes.WORK_ITEM_QUERY' -- Regards, Patrick RTC Work Item Component Lead Your replay has very help for me,but I'm still amazing about "ItemProfile<IQueryDescriptor> profile",how can I get this parameters,can you say more about that?Thank you for your help! |
On 11/9/10 10:38 AM, liumawang wrote:
Your replay has very help for me,but I'm still amazing about The profile indicates which properties you need from the query. To get all properties, you can pass in com.ibm.team.workitem.common.query.IQueryDescriptor.FULL_PROFILE If you only want to show a label of the query, you may want to consider using: com.ibm.team.workitem.common.query.IQueryDescriptor.SMALL_PROFILE -- Regards, Patrick RTC Work Item Component Lead |
On 11/9/10 10:38 AM, liumawang wrote: Your replay has very help for me,but I'm still amazing about The profile indicates which properties you need from the query. To get all properties, you can pass in com.ibm.team.workitem.common.query.IQueryDescriptor.FULL_PROFILE If you only want to show a label of the query, you may want to consider using: com.ibm.team.workitem.common.query.IQueryDescriptor.SMALL_PROFILE -- Regards, Patrick RTC Work Item Component Leadthank you for your replay,I still amazing ahout that ,can you tell me more about the code: IProjectAreaHandle projectAreaHandle=? ItemProfile profile=? IProgressMonitor monitor=? Thank you for your time |
Can you tell me what is the mean about projectAreaHandle and how can I It depends on the context your code runs in and what you are trying to do. If you don't have any project area context at all, you may want to take a look at: com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.getConnectedProjectAreas(ITeamRepository, boolean) -- Regards, Patrick RTC Work Item Component Lead |
Can you tell me what is the mean about projectAreaHandle and how can I It depends on the context your code runs in and what you are trying to do. If you don't have any project area context at all, you may want to take a look at: com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.getConnectedProjectAreas(ITeamRepository, boolean) -- Regards, Patrick RTC Work Item Component Lead Thank you for your replay,I still amazing ahout that ,we want to get query message of exist query,and we just login in RTC and have not other context, can you tell me more about the code: IProjectAreaHandle projectAreaHandle=? ItemProfile profile=? IProgressMonitor monitor=? Thank you for your time |
Thank you for your replay,I still amazing ahout that ,we want to get Here's an example for the UI final IProjectAreaHandle projectArea= ProjectAreaPicker.showDialog(shell, false); final ITeamRepository repo= (ITeamRepository) projectArea.getOrigin(); final IQueryClient queryClient= (IQueryClient) repo.getClientLibrary(IQueryClient.class); final List<ITeamArea> teamAreas= ...; UIUpdaterJob job= new UIUpdaterJob("Resolving Queries") { //$NON-NLS-1$ private List<IQueryDescriptor> fQueries; @Override public IStatus runInBackground(IProgressMonitor monitor) { try { fQueries= queryClient.findSharedQueries(projectArea, teamAreas, QueryTypes.WORK_ITEM_QUERY, IQueryDescriptor.FULL_PROFILE, monitor); } catch (TeamRepositoryException e) { // TODO Handle exception } return super.runInBackground(monitor); } @Override public IStatus runInUI(IProgressMonitor monitor) { // TODO Do something with fQueries in the UI return super.runInUI(monitor); } }; -- Regards, Patrick RTC Work Item Component Lead |
Hi Patrick,
Thanks for your reply, I just tried your method and I have passed compiling. But the findSharedQuery method returns 0 query. I'm sure I have find a lot of shared queries in my team area. Would you please help to look at my code and execution result import java.net.URI; I can send you my screen shot for shared queries in my project area. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~` Thank you for your replay,I still amazing ahout that ,we want to get Here's an example for the UI final IProjectAreaHandle projectArea= ProjectAreaPicker.showDialog(shell, false); final ITeamRepository repo= (ITeamRepository) projectArea.getOrigin(); final IQueryClient queryClient= (IQueryClient) repo.getClientLibrary(IQueryClient.class); final List<ITeamArea> teamAreas= ...; UIUpdaterJob job= new UIUpdaterJob("Resolving Queries") { //$NON-NLS-1$ private List<IQueryDescriptor> fQueries; @Override public IStatus runInBackground(IProgressMonitor monitor) { try { fQueries= queryClient.findSharedQueries(projectArea, teamAreas, QueryTypes.WORK_ITEM_QUERY, IQueryDescriptor.FULL_PROFILE, monitor); } catch (TeamRepositoryException e) { // TODO Handle exception } return super.runInBackground(monitor); } @Override public IStatus runInUI(IProgressMonitor monitor) { // TODO Do something with fQueries in the UI return super.runInUI(monitor); } }; -- Regards, Patrick RTC Work Item Component Lead [img][/img] |
Thank you for your replay,I still amazing ahout that ,we want to get Here's an example for the UI final IProjectAreaHandle projectArea= ProjectAreaPicker.showDialog(shell, false); final ITeamRepository repo= (ITeamRepository) projectArea.getOrigin(); final IQueryClient queryClient= (IQueryClient) repo.getClientLibrary(IQueryClient.class); final List<ITeamArea> teamAreas= ...; UIUpdaterJob job= new UIUpdaterJob("Resolving Queries") { //$NON-NLS-1$ private List<IQueryDescriptor> fQueries; @Override public IStatus runInBackground(IProgressMonitor monitor) { try { fQueries= queryClient.findSharedQueries(projectArea, teamAreas, QueryTypes.WORK_ITEM_QUERY, IQueryDescriptor.FULL_PROFILE, monitor); } catch (TeamRepositoryException e) { // TODO Handle exception } return super.runInBackground(monitor); } @Override public IStatus runInUI(IProgressMonitor monitor) { // TODO Do something with fQueries in the UI return super.runInUI(monitor); } }; -- Regards, Patrick RTC Work Item Component Lead I encountered another question: I have retrieve workitem list by executing a query. This query returns some defects, but IWorkItem interface only have limited method to get basic information. I did not find method to get defect priority, severity, defect id... Would you please help on this? Thanks a lot! |
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.