public static Result createBannerResult(List<String> fields, @SuppressWarnings("rawtypes") List values, String step) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.size() != values.size()) { throw new RuntimeException("Fields array and its value arraylength dont match"); } for (int i = 0; i < fields.size(); i++) { page.addData(fields.get(i), values.get(i)); } return ResultBuilder.buildResult(result); }
public static Result createBannerResult(List<String> fields, @SuppressWarnings("rawtypes") List values, String step) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.size() != values.size()) { throw new RuntimeException("Fields array and its value arraylength dont match"); } for (int i = 0; i < fields.size(); i++) { page.addData(fields.get(i), values.get(i)); } return ResultBuilder.buildResult(result); }
public static Result createPageResult(List<String> fields, @SuppressWarnings("rawtypes") List values, String step, String[] header, Object[][] table) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.size() != values.size()) throw new RuntimeException("Fields array and its value arraylength dont match"); for (int i = 0; i < fields.size(); i++) { page.addData(fields.get(i), values.get(i)); } createPageTableAndBanner(page, header, table); return ResultBuilder.buildResult(result); }
public static Result createPageResult(List<String> fields, @SuppressWarnings("rawtypes") List values, String step, String[] header, Object[][] table) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.size() != values.size()) throw new RuntimeException("Fields array and its value arraylength dont match"); for (int i = 0; i < fields.size(); i++) { page.addData(fields.get(i), values.get(i)); } createPageTableAndBanner(page, header, table); return ResultBuilder.buildResult(result); }
public static Result createEmptyResult(String step) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); return ResultBuilder.buildResult(result); }
public static Result createSimpleStepResult(String nextStep) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, nextStep); return ResultBuilder.buildResult(result); }
Result getResult() { CompositeResultData compositeResultData = ResultBuilder.createCompositeResultData(); compositeResultData.setHeader("************************* Execution Summary ***********************\nScript file: " + filePath); for (int i = 0; i < this.commandAndStatusList.size(); i++) { int commandSrNo = i + 1; SectionResultData section = compositeResultData.addSection(""+(i+1)); CommandAndStatus commandAndStatus = commandAndStatusList.get(i); section.addData("Command-"+String.valueOf(commandSrNo), commandAndStatus.command); section.addData("Status", commandAndStatus.status); if (i != this.commandAndStatusList.size()) { section.setFooter(Gfsh.LINE_SEPARATOR); } } return ResultBuilder.buildResult(compositeResultData); }
public static CommandResult getDisplayResultFromArgs(GfJsonObject args) { SectionResultData sectionData = new SectionResultData(args); CompositeResultData data = ResultBuilder.createCompositeResultData(); data.addSection(sectionData); return (CommandResult) ResultBuilder.buildResult(data); }
public static Result createSimpleStepResult(String nextStep) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, nextStep); return ResultBuilder.buildResult(result); }
public static CommandResult getDisplayResultFromArgs(GfJsonObject args) { SectionResultData sectionData = new SectionResultData(args); CompositeResultData data = ResultBuilder.createCompositeResultData(); data.addSection(sectionData); return (CommandResult) ResultBuilder.buildResult(data); }
public static Result createEmptyResult(String step) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); return ResultBuilder.buildResult(result); }
Result getResult() { CompositeResultData compositeResultData = ResultBuilder.createCompositeResultData(); compositeResultData.setHeader("************************* Execution Summary ***********************\nScript file: " + filePath); for (int i = 0; i < this.commandAndStatusList.size(); i++) { int commandSrNo = i + 1; SectionResultData section = compositeResultData.addSection(""+(i+1)); CommandAndStatus commandAndStatus = commandAndStatusList.get(i); section.addData("Command-"+String.valueOf(commandSrNo), commandAndStatus.command); section.addData("Status", commandAndStatus.status); if (commandAndStatus.status.equals("FAILED")) { compositeResultData.setStatus(com.gemstone.gemfire.management.cli.Result.Status.ERROR); } if (i != this.commandAndStatusList.size()) { section.setFooter(Gfsh.LINE_SEPARATOR); } } return ResultBuilder.buildResult(compositeResultData); }
public static Result createBannerResult(String fields[], Object values[], String step) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.length != values.length) { throw new RuntimeException("Fields array and its value arraylength dont match"); } for (int i = 0; i < fields.length; i++) { page.addData(fields[i], values[i]); } return ResultBuilder.buildResult(result); }
public static Result createBannerResult(String fields[], Object values[], String step) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.length != values.length) { throw new RuntimeException("Fields array and its value arraylength dont match"); } for (int i = 0; i < fields.length; i++) { page.addData(fields[i], values[i]); } return ResultBuilder.buildResult(result); }
public static Result createPageResult(String fields[], Object values[], String step, String[] header, Object[][] table) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.length != values.length) throw new RuntimeException("Fields array and its value arraylength dont match"); for (int i = 0; i < fields.length; i++) { page.addData(fields[i], values[i]); } createPageTableAndBanner(page, header, table); return ResultBuilder.buildResult(result); }
public static Result createPageResult(String fields[], Object values[], String step, String[] header, Object[][] table) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); SectionResultData page = result.addSection(ARG_SECTION); if (fields.length != values.length) throw new RuntimeException("Fields array and its value arraylength dont match"); for (int i = 0; i < fields.length; i++) { page.addData(fields[i], values[i]); } createPageTableAndBanner(page, header, table); return ResultBuilder.buildResult(result); }
public static Result createStepSeqResult(CLIStep[] steps) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, steps[0].getName()); String[] array = new String[steps.length]; for (int i = 0; i < steps.length; i++) { array[i] = steps[i++].getName(); } section.addData(NEXT_STEP_NAMES, array); return ResultBuilder.buildResult(result); }
public static Result createStepSeqResult(CLIStep[] steps) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, steps[0].getName()); String[] array = new String[steps.length]; for (int i = 0; i < steps.length; i++) { array[i] = steps[i++].getName(); } section.addData(NEXT_STEP_NAMES, array); return ResultBuilder.buildResult(result); }
if(errorString!=null){ CompositeResultData data = ResultBuilder.createCompositeResultData(); SectionResultData section = data.addSection(); section.addData("Message", errorString); CompositeResultData data = ResultBuilder.createCompositeResultData(); SectionResultData section = data.addSection(); TabularResultData table = section.addTable();
if(errorString!=null){ CompositeResultData data = ResultBuilder.createCompositeResultData(); SectionResultData section = data.addSection(); section.addData("Message", errorString); CompositeResultData data = ResultBuilder.createCompositeResultData(); SectionResultData section = data.addSection(); TabularResultData table = section.addTable();