It's all about the answers!

Ask a question

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


Paul Inman (3546) | asked Apr 13 '15, 11:05 p.m.
edited Apr 14 '15, 10:59 a.m.
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
·  

Comments
Ralph Schoon commented Apr 14 '15, 1:45 a.m. | edited Apr 14 '15, 1:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Paul Inman commented Apr 14 '15, 11:04 a.m. | edited Apr 14 '15, 11:05 a.m.

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
Ralph Schoon (63.5k33646) | answered Apr 15 '15, 8:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 15 '15, 8:00 a.m.
 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.

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.