Mercurial > hg > thermostat-ng > agent
changeset 1724:3825a03e819a
Remove DescriptorMetadata and related factory interface.
Reviewed-by: neugens
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-April/013486.html
PR2101
line wrap: on
line diff
--- a/host-cpu/common/src/main/java/com/redhat/thermostat/host/cpu/common/internal/CpuStatDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/host-cpu/common/src/main/java/com/redhat/thermostat/host/cpu/common/internal/CpuStatDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -43,8 +43,6 @@ import com.redhat.thermostat.storage.core.HostBoundaryPojoGetter; import com.redhat.thermostat.storage.core.HostLatestPojoListGetter; import com.redhat.thermostat.storage.core.HostTimeIntervalPojoListGetter; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -78,11 +76,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/host-memory/common/src/main/java/com/redhat/thermostat/host/memory/common/internal/MemoryStatDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/host-memory/common/src/main/java/com/redhat/thermostat/host/memory/common/internal/MemoryStatDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -43,8 +43,6 @@ import com.redhat.thermostat.storage.core.HostBoundaryPojoGetter; import com.redhat.thermostat.storage.core.HostLatestPojoListGetter; import com.redhat.thermostat.storage.core.HostTimeIntervalPojoListGetter; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -75,11 +73,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/integration-tests/itest-run/src/test/java/com/redhat/thermostat/itest/WebAppTestStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/integration-tests/itest-run/src/test/java/com/redhat/thermostat/itest/WebAppTestStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -38,8 +38,6 @@ import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; public class WebAppTestStatementDescriptorRegistration implements @@ -50,11 +48,5 @@ return WebAppTest.TRUSTED_DESCRIPTORS; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/notes/common/src/main/java/com/redhat/thermostat/notes/common/internal/HostNotesStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/notes/common/src/main/java/com/redhat/thermostat/notes/common/internal/HostNotesStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,8 +39,6 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -59,11 +57,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, PreparedParameter[] params) { - String agentId; - throw new AssertionError("Should not be used"); - } - }
--- a/notes/common/src/main/java/com/redhat/thermostat/notes/common/internal/VmNotesStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/notes/common/src/main/java/com/redhat/thermostat/notes/common/internal/VmNotesStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,8 +39,6 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -59,10 +57,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/numa/common/src/main/java/com/redhat/thermostat/numa/common/internal/NumaDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/numa/common/src/main/java/com/redhat/thermostat/numa/common/internal/NumaDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -43,8 +43,6 @@ import com.redhat.thermostat.storage.core.HostBoundaryPojoGetter; import com.redhat.thermostat.storage.core.HostLatestPojoListGetter; import com.redhat.thermostat.storage.core.HostTimeIntervalPojoListGetter; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -87,11 +85,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/numa/common/src/test/java/com/redhat/thermostat/numa/common/internal/NumaDAOImplStatementDescriptorRegistrationTest.java Tue Mar 31 12:34:20 2015 +0200 +++ b/numa/common/src/test/java/com/redhat/thermostat/numa/common/internal/NumaDAOImplStatementDescriptorRegistrationTest.java Wed Apr 01 15:53:08 2015 +0200 @@ -40,9 +40,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.HashSet; @@ -52,11 +49,6 @@ import org.junit.Test; -import com.redhat.thermostat.numa.common.NumaDAO; -import com.redhat.thermostat.storage.core.HostLatestPojoListGetter; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; -import com.redhat.thermostat.storage.core.auth.StatementDescriptorMetadataFactory; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.storage.internal.dao.DAOImplStatementDescriptorRegistration;
--- a/storage-profile/common/src/main/java/com/redhat/thermostat/storage/profile/internal/StorageProfileCommand.java Tue Mar 31 12:34:20 2015 +0200 +++ b/storage-profile/common/src/main/java/com/redhat/thermostat/storage/profile/internal/StorageProfileCommand.java Wed Apr 01 15:53:08 2015 +0200 @@ -49,13 +49,11 @@ import com.redhat.thermostat.storage.core.Cursor; import com.redhat.thermostat.storage.core.DescriptorParsingException; import com.redhat.thermostat.storage.core.Key; -import com.redhat.thermostat.storage.core.PreparedParameter; import com.redhat.thermostat.storage.core.PreparedStatement; import com.redhat.thermostat.storage.core.StatementDescriptor; import com.redhat.thermostat.storage.core.StatementExecutionException; import com.redhat.thermostat.storage.core.Storage; import com.redhat.thermostat.storage.core.auth.CategoryRegistration; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.storage.model.AggregateCount; @@ -414,11 +412,6 @@ } @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, PreparedParameter[] params) { - return new DescriptorMetadata(); - } - - @Override public Set<String> getStatementDescriptors() { Set<String> result = new HashSet<>(); result.add(CLEAR_ALL_DATA);
--- a/storage/core/src/main/java/com/redhat/thermostat/storage/core/auth/DescriptorMetadata.java Tue Mar 31 12:34:20 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* - * Copyright 2012-2015 Red Hat, Inc. - * - * This file is part of Thermostat. - * - * Thermostat is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2, or (at your - * option) any later version. - * - * Thermostat is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Thermostat; see the file COPYING. If not see - * <http://www.gnu.org/licenses/>. - * - * Linking this code with other modules is making a combined work - * based on this code. Thus, the terms and conditions of the GNU - * General Public License cover the whole combination. - * - * As a special exception, the copyright holders of this code give - * you permission to link this code with independent modules to - * produce an executable, regardless of the license terms of these - * independent modules, and to copy and distribute the resulting - * executable under terms of your choice, provided that you also - * meet, for each linked independent module, the terms and conditions - * of the license of that module. An independent module is a module - * which is not derived from or based on this code. If you modify - * this code, you may extend this exception to your version of the - * library, but you are not obligated to do so. If you do not wish - * to do so, delete this exception statement from your version. - */ - -package com.redhat.thermostat.storage.core.auth; - -import com.redhat.thermostat.storage.core.Key; -import com.redhat.thermostat.storage.core.StatementDescriptor; - -/** - * Data describing a statement descriptor. - * - * @see StatementDescriptor - * @deprecated This class will be removed in the next release. - */ -// FIXME: Thermostat 2.0 Remove this unused class. -@Deprecated -public final class DescriptorMetadata { - - private final String agentId; - private final String vmId; - - /** - * Constructor. - * - * @param agentId A non-null string representation of the agent UUID. - * @param vmId A non-null string representation of the vm UUID. - */ - public DescriptorMetadata(String agentId, String vmId) { - this.agentId = agentId; - this.vmId = vmId; - } - - /** - * Constructor, setting vmId null. - * - * @param agentId A non-null string representation of the agent UUID. - */ - public DescriptorMetadata(String agentId) { - this(agentId, null); - } - - /** - * Constructor, setting agentId and vmId null. - */ - public DescriptorMetadata() { - this(null, null); - } - - /** - * @return The value of the {@link Key#AGENT_ID} parameter which was used to - * complete the query or null if there was none. - */ - public final String getAgentId() { - return agentId; - } - - /** - * @return The value of the {@link Key#VM_ID} parameter which was used to - * complete the query or null if there was none. - */ - public final String getVmId() { - return vmId; - } - - /** - * - * @return true if there is a {@link Key#AGENT_ID} parameter, false otherwise. - */ - public final boolean hasAgentId() { - return agentId != null; - } - - /** - * - * @return true if there is a {@link Key#VM_ID} parameter, false otherwise. - */ - public final boolean hasVmId() { - return vmId != null; - } - -} -
--- a/storage/core/src/main/java/com/redhat/thermostat/storage/core/auth/StatementDescriptorMetadataFactory.java Tue Mar 31 12:34:20 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* - * Copyright 2012-2015 Red Hat, Inc. - * - * This file is part of Thermostat. - * - * Thermostat is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2, or (at your - * option) any later version. - * - * Thermostat is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Thermostat; see the file COPYING. If not see - * <http://www.gnu.org/licenses/>. - * - * Linking this code with other modules is making a combined work - * based on this code. Thus, the terms and conditions of the GNU - * General Public License cover the whole combination. - * - * As a special exception, the copyright holders of this code give - * you permission to link this code with independent modules to - * produce an executable, regardless of the license terms of these - * independent modules, and to copy and distribute the resulting - * executable under terms of your choice, provided that you also - * meet, for each linked independent module, the terms and conditions - * of the license of that module. An independent module is a module - * which is not derived from or based on this code. If you modify - * this code, you may extend this exception to your version of the - * library, but you are not obligated to do so. If you do not wish - * to do so, delete this exception statement from your version. - */ - -package com.redhat.thermostat.storage.core.auth; - -import com.redhat.thermostat.storage.core.PreparedParameter; - -/** - * Factory for {@link DescriptorMetadata}. The web storage entpoint uses these - * factories in order to instantiate DescriptorMetadata objects for descriptors. - * - * @deprecated This interface will be removed in the next release. - */ -@Deprecated -public interface StatementDescriptorMetadataFactory { - - /** - * @param descriptor - * The string representation of the statement descriptor for - * which to get the metadata for. - * @param params - * An array containing free parameter values for the given - * descriptor. This is guaranteed to be not null and has the same - * number of elements (in the same order) as the original query - * descriptor had free variables. - * @return The metadata describing the descriptor. - * - * @see DescriptorMetadata - */ - DescriptorMetadata getDescriptorMetadata(String descriptor, PreparedParameter[] params); -} -
--- a/storage/core/src/main/java/com/redhat/thermostat/storage/core/auth/StatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/core/auth/StatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -47,8 +47,7 @@ * the set of all trusted statement descriptors. * */ -// FIXME: Thermostat 2.0 This interface should no longer extend StatementDescriptorMetadataFactory -public interface StatementDescriptorRegistration extends StatementDescriptorMetadataFactory { +public interface StatementDescriptorRegistration { /** *
--- a/storage/core/src/main/java/com/redhat/thermostat/storage/internal/dao/DAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/storage/core/src/main/java/com/redhat/thermostat/storage/internal/dao/DAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -40,7 +40,6 @@ import java.util.Set; import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -82,11 +81,5 @@ return daoDescs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/storage/core/src/test/java/com/redhat/thermostat/storage/core/auth/DescriptorMetadataTest.java Tue Mar 31 12:34:20 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* - * Copyright 2012-2015 Red Hat, Inc. - * - * This file is part of Thermostat. - * - * Thermostat is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2, or (at your - * option) any later version. - * - * Thermostat is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Thermostat; see the file COPYING. If not see - * <http://www.gnu.org/licenses/>. - * - * Linking this code with other modules is making a combined work - * based on this code. Thus, the terms and conditions of the GNU - * General Public License cover the whole combination. - * - * As a special exception, the copyright holders of this code give - * you permission to link this code with independent modules to - * produce an executable, regardless of the license terms of these - * independent modules, and to copy and distribute the resulting - * executable under terms of your choice, provided that you also - * meet, for each linked independent module, the terms and conditions - * of the license of that module. An independent module is a module - * which is not derived from or based on this code. If you modify - * this code, you may extend this exception to your version of the - * library, but you are not obligated to do so. If you do not wish - * to do so, delete this exception statement from your version. - */ - -package com.redhat.thermostat.storage.core.auth; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -public class DescriptorMetadataTest { - - @Test - public void testBasics() { - DescriptorMetadata metaData = new DescriptorMetadata(); - assertNull(metaData.getAgentId()); - assertNull(metaData.getVmId()); - assertFalse(metaData.hasAgentId()); - assertFalse(metaData.hasVmId()); - - String agentId = "some-agent-id"; - - metaData = new DescriptorMetadata(agentId); - assertNotNull(metaData.getAgentId()); - assertEquals(agentId, metaData.getAgentId()); - assertTrue(metaData.hasAgentId()); - assertNull(metaData.getVmId()); - assertFalse(metaData.hasVmId()); - - String vmId = "some vm id"; - metaData = new DescriptorMetadata(agentId, vmId); - assertNotNull(metaData.getAgentId()); - assertEquals(agentId, metaData.getAgentId()); - assertTrue(metaData.hasAgentId()); - assertNotNull(metaData.getVmId()); - assertTrue(metaData.hasVmId()); - assertEquals(vmId, metaData.getVmId()); - } -} -
--- a/thread/collector/src/main/java/com/redhat/thermostat/thread/dao/impl/ThreadDaoImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/thread/collector/src/main/java/com/redhat/thermostat/thread/dao/impl/ThreadDaoImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -36,12 +36,11 @@ package com.redhat.thermostat.thread.dao.impl; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; -import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import java.util.HashSet; import java.util.Set; +import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; + /** * Registers prepared queries issued by this maven module via * via {@link ThreadDaoImpl}. @@ -73,11 +72,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/vm-classstat/common/src/main/java/com/redhat/thermostat/vm/classstat/common/internal/VmClassStatDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-classstat/common/src/main/java/com/redhat/thermostat/vm/classstat/common/internal/VmClassStatDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,11 +39,9 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; import com.redhat.thermostat.storage.core.VmBoundaryPojoGetter; import com.redhat.thermostat.storage.core.VmLatestPojoListGetter; import com.redhat.thermostat.storage.core.VmTimeIntervalPojoListGetter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.vm.classstat.common.VmClassStatDAO; @@ -75,11 +73,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/vm-cpu/common/src/main/java/com/redhat/thermostat/vm/cpu/common/internal/VmCpuStatDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-cpu/common/src/main/java/com/redhat/thermostat/vm/cpu/common/internal/VmCpuStatDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,11 +39,9 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; import com.redhat.thermostat.storage.core.VmBoundaryPojoGetter; import com.redhat.thermostat.storage.core.VmLatestPojoListGetter; import com.redhat.thermostat.storage.core.VmTimeIntervalPojoListGetter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.vm.cpu.common.VmCpuStatDAO; @@ -75,12 +73,6 @@ descs.add(rangeDescriptor); return descs; } - - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } }
--- a/vm-gc/common/src/main/java/com/redhat/thermostat/vm/gc/common/internal/VmGcStatDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-gc/common/src/main/java/com/redhat/thermostat/vm/gc/common/internal/VmGcStatDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,9 +39,7 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; import com.redhat.thermostat.storage.core.VmLatestPojoListGetter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.vm.gc.common.VmGcStatDAO; @@ -66,11 +64,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/internal/HeapDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-heap-analysis/common/src/main/java/com/redhat/thermostat/vm/heap/analysis/common/internal/HeapDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,8 +39,6 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -60,13 +58,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - - - }
--- a/vm-io/common/src/main/java/com/redhat/thermostat/vm/io/common/internal/VmIoStatDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-io/common/src/main/java/com/redhat/thermostat/vm/io/common/internal/VmIoStatDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,11 +39,9 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; import com.redhat.thermostat.storage.core.VmBoundaryPojoGetter; import com.redhat.thermostat.storage.core.VmLatestPojoListGetter; import com.redhat.thermostat.storage.core.VmTimeIntervalPojoListGetter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -74,9 +72,4 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/vm-jmx/common/src/main/java/com/redhat/thermostat/vm/jmx/common/internal/JmxNotificationDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-jmx/common/src/main/java/com/redhat/thermostat/vm/jmx/common/internal/JmxNotificationDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,8 +39,6 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; /** @@ -66,11 +64,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/vm-memory/common/src/main/java/com/redhat/thermostat/vm/memory/common/internal/VmMemoryStatDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-memory/common/src/main/java/com/redhat/thermostat/vm/memory/common/internal/VmMemoryStatDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,11 +39,9 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; import com.redhat.thermostat.storage.core.VmBoundaryPojoGetter; import com.redhat.thermostat.storage.core.VmLatestPojoListGetter; import com.redhat.thermostat.storage.core.VmTimeIntervalPojoListGetter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.vm.memory.common.VmMemoryStatDAO; @@ -77,11 +75,5 @@ return descs; } - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - }
--- a/vm-memory/common/src/test/java/com/redhat/thermostat/vm/memory/common/internal/VmMemoryStatDAOImplStatementDescriptorRegistrationTest.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-memory/common/src/test/java/com/redhat/thermostat/vm/memory/common/internal/VmMemoryStatDAOImplStatementDescriptorRegistrationTest.java Wed Apr 01 15:53:08 2015 +0200 @@ -40,9 +40,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.HashSet; @@ -52,13 +49,8 @@ import org.junit.Test; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.VmLatestPojoListGetter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; -import com.redhat.thermostat.storage.core.auth.StatementDescriptorMetadataFactory; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.storage.internal.dao.DAOImplStatementDescriptorRegistration; -import com.redhat.thermostat.vm.memory.common.VmMemoryStatDAO; public class VmMemoryStatDAOImplStatementDescriptorRegistrationTest {
--- a/vm-profiler/common/src/main/java/com/redhat/thermostat/vm/profiler/common/internal/ProfileDAOImplStatementDescriptorRegistration.java Tue Mar 31 12:34:20 2015 +0200 +++ b/vm-profiler/common/src/main/java/com/redhat/thermostat/vm/profiler/common/internal/ProfileDAOImplStatementDescriptorRegistration.java Wed Apr 01 15:53:08 2015 +0200 @@ -39,18 +39,11 @@ import java.util.HashSet; import java.util.Set; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; public class ProfileDAOImplStatementDescriptorRegistration implements StatementDescriptorRegistration { @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, PreparedParameter[] params) { - throw new AssertionError("Should not be used"); - } - - @Override public Set<String> getStatementDescriptors() { Set<String> results = new HashSet<>(); results.add(ProfileDAOImpl.PROFILE_INFO_DESC_ADD);
--- a/web/server/src/test/java/com/redhat/thermostat/web/server/KnownDescriptorRegistryTest.java Tue Mar 31 12:34:20 2015 +0200 +++ b/web/server/src/test/java/com/redhat/thermostat/web/server/KnownDescriptorRegistryTest.java Wed Apr 01 15:53:08 2015 +0200 @@ -48,8 +48,6 @@ import org.junit.Test; -import com.redhat.thermostat.storage.core.PreparedParameter; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; public class KnownDescriptorRegistryTest { @@ -147,12 +145,6 @@ public Set<String> getStatementDescriptors() { return descs; } - - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("should not be used"); - } } }
--- a/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java Tue Mar 31 12:34:20 2015 +0200 +++ b/web/server/src/test/java/com/redhat/thermostat/web/server/WebStorageEndpointTest.java Wed Apr 01 15:53:08 2015 +0200 @@ -122,7 +122,6 @@ import com.redhat.thermostat.storage.core.Query; import com.redhat.thermostat.storage.core.StatementDescriptor; import com.redhat.thermostat.storage.core.auth.CategoryRegistration; -import com.redhat.thermostat.storage.core.auth.DescriptorMetadata; import com.redhat.thermostat.storage.core.auth.StatementDescriptorRegistration; import com.redhat.thermostat.storage.core.experimental.BatchCursor; import com.redhat.thermostat.storage.dao.HostInfoDAO; @@ -1756,12 +1755,6 @@ assertEquals(1, descriptorSet.size()); this.descriptorSet = descriptorSet; } - - @Override - public DescriptorMetadata getDescriptorMetadata(String descriptor, - PreparedParameter[] params) { - throw new AssertionError("should not be used"); - } @Override public Set<String> getStatementDescriptors() {