Skip to main content
1-Visitor
January 20, 2014
Question

How to get the details of selected item in MKS RM through JAVA API?

  • January 20, 2014
  • 1 reply
  • 3267 views

How to get the details of selected item in MKS RM through JAVA API?

I have use case to get the details (like issue id) for items selected in MKS RM through JAVA API.Can any one help in this regard.

    1 reply

    1-Visitor
    January 28, 2014

    Aman,

    First I would recommend that you read the Event Triggers section of the Server Administration Guide. (Starting on page 306 http://www.ptc.com/WCMS/files/143622/en/ServerAdministrationGuide_Integrity_10_0.pdf)

    Next, you can find documention for all our Java API beans in the documentation included with your Integrity server. Simply point your broswer to your Integrity server (typically http://hostname:7001) and then click on the link for Java API Documention.

    If you can't find what you're looking for there, please let me know!

    1-Visitor
    February 7, 2014

    Jeremy,

    I am looking at Java API Documentation that could be found on integrity server, but examples are missing. The same for Integrations Builder Guide.

    I am particulary searching for examples around executing command using Interim Responses (in case of issues or viewissue) but I am not able to see an example.

    executeWithInterim() method seems interesting, but where could I find an example of use?

    1-Visitor
    February 7, 2014

    executeWithInterim

    Response executeWithInterim(java.lang.String[] args, boolean enableCache) throws APIException
    Executes a command and returns an interim response. Using an interim response returns only a partially populated Response object. This allows a user more control over when to cancel a potentially long-running command.

    Command-level exceptions in the Response will not be thrown by this method. This is due to the nature of the Response hierarchy and the point at which command-level APIException elements occur within the hierarchy.

    Using interim responses without caching allows for better memory management since only a small part of the Response object hierarchy is saved in memory at any given time. However, once SubRoutines and WorkItems are read, they cannot be read again at a later time.

    The array must have the following order:

    • Integrity application (si, im, etc.)
    • Integrity application command (about, co, issues, etc.)
    • [Optional] Options (--gui, -Y, etc.)
    • [Optional] Selection of items to operate on (members, issue IDs, etc.)
    Parameters:
    args - The command with arguments.
    enableCache - Indicates if the response should be cached internally for use at a later point in time. Note that only WorkItem and SubRoutine objects directly in the Response hierarchy are affected by this flag.
    Returns:
    The response object that contains the results of the command.
    Throws:
    APIException - If there was an exception while running the command.


    An example can be found at: https://github.com/jenkinsci/integrity-plugin/blob/master/src/main/java/hudson/scm/APISession.java