/** * Creates a {@link TableMetadata} object from the question. * * @param question The question * @return The resulting {@link TableMetadata} object */ public static TableMetadata createMetadata(Question question) { List<ColumnMetadata> columnMetadata = COLUMN_METADATA.values().stream().collect(ImmutableList.toImmutableList()); String textDesc = String.format( "Filters {%s} contain an unreachable line: ${%s}", COL_SOURCES, COL_UNREACHABLE_LINE); DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc(); } return new TableMetadata(columnMetadata, textDesc); }
public static TableMetadata createMetadata(Question question) { String textDesc = DEFAULT_TEXT_DESC; DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc(); } return new TableMetadata(COLUMN_METADATA, textDesc); } }
public static TableMetadata createMetadata(Question question) { String textDesc = DEFAULT_TEXT_DESC; DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc(); } return new TableMetadata(COLUMN_METADATA, textDesc); }
/** Create table metadata for this answer. */ private static TableMetadata createTableMetaData(Question question) { List<ColumnMetadata> columnMetadata = getColumnMetadata(); String textDesc = String.format( " IPSec peering session between initiator ${%s} with interface {%s} and IP ${%s} and responder ${%s} with interface {%s} and IP ${%s}s has status ${%s}.", COL_INITIATOR, COL_INIT_INTERFACE, COL_INIT_IP, COL_RESPONDER, COL_RESPONDER_INTERFACE, COL_RESPONDER_IP, COL_STATUS); DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc(); } return new TableMetadata(columnMetadata, textDesc); }
"On ${%s} session ${%s}:${%s} has status ${%s}.", COL_NODE, COL_VRF, COL_REMOTE_IP, COL_ESTABLISHED_STATUS); DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc();
"On ${%s} session ${%s}:${%s} has configured status ${%s}.", COL_NODE, COL_VRF, COL_REMOTE_IP, COL_CONFIGURED_STATUS); DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc();