/** {@inheritDoc} */ @Override public InputStream getAdhocGraph(ResourceId resourceId, String title, String[] dataSources, String[] aggregateFunctions, String[] colors, String[] dataSourceTitles, String[] styles, long start, long end) { Assert.notNull(resourceId, "resourceId argument cannot be null"); Assert.notNull(title, "title argument cannot be null"); Assert.notNull(dataSources, "dataSources argument cannot be null"); Assert.notNull(aggregateFunctions, "aggregateFunctions argument cannot be null"); Assert.notNull(colors, "colors argument cannot be null"); Assert.notNull(dataSourceTitles, "dataSourceTitles argument cannot be null"); Assert.notNull(styles, "styles argument cannot be null"); Assert.isTrue(end > start, "end time must be after start time"); AdhocGraphType t = m_graphDao.findAdhocGraphTypeByName("performance"); OnmsResource r = m_resourceDao.getResourceById(resourceId); Assert.notNull(r, "resource \"" + resourceId + "\" could not be located"); String command = createAdHocCommand(t, r, start, end, title, dataSources, aggregateFunctions, colors, dataSourceTitles, styles); return getInputStreamForCommand(command); }
/** {@inheritDoc} */ @Override public InputStream getAdhocGraph(ResourceId resourceId, String title, String[] dataSources, String[] aggregateFunctions, String[] colors, String[] dataSourceTitles, String[] styles, long start, long end) { Assert.notNull(resourceId, "resourceId argument cannot be null"); Assert.notNull(title, "title argument cannot be null"); Assert.notNull(dataSources, "dataSources argument cannot be null"); Assert.notNull(aggregateFunctions, "aggregateFunctions argument cannot be null"); Assert.notNull(colors, "colors argument cannot be null"); Assert.notNull(dataSourceTitles, "dataSourceTitles argument cannot be null"); Assert.notNull(styles, "styles argument cannot be null"); Assert.isTrue(end > start, "end time must be after start time"); AdhocGraphType t = m_graphDao.findAdhocGraphTypeByName("performance"); OnmsResource r = m_resourceDao.getResourceById(resourceId); Assert.notNull(r, "resource \"" + resourceId + "\" could not be located"); String command = createAdHocCommand(t, r, start, end, title, dataSources, aggregateFunctions, colors, dataSourceTitles, styles); return getInputStreamForCommand(command); }