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
Ralph Schoon (63.5k●3●36●46)
| 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
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.
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.