Class ConsoleUtils


  • public final class ConsoleUtils
    extends Object
    Utility Class contains helper methods for console response commands and response processing
    Version:
    1.0
    Author:
    Frank Giordano
    • Method Detail

      • parseJsonIssueCmdResponse

        public static ZosmfIssueResponse parseJsonIssueCmdResponse​(org.json.simple.JSONObject jsonObject)
        Transform JSON into ZosmfIssueResponse object
        Parameters:
        jsonObject - JSON object
        Returns:
        ZosmfIssueResponse object
      • populate

        public static void populate​(ZosmfIssueResponse zosmfResponse,
                                    ConsoleResponse response,
                                    boolean processResponses)
        Populate the console response with the details returned from the z/OSMF console API. Method takes two parameters: response from z/OSMF command and response to be populated. Method adds response to a collection of z/OSMF responses, mark response as "succeeded" (response.success = true) and populate other fields of response with values from z/OSMF response.
        Parameters:
        zosmfResponse - zosmf console response, see ZosmfIssueResponse object
        response - console response to be populated, see ConsoleResponse object
        processResponses - boolean if set to true, append command response string to the console API response