@Test public void testUrlMaker() { System.err.println(createNodePageUrl("1 of 10")); }
private String createNodePageUrl(final SurveillanceView view, final int colIndex, final int rowIndex) { Set<OnmsCategory> columns = Collections.emptySet(); Set<OnmsCategory> rows = Collections.emptySet(); try { columns = view.getCategoriesForColumn(colIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, column %d", view, colIndex); } try { rows = view.getCategoriesForRow(rowIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, row %d", view, rowIndex); } final List<String> params = new ArrayList<String>(columns.size() + rows.size()); for (final OnmsCategory category : columns) { params.add("category1=" + Util.encode(category.getName())); } for (final OnmsCategory category : rows) { params.add("category2=" + Util.encode(category.getName())); } params.add("nodesWithDownAggregateStatus=true"); return "element/nodeList.htm?" + StringUtils.collectionToDelimitedString(params, "&"); }
DefaultSurveillanceService implements SurveillanceService { private String createNodePageUrl(final SurveillanceView view, final int colIndex, final int rowIndex) { Set<OnmsCategory> columns = Collections.emptySet(); Set<OnmsCategory> rows = Collections.emptySet(); try { columns = view.getCategoriesForColumn(colIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, column %d", view, colIndex); } try { rows = view.getCategoriesForRow(rowIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, row %d", view, rowIndex); } final List<String> params = new ArrayList<String>(columns.size() + rows.size()); for (final OnmsCategory category : columns) { params.add("category1=" + Util.encode(category.getName())); } for (final OnmsCategory category : rows) { params.add("category2=" + Util.encode(category.getName())); } params.add("nodesWithDownAggregateStatus=true"); return "element/nodeList.htm?" + StringUtils.collectionToDelimitedString(params, "&"); } }
DefaultSurveillanceService implements SurveillanceService { private String createNodePageUrl(final SurveillanceView view, final int colIndex, final int rowIndex) { Set<OnmsCategory> columns = Collections.emptySet(); Set<OnmsCategory> rows = Collections.emptySet(); try { columns = view.getCategoriesForColumn(colIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, column %d", view, colIndex); } try { rows = view.getCategoriesForRow(rowIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, row %d", view, rowIndex); } final List<String> params = new ArrayList<String>(columns.size() + rows.size()); for (final OnmsCategory category : columns) { params.add("category1=" + Util.encode(category.getName())); } for (final OnmsCategory category : rows) { params.add("category2=" + Util.encode(category.getName())); } params.add("nodesWithDownAggregateStatus=true"); return "element/nodeList.htm?" + StringUtils.collectionToDelimitedString(params, "&"); }  }
DefaultSurveillanceService implements SurveillanceService { private String createNodePageUrl(final SurveillanceView view, final int colIndex, final int rowIndex) { Set<OnmsCategory> columns = Collections.emptySet(); Set<OnmsCategory> rows = Collections.emptySet(); try { columns = view.getCategoriesForColumn(colIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, column %d", view, colIndex); } try { rows = view.getCategoriesForRow(rowIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, row %d", view, rowIndex); } final List<String> params = new ArrayList<String>(columns.size() + rows.size()); for (final OnmsCategory category : columns) { params.add("category1=" + Util.encode(category.getName())); } for (final OnmsCategory category : rows) { params.add("category2=" + Util.encode(category.getName())); } params.add("nodesWithDownAggregateStatus=true"); return "element/nodeList.htm?" + StringUtils.collectionToDelimitedString(params, "&"); }  SimpleWebTable createSurveillanceTable(); SimpleWebTable createSurveillanceTable(final String surveillanceViewName, final ProgressMonitor progressMonitor); NodeDao getNodeDao(); void setNodeDao(final NodeDao nodeDao); CategoryDao getCategoryDao(); void setCategoryDao(final CategoryDao categoryDao); SurveillanceViewConfigDao getSurveillanceConfigDao(); void setSurveillanceConfigDao(final SurveillanceViewConfigDao surveillanceConfigDao); String getHeaderRefreshSeconds(final String viewName); boolean isViewName(final String viewName); List<String> getViewNames(); }
DefaultSurveillanceService implements SurveillanceService { private String createNodePageUrl(final SurveillanceView view, final int colIndex, final int rowIndex) { Set<OnmsCategory> columns = Collections.emptySet(); Set<OnmsCategory> rows = Collections.emptySet(); try { columns = view.getCategoriesForColumn(colIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, column %d", view, colIndex); } try { rows = view.getCategoriesForRow(rowIndex); } catch (final ObjectRetrievalFailureException e) { LogUtils.warnf(this, "An error occurred while getting categories for view %s, row %d", view, rowIndex); } final List<String> params = new ArrayList<String>(columns.size() + rows.size()); for (final OnmsCategory category : columns) { params.add("category1=" + Util.encode(category.getName())); } for (final OnmsCategory category : rows) { params.add("category2=" + Util.encode(category.getName())); } params.add("nodesWithDownAggregateStatus=true"); return "element/nodeList.htm?" + StringUtils.collectionToDelimitedString(params, "&"); }  SimpleWebTable createSurveillanceTable(); SimpleWebTable createSurveillanceTable(final String surveillanceViewName, final ProgressMonitor progressMonitor); NodeDao getNodeDao(); void setNodeDao(final NodeDao nodeDao); CategoryDao getCategoryDao(); void setCategoryDao(final CategoryDao categoryDao); SurveillanceViewConfigDao getSurveillanceConfigDao(); void setSurveillanceConfigDao(final SurveillanceViewConfigDao surveillanceConfigDao); String getHeaderRefreshSeconds(final String viewName); boolean isViewName(final String viewName); List<String> getViewNames();  }