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

Server side extension to expose more Jazz Client API via Javascript?

We have a need to provide more significant Attribute Customization via JavaScript than what is currently available via the JavaScript API.  For example, determining whether the action selected by the user for a work item is valid based on some complex combination of attribute values (a need expressed by a number of developers in this forum).  There are other examples for different purposes.
 
Since the Java Client API is well documented (​for example in the download at https://jazz.net/downloads/rational-team-concert/releases/5.0.2/RTC-Client-plainJavaLib-API-javadoc-5.0.2.zip), it would seem that allowing access to the same API from JavaScript would be as safe as using the API from Java (provided developers are careful with type safety).
 
The particular packages we are interested in are those for working with work items (these package names were copied from the Jazz Client API Specification documentation in the above mentioned download):
·        com.ibm.team.workitem.client
·        com.ibm.team.workitem.client.query
·        com.ibm.team.workitem.common
·        com.ibm.team.workitem.common.expression
·        com.ibm.team.workitem.common.expression.variables
·        com.ibm.team.workitem.common.linkClosure
·        com.ibm.team.workitem.common.model
·        com.ibm.team.workitem.common.query
·        com.ibm.team.workitem.common.template
·        com.ibm.team.workitem.common.text
·        com.ibm.team.workitem.common.workflow 

Is this a safe thing to do?

Thanks,
   -Paul Inman
·  

0 votes

Comments

JavaScript needs to be extended in the client as well as in the server, otherwise attribute customization won't work in the Eclipse client.

Packages with a name com.ibm..client. are only available in the client API (you don't have access to them in a server extension).
Packages with a name com.ibm..common. are available in the client as well as the server API.
Packages with a name com.ibm..server. are only available in the server API.

Thanks, Ralph.


So the first 2 I listed can only be used in the client and the rest of the ones I listed can be used on both the server and in the client.  Perhaps we should be considering an Eclipse plug-in?



One answer

Permanent link
 As already mentioned in my first comment, JavaScript is executed in the Eclipse client as well as in the RTC Server. If you want to expose more API to JavaScript in the Web UI and the Eclipse client, you need to provide it in both.

I don't know your detailed scenario, so the only answer I can provide is, which API's are available. If I am not mistaken the current JavaScript and value provider API uses the common API only.

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,938
× 152

Question asked: Apr 13 '15, 11:05 p.m.

Question was seen: 4,634 times

Last updated: Apr 15 '15, 8:00 a.m.

Confirmation Cancel Confirm