It's all about the answers!

Ask a question

Querying for components


Christian Bird (11) | asked Dec 16 '09, 11:16 a.m.
I'm trying to get a list of all the components on a jazz server using something like this:

ComponentQueryModel componentQueryModel = ComponentQueryModel.ROOT;
IItemQuery componentQuery = IItemQuery.FACTORY.newInstance(componentQueryModel);
ItemQueryIterator<IComponentHandle> componentIterator = new ItemQueryIterator<IComponentHandle>(auditableClient, componentQuery);
while (componentIterator.hasNext(monitor)) {
IComponentHandle componentHandle = componentIterator.next(monitor);
do stuff here...
}

This works fine when the jazz server and the client code exist on the same machine. however, when I try to access a remote jazz server with this code, I get:

com.ibm.team.repository.common.PermissionDeniedException: Remote queries are not allowed for the application-managed item type "com.ibm.team.scm#Component"

Why the difference in distinction between local and remote queries? Also, is there a better way to list all components in a project? Thanks!

Chris

2 answers



permanent link
Jason Dean (1061168) | answered Jan 13 '10, 8:23 a.m.
I'd just like to add that I'd like to know this information as well.

Jason
(Temenos)

permanent link
Andrew Hoo (1.0k1) | answered Jan 27 '10, 2:08 p.m.
JAZZ DEVELOPER
You can search for components using
IComponentSearchCriteria criteria =
IComponentSearchCriteria.FACTORY.newInstance()
SCMPlatform.getWorkspaceManager(repo).findComponents(criteria,
Integer.MAX_VALUE, progress)

You can specify fields in the criteria to scope your search.

Andrew

On Wed, 13 Jan 2010 08:38:03 -0500, jasuk70
<jdean> wrote:

I'd just like to add that I'd like to know this information as well.

Jason
(Temenos)



--

Your answer


Register or 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.