It's all about the answers!

Ask a question

Advisor Plugin using ITeamRepository


0
1
pere irazusta (2062120) | asked Oct 25 '11, 1:22 p.m.
Hi,

We are trying to develop a plugin that requires acces to ITeamRepository through

ProcessArea processArea = operation.getProcessArea();

IProjectArea projectArea = (IProjectArea) processArea;
ITeamRepository repo = (ITeamRepository) projectArea.getOrigin();


Everithing works ok on eclipse ( we import the package to the plugin ) but when we deploy it, we get the following error:

The bundle could not be resolved. Reason: Missing Constraint: Import-Package: com.ibm.team.repository.client; version="0.0.0"


Any idea on how to solve it?

Thanks!

Pere

6 answers



permanent link
Qiong Feng Huang (76911610) | answered Nov 17 '11, 7:36 a.m.
JAZZ DEVELOPER
Hi,

Thanks for your reply but it doesn't solve the problem.

The problem is not about getting context data ( what I'm able to get ), the problem happens on execution time and it looks like it can't find the package...

Anyone knows if it is possible to use this package on a advisor plugin?
com.ibm.team.repository.client

And if the answer is negative how can I get the ICategory from the element that triggered the Advisor?

Thanks!


If your Advisor plugin is running in server side, it's impossible to use the any package from com.ibm.team.repository.client plugin. This client plugin is never included in server side.

Can you give more detailed information about your question. For example, which operation does your Advisor belong to? Which "ICategory" do you mean? If you are lucky, you might find your "ICategory" in AdvisableOperation.getOperationData(). Even, you can declare required services in extensionService element in the operationAdvisor extension, then you can use these services in your Advisor.

permanent link
sam detweiler (12.5k6195201) | answered Nov 16 '11, 9:45 a.m.
could u describe what u are trying to 'DO' in the plugin?

is this an OperationAdvisor?

I just worked thru finding context in my OperationAdvisor

// get the worker objects
IAuditableCommon iac = ((ISaveParameter) data).getSaveOperationParameter().getAuditableCommon();

you can find the processArea thru the AuditableCommon object too, using

IProcessArea findProcessAreaByURI(URI areaURI, ItemProfile profile, IProgressMonitor monitor) throws TeamRepositoryException;

course, once u have the projectarea...

Sam

permanent link
pere irazusta (2062120) | answered Nov 16 '11, 6:04 a.m.
Hi Radhika,

It seems like it isn't possible to acces .client libraries from the server side, so you should look for another way to get the info you need.

In my case I needed the Iteamrepository class to access the info related to a teamArea and I used the approach explained on this post.
https://jazz.net/forums/viewtopic.php?t=20436

I hope it helps.

permanent link
radhika bandari (10675) | answered Nov 16 '11, 2:03 a.m.
Hi pere,

Have you found any solution for this problem. I have added com.ibm.team.repository.client plug-in in Dependencies tab as well.
but the Advisor is not installed in the server.
It is showing message when I execute it.


Thanks in Advance.

Radhika

permanent link
pere irazusta (2062120) | answered Oct 27 '11, 3:44 a.m.
Hi,

Thanks for your reply but it doesn't solve the problem.

The problem is not about getting context data ( what I'm able to get ), the problem happens on execution time and it looks like it can't find the package...

Anyone knows if it is possible to use this package on a advisor plugin?
com.ibm.team.repository.client

And if the answer is negative how can I get the ICategory from the element that triggered the Advisor?

Thanks!

permanent link
yansheng li (1175) | answered Oct 26 '11, 8:46 a.m.
I have used this code in precondition trigger,
the "operation" var could be provided by system context ,
but for normal plugin ,I am not sure where it could be get.

maybe these code only be use in trigger scenario .
I am not sure.

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.