public ObjectResultData<T> addObject(T infoBean) { try { contentObject.accumulateAsJSONObject(OBJECTS_ACCESSOR, infoBean); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData setFooter(String footerText) { try { sectionGfJsonObject.put(RESULT_FOOTER, footerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public TabularResultData accumulate(String accumulateFor, Object value) { try { contentObject.accumulate(accumulateFor, value); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public CompositeResultData addSeparator(char buildSeparatorFrom) { try { contentObject.put(SEPARATOR, buildSeparatorFrom); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData setHeader(String headerText) { try { sectionGfJsonObject.put(RESULT_HEADER, headerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData addData(String name, Object value) { try { sectionGfJsonObject.put(name, value); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public ObjectResultData<T> addObject(T infoBean) { try { contentObject.accumulateAsJSONObject(OBJECTS_ACCESSOR, infoBean); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public ObjectResultData<T> addCollection(Collection<T> infoBeans) { for (T infoBean : infoBeans) { try { contentObject.accumulateAsJSONObject(OBJECTS_ACCESSOR, infoBean); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } } return this; }
public SectionResultData setHeader(String headerText) { try { sectionGfJsonObject.put(RESULT_HEADER, headerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData addSeparator(char buildSeparatorFrom) { try { sectionGfJsonObject.put(SEPARATOR, buildSeparatorFrom); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public CompositeResultData addSeparator(char buildSeparatorFrom) { try { contentObject.put(SEPARATOR, buildSeparatorFrom); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public static byte[] getByteArray(GfJsonObject jsonObject, String byName) { byte[] byteArray = null; try { GfJsonArray jsonArray = jsonObject.getJSONArray(byName); byteArray = GfJsonArray.toByteArray(jsonArray); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return byteArray; }
public static byte[] getByteArray(GfJsonObject jsonObject, String byName) { byte[] byteArray = null; try { GfJsonArray jsonArray = jsonObject.getJSONArray(byName); byteArray = GfJsonArray.toByteArray(jsonArray); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return byteArray; }
public static String[] getStringArray(GfJsonObject jsonObject, String byName) { String[] stringArray = null; try { GfJsonArray jsonArray = jsonObject.getJSONArray(byName); stringArray = GfJsonArray.toStringArray(jsonArray); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return stringArray; }
public SectionResultData addSection(SectionResultData otherSection) { String keyToAccess = String.valueOf(subsectionCount); GfJsonObject sectionData = otherSection.getSectionGfJsonObject(); try { contentObject.putAsJSONObject(SectionResultData.generateSectionKey(keyToAccess), sectionData); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } subsectionCount++; return new SectionResultData(sectionData); }
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; }
public SectionResultData addSection(String keyToAccess) { GfJsonObject sectionData = new GfJsonObject(); try { contentObject.putAsJSONObject(SectionResultData.generateSectionKey(keyToAccess), sectionData); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } subsectionCount++; return new SectionResultData(sectionData); }
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; }
public SectionResultData addSection(String keyToAccess) { GfJsonObject sectionData = new GfJsonObject(); try { contentObject.putAsJSONObject(SectionResultData.generateSectionKey(keyToAccess), sectionData); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } subsectionCount++; return new SectionResultData(sectionData); }
public SectionResultData addSection(String keyToAccess) { GfJsonObject sectionData = new GfJsonObject(); try { sectionGfJsonObject.putAsJSONObject(generateSectionKey(keyToAccess), sectionData); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } subsectionCount++; return new SectionResultData(sectionData); }