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
·
One answer
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.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Apr 14 '15, 1:46 a.m.Paul Inman
Apr 14 '15, 11:05 a.m.