use of com.att.aro.core.bestpractice.pojo.FileOrderEntry in project VideoOptimzer by attdevsupport.
the class FileOrderImpl method runTest.
@Override
public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) {
FileOrderResult result = new FileOrderResult();
List<FileOrderEntry> results = new ArrayList<FileOrderEntry>();
for (Session session : tracedata.getSessionlist()) {
HttpRequestResponseInfo lastRequestObj = null;
for (HttpRequestResponseInfo req : session.getRequestResponseInfo()) {
Document doc = null;
if (req.getDirection() == HttpDirection.RESPONSE) {
doc = parseHtml(req, session);
} else if (req.getDirection() == HttpDirection.REQUEST) {
lastRequestObj = req;
}
if (doc != null && checkFileOrderAnalysisResults(doc, result)) {
results.add(new FileOrderEntry(req, lastRequestObj, session.getDomainName()));
}
}
}
String text = "";
if (results.isEmpty()) {
result.setResultType(BPResultType.PASS);
text = MessageFormat.format(textResultPass, ApplicationConfig.getInstance().getAppShortName(), results.size());
result.setResultExcelText(BPResultType.PASS.getDescription());
} else {
result.setResultType(BPResultType.FAIL);
if (results.size() > 1) {
text = MessageFormat.format(textResults, ApplicationConfig.getInstance().getAppShortName(), results.size());
} else {
text = MessageFormat.format(textResult, ApplicationConfig.getInstance().getAppShortName(), results.size());
}
result.setResultExcelText(MessageFormat.format(textExcelResults, BPResultType.FAIL.getDescription(), results.size()));
}
result.setResultText(text);
result.setResults(results);
result.setAboutText(aboutText);
result.setDetailTitle(detailTitle);
result.setLearnMoreUrl(learnMoreUrl);
result.setOverviewTitle(overviewTitle);
result.setTextResult(textResult);
result.setExportAll(exportAll);
return result;
}
use of com.att.aro.core.bestpractice.pojo.FileOrderEntry in project VideoOptimzer by attdevsupport.
the class BpHtmlFileOrderTablePanel method getContentTable.
/**
* Initializes and returns the RequestResponseTable.
*/
@SuppressWarnings("unchecked")
public DataTable<FileOrderEntry> getContentTable() {
if (contentTable == null) {
contentTable = new DataTable<FileOrderEntry>(tableModel);
contentTable.setName(ResourceBundleHelper.getMessageString("html.file.order.tableName"));
contentTable.setAutoCreateRowSorter(true);
contentTable.setGridColor(Color.LIGHT_GRAY);
contentTable.setRowHeight(ROW_HEIGHT);
contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
DataTablePopupMenu popupMenu = (DataTablePopupMenu) contentTable.getPopup();
popupMenu.initialize();
}
return contentTable;
}
Aggregations