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); }
/** * Convenience method to create a simple Info Result that takes a message. * * @param message * Message for the OK Result * @return Result of InfoResultData type */ public static Result createInfoResult(String message) { InfoResultData infoResultData = new InfoResultData(); infoResultData.addLine(message); return buildResult(infoResultData); }
public void newBlankRow() { Row row = newRow(); row.newCenterCol(""); row.isBlank = true; }
public static CommandResult getDisplayResultFromArgs(GfJsonObject args) { SectionResultData sectionData = new SectionResultData(args); CompositeResultData data = ResultBuilder.createCompositeResultData(); data.addSection(sectionData); return (CommandResult) ResultBuilder.buildResult(data); }
private int[] computeColSizes(boolean isTabularResult) { int[] localColSizes = new int[getNumCols()]; for (int i = 0; i < localColSizes.length; i++) { localColSizes[i] = getMaxColLength(i); } if (isTabularResult) { localColSizes = TableBuilderHelper.recalculateColSizesForScreen( TableBuilderHelper.getScreenWidth(), localColSizes, getColumnSeparator()); } return localColSizes; }
public TabularResultData addTable(String keyToAccess) { TabularResultData tabularResultData = ResultBuilder.createTabularResultData(); GfJsonObject tableData = tabularResultData.getGfJsonObject(); try { sectionGfJsonObject.putAsJSONObject(generateTableKey(keyToAccess), tableData); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } tablesCount++; return tabularResultData; }
private void addHeaderInTable(Table resultTable, GfJsonObject fromJsonObject) { String header = getHeader(fromJsonObject); if (header != null && !header.isEmpty()) { resultTable.newRow().newLeftCol(header); } }
private void addFooterInTable(Table resultTable, GfJsonObject fromJsonObject) { String footer = getFooter(fromJsonObject); if (footer != null && !footer.isEmpty()) { resultTable.newRow().newLeftCol(footer); } }
private void addFooterInRowGroup(RowGroup rowGroup, GfJsonObject fromJsonObject) { String footer = getFooter(fromJsonObject); if (footer != null && !footer.isEmpty()) { rowGroup.newRow().newLeftCol(footer); } }
private void addHeaderInRowGroup(RowGroup rowGroup, GfJsonObject fromJsonObject) { String header = getHeader(fromJsonObject); if (header != null && !header.isEmpty()) { rowGroup.newRow().newLeftCol(header); } }
private Result createErrorResult(String message) { ErrorResultData erd = ResultBuilder.createErrorResultData(); erd.addLine(message); return ResultBuilder.buildResult(erd); }
public void newBlankRow() { RowGroup rowGroup = newRowGroup(); rowGroup.newBlankRow(); }
public Row newRow() { RowGroup rowGroup = newRowGroup(); return rowGroup.newRow(); }
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); }
/** * Convenience method to create a simple Info Result that takes a message. * * @param message * Message for the OK Result * @return Result of InfoResultData type */ public static Result createInfoResult(String message) { InfoResultData infoResultData = new InfoResultData(); infoResultData.addLine(message); return buildResult(infoResultData); }
private Result createErrorResult(String message) { ErrorResultData erd = ResultBuilder.createErrorResultData(); erd.addLine(message); return ResultBuilder.buildResult(erd); }
public void newBlankRow() { Row row = newRow(); row.newCenterCol(""); row.isBlank = true; }
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 Result createEmptyResult(String step) { CompositeResultData result = ResultBuilder.createCompositeResultData(); SectionResultData section = result.addSection(STEP_SECTION); section.addData(NEXT_STEP_NAME, step); return ResultBuilder.buildResult(result); }