@@ -28,15 +28,15 @@

package org.opennms.core.test;

import junit.framework.AssertionFailedError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;

import junit.framework.AssertionFailedError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* <p>MockLogAppender class. If you do not specify the log level specifically, the level
* will default to DEBUG and you can control the level by setting the <code>mock.logLevel</code>
@@ -28,6 +28,10 @@

package org.opennms.netmgt.measurements.api;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

import com.google.common.base.Function;
import com.google.common.base.Preconditions;
import com.google.common.collect.Collections2;
@@ -36,10 +40,6 @@
import org.apache.commons.lang.ArrayUtils;
import org.opennms.netmgt.jasper.analytics.Filter;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

/**
* Used to store the results of a fetch.
*
@@ -28,6 +28,23 @@

package org.opennms.web.rest.v1;

import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.collect.RowSortedTable;
@@ -51,23 +68,6 @@
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* The Measurements API provides read-only access to values
* persisted by the collectors.
@@ -33,28 +33,22 @@
</instructions>
</configuration>
</plugin>
<!-- TODO MVR verify if this is overwritten by parent -->
<!--<plugin>-->
<!--<groupId>org.apache.maven.plugins</groupId>-->
<!--<artifactId>maven-failsafe-plugin</artifactId>-->
<!--<version>2.16</version>-->
<!--<configuration>-->
<!--<skipITs>${skipITs}</skipITs>-->
<!--<argLine>-Xmx1g -Djava.endorsed.dirs=${basedir}/target/endorsed</argLine>-->
<!--<systemPropertyVariables>-->
<!--<opennms.home>${project.build.testOutputDirectory}</opennms.home>-->
<!--<java.endorsed.dirs>${basedir}/target/endorsed</java.endorsed.dirs>-->
<!--</systemPropertyVariables>-->
<!--</configuration>-->
<!--<executions>-->
<!--<execution>-->
<!--<goals>-->
<!--<goal>integration-test</goal>-->
<!--<goal>verify</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<opennms.home>${project.build.testOutputDirectory}</opennms.home>
<java.endorsed.dirs>${basedir}/target/endorsed</java.endorsed.dirs>
<ssl.debug>true</ssl.debug>
<javax.net.debug>ssl,handshake,verbose</javax.net.debug>
<javax.net.ssl.keyStore>target/test-keystore.jks</javax.net.ssl.keyStore>
<javax.net.ssl.keyStorePassword>password</javax.net.ssl.keyStorePassword>
<javax.net.ssl.trustStore>target/test-keystore.jks</javax.net.ssl.trustStore>
<javax.net.ssl.trustStorePassword>password</javax.net.ssl.trustStorePassword>
</systemPropertyVariables>
</configuration>
</plugin>
<!-- We create a key for 'localhost' for test purposes -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -79,20 +73,6 @@
<validity>2</validity>
</configuration>
</plugin>
<!-- TODO MVR we need this for failsafe instead of surefire, but who cares ... :) -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<ssl.debug>true</ssl.debug>
<javax.net.debug>ssl,handshake,verbose</javax.net.debug>
<javax.net.ssl.keyStore>target/test-keystore.jks</javax.net.ssl.keyStore>
<javax.net.ssl.keyStorePassword>password</javax.net.ssl.keyStorePassword>
<javax.net.ssl.trustStore>target/test-keystore.jks</javax.net.ssl.trustStore>
<javax.net.ssl.trustStorePassword>password</javax.net.ssl.trustStorePassword>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<!-- TODO MVR optimize dependencies -->
@@ -120,13 +100,6 @@
<groupId>org.opennms</groupId>
<artifactId>opennms-util</artifactId>
</dependency>
<!-- TODO MVR what to do with this dependency?
The measurement API should not have any dependencies to the analytics filter -->
<!--<dependency>-->
<!--<groupId>org.opennms</groupId>-->
<!--<artifactId>analytics-filters</artifactId>-->
<!--<version>${project.version}</version>-->
<!--</dependency>-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
@@ -64,6 +64,10 @@ protected int getRowCount() {
return numberRows;
}

/**
* Returns the supported fields.
* @return The supported fields.
*/
protected List<JRField> getFields() {
List<JRField> fields = new ArrayList<JRField>();