Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Operation advisor question

Hello,

I am new to RTC and am still learning the ropes. I am trying to write an operation advisor, and need to examine the credentials of the user performing the operation (to perform some access rights checks). Can someone please give me some pointers on how I can do this?

I examined the processArea object and it has calls to getAdministrators and getMembers, but I'm not sure where to go from there.

Thanks much!
AJ

0 votes



9 answers

Permanent link
A user is a contributor in RTC..

make sure to look at the javadoc provided in 3.0.1..

Sam

0 votes


Permanent link
Hello,
I'm not sure I understand the information you are trying to obtain. In RTC, most access would be controlled by permissions, which the Process runtime can determine for you.
Have you seen this wiki page on working with Process?
https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide

Martha
Jazz Developer, Process Team

Hello,

I am new to RTC and am still learning the ropes. I am trying to write an operation advisor, and need to examine the credentials of the user performing the operation (to perform some access rights checks). Can someone please give me some pointers on how I can do this?

I examined the processArea object and it has calls to getAdministrators and getMembers, but I'm not sure where to go from there.

Thanks much!
AJ

0 votes


Permanent link

private void checkRoleId(AdvisableOperation operation){
IContributorHandle [] arrayOfMembers = operation.getProcessArea().getMembers();
IProcessServerService processServerService = getService(IProcessServerService.class);
for(IContributorHandle members : arrayOfMembers){
try {
IRole[] contributorRoles = processServerService.getServerProcess(operation.getProcessArea()).getContributorRoles( members, operation.getProcessArea());
for (IRole role : contributorRoles) {
System.out.println("--------- ROLE ID ------------" + role.getId());
}
} catch (TeamRepositoryException e) {
System.out.println("------NOT PROJECT MANAGER------------");
}
}
return projectManagerId;
}



may be this code could help :)

0 votes


Permanent link
Thank you all for the very helpful answers.

Martha, I was trying to get at the logged in user (the contributor), so that I can examine his role and access rights. The requirement is to stop the operation from proceeding if there is a certain combination of role and custom attribute value. In all other situations, the operation would proceed.

Thanks Juwandy for the code snippet - it was very useful.

Also, could someone point me to the java docs for the server. I downloaded one for the client, but couldnt find any for the server. Do I just generate it myself from the code?? Please let me know, and again, thanks for the help!

0 votes


Permanent link
Hi,

the javadoc for the server is included in the SDK. The API is not officially supported (in contrast to the Plain Java Client Libraries). Please follow the Extensions workshop to learn how to install the SDK.

0 votes


Permanent link
Hi,

the javadoc for the server is included in the SDK. The API is not officially supported (in contrast to the Plain Java Client Libraries). Please follow the Extensions workshop to learn how to install the SDK.


I don't see the javadoc in the sdk..

sam

0 votes


Permanent link
Sam,

there is no Javadoc package, but if you follow the Extensions Workshop in the library and deploy the SDK according to it, you have access to the documentation which is included in the source. As good as Javadoc if you know how to get around with Java/plugin search. The best way to access the info is using the Eclipse PDE. I think I remember hearing that some users extracted Javadoc from it.

0 votes


Permanent link
ah.. I use the sdk and have access to all the type and method info by object.. if that is what i call javadoc..

the missing link is knowing where to start..

0 votes


Permanent link
I agree. It is hard to find the ways through the API. I started with whatever I could find here in the forum and the WiKi. More than once the Unit tests in the SDK helped me to find the start of the thread...

I have the same issue with the Javadoc in the Plain Java Client Libraries.

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,944

Question asked: Mar 16 '12, 11:02 a.m.

Question was seen: 6,152 times

Last updated: Mar 16 '12, 11:02 a.m.

Confirmation Cancel Confirm