It's all about the answers!

Ask a question

How to get ProvisionFactory in plugin development


Michele Pegoraro (1.8k12114102) | asked Jul 07 '09, 10:54 a.m.
Hi,
I'm developing a pre-condition plugin to check the state of a change-set related work-item.
I've find out how to get the change-set (starting from delivery operation) and I need to use ChangeSetLinks.findLinks method to get the links.
This method requires a ProviderFactory object that I can't find out. I tried with ClientProviderFactory but I've got an error because "is not accessible due to restriction on required library com.ibm.team.scm.client_2.0.0.I200906081830.jar".
Is there another way to get it (maybe useful also for a server side plugin)??
Thanks for every answer.

2 answers



permanent link
Michele Pegoraro (1.8k12114102) | answered Jul 13 '09, 10:26 a.m.
Ok, I think I've found it.

Client Side:

ProviderFactory = (ProviderFactory) repository.getClientLibrary(ProviderFactory.class)

Sever Side:

ProviderFactory provider = getService(ProviderFactory.class)


Are these the correct way to do it?

permanent link
Michele Pegoraro (1.8k12114102) | answered Jul 29 '09, 9:35 a.m.

Sever Side:
ProviderFactory provider = getService(ProviderFactory.class)

This is not correct. In ServerRequireWorkItemAdvisor has been used ServerProviderFactory but this class does not seem to be avaible (because of a library limitation). How can I get it??

Your answer


Register or to post your answer.