private void addSubSection (SectionResultData section, Map<String, String> attrMap, String headerText) { if (!attrMap.isEmpty()) { SectionResultData subSection = section.addSection(); Set<String> attributes = new TreeSet<String>(attrMap.keySet()); subSection.setHeader(headerText); for (String attribute : attributes) { String attributeValue = attrMap.get(attribute); subSection.addData(attribute, attributeValue); } } } /**
private void addSubSection (SectionResultData section, Map<String, String> attrMap, String headerText) { if (!attrMap.isEmpty()) { SectionResultData subSection = section.addSection(); Set<String> attributes = new TreeSet<String>(attrMap.keySet()); subSection.setHeader(headerText); for (String attribute : attributes) { String attributeValue = attrMap.get(attribute); subSection.addData(attribute, attributeValue); } } } /**
private void addSection(CompositeResultData crd, Map<String, String> attrMap, String headerText) { if (attrMap != null && !attrMap.isEmpty()) { SectionResultData section = crd.addSection(); section.setHeader(headerText); section.addSeparator('.'); Set<String> attributes = new TreeSet<String>(attrMap.keySet()); for (String attribute : attributes) { String attributeValue = attrMap.get(attribute); section.addData(attribute, attributeValue); } } }
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(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 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(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 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(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 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); }
public void addChildSection(SectionResultData parentSection, Map<String, String> map, String header) { if (!map.isEmpty()) { Set<String> attributes = map.keySet(); SectionResultData section = parentSection.addSection(); section.setHeader(header); for (String attribute : attributes) { section.addData(attribute, map.get(attribute)); } } }
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); }
private void addSection(CompositeResultData crd, Map<String, String> attrMap, String headerText) { if (attrMap != null && !attrMap.isEmpty()) { SectionResultData section = crd.addSection(); section.setHeader(headerText); section.addSeparator('.'); Set<String> attributes = new TreeSet<String>(attrMap.keySet()); for (String attribute : attributes) { String attributeValue = attrMap.get(attribute); section.addData(attribute, attributeValue); } } }
public void addChildSection(SectionResultData parentSection, Map<String, String> map, String header) { if (!map.isEmpty()) { Set<String> attributes = map.keySet(); SectionResultData section = parentSection.addSection(); section.setHeader(header); for (String attribute : attributes) { section.addData(attribute, map.get(attribute)); } } }
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); }
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); }