Mercurial > hg > release > thermostat-0.13
changeset 1121:edb423d5d5a0
Statically load natives (+move configuration into separate module).
Reviewed-by: neugens, omajid
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-May/006657.html
line wrap: on
line diff
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/AgentApplication.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/AgentApplication.java Mon May 27 14:12:48 2013 +0200 @@ -63,8 +63,8 @@ import com.redhat.thermostat.common.cli.Arguments; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; import com.redhat.thermostat.storage.core.Connection.ConnectionListener; import com.redhat.thermostat.storage.core.Connection.ConnectionStatus; import com.redhat.thermostat.storage.core.ConnectionException;
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/ServiceCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/ServiceCommand.java Mon May 27 14:12:48 2013 +0200 @@ -53,8 +53,8 @@ import com.redhat.thermostat.common.cli.AbstractCommand; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.tools.ApplicationState; +import com.redhat.thermostat.shared.locale.Translate; /** * Simple service that allows starting Agent and DB Backend
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/DBOptionParser.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/DBOptionParser.java Mon May 27 14:12:48 2013 +0200 @@ -38,10 +38,10 @@ import com.redhat.thermostat.common.cli.Arguments; import com.redhat.thermostat.agent.cli.impl.locale.LocaleResources; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.config.ThermostatOptionParser; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.tools.ApplicationState; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; public class DBOptionParser implements ThermostatOptionParser {
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/DBStartupConfiguration.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/DBStartupConfiguration.java Mon May 27 14:12:48 2013 +0200 @@ -42,8 +42,8 @@ import java.util.Properties; import com.redhat.thermostat.agent.cli.impl.locale.LocaleResources; -import com.redhat.thermostat.common.config.InvalidConfigurationException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.config.StartupConfiguration; public class DBStartupConfiguration implements StartupConfiguration {
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/MongoProcessRunner.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/MongoProcessRunner.java Mon May 27 14:12:48 2013 +0200 @@ -50,13 +50,13 @@ import java.util.logging.Logger; import com.redhat.thermostat.agent.cli.impl.locale.LocaleResources; -import com.redhat.thermostat.common.config.InvalidConfigurationException; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.tools.ApplicationException; import com.redhat.thermostat.common.utils.LoggedExternalProcess; import com.redhat.thermostat.common.utils.LoggingUtils; import com.redhat.thermostat.service.process.UnixProcessUtilities; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; public class MongoProcessRunner {
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/StalePidFileException.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/StalePidFileException.java Mon May 27 14:12:48 2013 +0200 @@ -38,8 +38,8 @@ import java.io.File; import com.redhat.thermostat.agent.cli.impl.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.tools.ApplicationException; +import com.redhat.thermostat.shared.locale.Translate; @SuppressWarnings("serial") public class StalePidFileException extends ApplicationException {
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/StorageCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/db/StorageCommand.java Mon May 27 14:12:48 2013 +0200 @@ -45,11 +45,11 @@ import com.redhat.thermostat.common.cli.Arguments; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.tools.ApplicationException; import com.redhat.thermostat.common.tools.ApplicationState; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; public class StorageCommand extends AbstractStateNotifyingCommand {
--- a/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/main/java/com/redhat/thermostat/agent/cli/impl/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.agent.cli.impl.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/AgentApplicationTest.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/AgentApplicationTest.java Mon May 27 14:12:48 2013 +0200 @@ -74,7 +74,7 @@ import com.redhat.thermostat.common.cli.Arguments; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; import com.redhat.thermostat.storage.core.Connection.ConnectionListener; import com.redhat.thermostat.storage.core.Connection.ConnectionStatus; import com.redhat.thermostat.storage.core.DbService;
--- a/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/db/DBStartupConfigurationTest.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/db/DBStartupConfigurationTest.java Mon May 27 14:12:48 2013 +0200 @@ -46,7 +46,7 @@ import org.junit.Before; import org.junit.Test; -import com.redhat.thermostat.common.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class DBStartupConfigurationTest {
--- a/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/db/MongoProcessRunnerTest.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/db/MongoProcessRunnerTest.java Mon May 27 14:12:48 2013 +0200 @@ -14,7 +14,7 @@ import org.junit.Test; import com.redhat.thermostat.agent.cli.impl.db.MongoProcessRunner; -import com.redhat.thermostat.common.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class MongoProcessRunnerTest {
--- a/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/db/StorageCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/db/StorageCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -61,9 +61,9 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.tools.ApplicationException; import com.redhat.thermostat.common.tools.ApplicationState; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class StorageCommandTest {
--- a/agent/command/src/main/java/com/redhat/thermostat/agent/command/internal/ConfigurationServerContext.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/command/src/main/java/com/redhat/thermostat/agent/command/internal/ConfigurationServerContext.java Mon May 27 14:12:48 2013 +0200 @@ -56,11 +56,11 @@ import com.redhat.thermostat.agent.command.ReceiverRegistry; import com.redhat.thermostat.common.command.ConfigurationCommandContext; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.ssl.SSLContextFactory; import com.redhat.thermostat.common.ssl.SSLConfiguration; import com.redhat.thermostat.common.ssl.SslInitException; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; class ConfigurationServerContext implements ConfigurationCommandContext {
--- a/agent/core/pom.xml Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/pom.xml Mon May 27 14:12:48 2013 +0200 @@ -138,7 +138,9 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> - <argLine>-Djava.library.path=${project.build.directory}/ ${coverageAgent}</argLine> + <systemPropertyVariables> + <com.redhat.thermostat.shared.loader.testNativesHome>${project.build.directory}</com.redhat.thermostat.shared.loader.testNativesHome> + </systemPropertyVariables> </configuration> </plugin>
--- a/agent/core/src/main/java/com/redhat/thermostat/agent/config/AgentConfigsUtils.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/src/main/java/com/redhat/thermostat/agent/config/AgentConfigsUtils.java Mon May 27 14:12:48 2013 +0200 @@ -43,10 +43,10 @@ import java.util.Arrays; import java.util.Properties; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.agent.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; public class AgentConfigsUtils {
--- a/agent/core/src/main/java/com/redhat/thermostat/agent/config/AgentOptionParser.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/src/main/java/com/redhat/thermostat/agent/config/AgentOptionParser.java Mon May 27 14:12:48 2013 +0200 @@ -37,8 +37,8 @@ package com.redhat.thermostat.agent.config; import com.redhat.thermostat.common.cli.Arguments; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.config.ThermostatOptionParser; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class AgentOptionParser implements ThermostatOptionParser {
--- a/agent/core/src/main/java/com/redhat/thermostat/agent/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/src/main/java/com/redhat/thermostat/agent/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -35,7 +35,7 @@ */ package com.redhat.thermostat.agent.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/agent/core/src/main/java/com/redhat/thermostat/utils/hostname/HostName.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/src/main/java/com/redhat/thermostat/utils/hostname/HostName.java Mon May 27 14:12:48 2013 +0200 @@ -36,13 +36,16 @@ package com.redhat.thermostat.utils.hostname; +import com.redhat.thermostat.shared.config.NativeLibraryResolver; + /** * Finds the current host name without doing a DNS lookup */ public class HostName { static { - System.loadLibrary("HostNameWrapper"); + String lib = NativeLibraryResolver.getAbsoluteLibraryPath("HostNameWrapper"); + System.load(lib); } public static String getLocalHostName() {
--- a/agent/core/src/main/java/com/redhat/thermostat/utils/username/internal/UserNameUtilImpl.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/src/main/java/com/redhat/thermostat/utils/username/internal/UserNameUtilImpl.java Mon May 27 14:12:48 2013 +0200 @@ -39,16 +39,14 @@ import java.io.IOException; import com.redhat.thermostat.utils.username.UserNameLookupException; +import com.redhat.thermostat.shared.config.NativeLibraryResolver; import com.redhat.thermostat.utils.username.UserNameUtil; public class UserNameUtilImpl implements UserNameUtil { static { - /* - * TODO Change to System.load - * http://icedtea.classpath.org/pipermail/thermostat/2013-May/006657.html - */ - System.loadLibrary("UserNameUtilWrapper"); + String lib = NativeLibraryResolver.getAbsoluteLibraryPath("UserNameUtilWrapper"); + System.load(lib); } public String getUserName(long uid) throws UserNameLookupException {
--- a/agent/core/src/test/java/com/redhat/thermostat/agent/config/AgentConfigsUtilsTest.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/src/test/java/com/redhat/thermostat/agent/config/AgentConfigsUtilsTest.java Mon May 27 14:12:48 2013 +0200 @@ -45,7 +45,7 @@ import org.junit.BeforeClass; import org.junit.Test; -import com.redhat.thermostat.common.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; import com.redhat.thermostat.testutils.TestUtils; public class AgentConfigsUtilsTest {
--- a/agent/core/src/test/java/com/redhat/thermostat/agent/config/AgentOptionParserTest.java Wed May 29 16:55:11 2013 -0600 +++ b/agent/core/src/test/java/com/redhat/thermostat/agent/config/AgentOptionParserTest.java Mon May 27 14:12:48 2013 +0200 @@ -46,7 +46,7 @@ import org.junit.Test; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; import com.redhat.thermostat.testutils.TestUtils; public class AgentOptionParserTest {
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/HostVMArguments.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/HostVMArguments.java Mon May 27 14:12:48 2013 +0200 @@ -39,7 +39,7 @@ import com.redhat.thermostat.client.cli.internal.LocaleResources; import com.redhat.thermostat.common.cli.Arguments; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.VmRef;
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/ConnectCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/ConnectCommand.java Mon May 27 14:12:48 2013 +0200 @@ -47,8 +47,8 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.config.ClientPreferences; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.tools.StorageAuthInfoGetter; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.ConnectionException; import com.redhat.thermostat.storage.core.DbService; import com.redhat.thermostat.storage.core.DbServiceFactory;
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/DisconnectCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/DisconnectCommand.java Mon May 27 14:12:48 2013 +0200 @@ -43,7 +43,7 @@ import com.redhat.thermostat.common.cli.AbstractCommand; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.ConnectionException; import com.redhat.thermostat.storage.core.DbService;
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/ListVMsCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/ListVMsCommand.java Mon May 27 14:12:48 2013 +0200 @@ -45,7 +45,7 @@ import com.redhat.thermostat.common.cli.AbstractCommand; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.HostInfoDAO;
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.client.cli.internal; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/ShellCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/ShellCommand.java Mon May 27 14:12:48 2013 +0200 @@ -58,10 +58,10 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.Console; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; public class ShellCommand extends AbstractCommand {
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/VMInfoCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/VMInfoCommand.java Mon May 27 14:12:48 2013 +0200 @@ -49,7 +49,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.DAOException;
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/VMListFormatter.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/VMListFormatter.java Mon May 27 14:12:48 2013 +0200 @@ -39,7 +39,7 @@ import java.io.PrintStream; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.model.VmInfo;
--- a/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/VMStatPrinter.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/main/java/com/redhat/thermostat/client/cli/internal/VMStatPrinter.java Mon May 27 14:12:48 2013 +0200 @@ -51,7 +51,7 @@ import com.redhat.thermostat.client.cli.VMStatPrintDelegate; import com.redhat.thermostat.common.OrderedComparator; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.model.TimeStampedPojo; import com.redhat.thermostat.storage.model.TimeStampedPojoComparator;
--- a/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/ConnectCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/ConnectCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -55,7 +55,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.DbService; import com.redhat.thermostat.storage.core.DbServiceFactory; import com.redhat.thermostat.test.TestCommandContextFactory;
--- a/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/DisconnectCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/DisconnectCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -50,7 +50,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.DbService; import com.redhat.thermostat.test.TestCommandContextFactory; import com.redhat.thermostat.testutils.StubBundleContext;
--- a/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/ListVMsCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/ListVMsCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -52,7 +52,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.HostInfoDAO;
--- a/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/VMInfoCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/client/cli/src/test/java/com/redhat/thermostat/client/cli/internal/VMInfoCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -54,7 +54,7 @@ import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.DAOException;
--- a/client/command/src/main/java/com/redhat/thermostat/client/command/cli/PingCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/client/command/src/main/java/com/redhat/thermostat/client/command/cli/PingCommand.java Mon May 27 14:12:48 2013 +0200 @@ -55,8 +55,8 @@ import com.redhat.thermostat.common.command.Request.RequestType; import com.redhat.thermostat.common.command.RequestResponseListener; import com.redhat.thermostat.common.command.Response; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.dao.AgentInfoDAO; import com.redhat.thermostat.storage.dao.HostInfoDAO;
--- a/client/command/src/main/java/com/redhat/thermostat/client/command/internal/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/client/command/src/main/java/com/redhat/thermostat/client/command/internal/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.client.command.internal; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/client/core/src/main/java/com/redhat/thermostat/client/core/controllers/InformationServiceController.java Wed May 29 16:55:11 2013 -0600 +++ b/client/core/src/main/java/com/redhat/thermostat/client/core/controllers/InformationServiceController.java Mon May 27 14:12:48 2013 +0200 @@ -37,7 +37,7 @@ package com.redhat.thermostat.client.core.controllers; import com.redhat.thermostat.client.core.views.UIComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.core.Ref; /**
--- a/client/core/src/main/java/com/redhat/thermostat/client/core/views/HostInformationView.java Wed May 29 16:55:11 2013 -0600 +++ b/client/core/src/main/java/com/redhat/thermostat/client/core/views/HostInformationView.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.client.core.views; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; /** * A {@link View} that shows host information. It does not display
--- a/client/core/src/main/java/com/redhat/thermostat/client/core/views/VmInformationView.java Wed May 29 16:55:11 2013 -0600 +++ b/client/core/src/main/java/com/redhat/thermostat/client/core/views/VmInformationView.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.client.core.views; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public abstract class VmInformationView extends BasicView implements UIComponent {
--- a/client/core/src/main/java/com/redhat/thermostat/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/client/core/src/main/java/com/redhat/thermostat/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/AgentInformationDisplayController.java Wed May 29 16:55:11 2013 -0600 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/AgentInformationDisplayController.java Mon May 27 14:12:48 2013 +0200 @@ -47,8 +47,8 @@ import com.redhat.thermostat.client.locale.LocaleResources; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.model.AgentInformation; import com.redhat.thermostat.storage.model.BackendInformation;
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/HostInformationController.java Wed May 29 16:55:11 2013 -0600 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/HostInformationController.java Mon May 27 14:12:48 2013 +0200 @@ -45,7 +45,7 @@ import com.redhat.thermostat.client.core.views.HostInformationView; import com.redhat.thermostat.client.core.views.HostInformationViewProvider; import com.redhat.thermostat.common.OrderedComparator; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.core.HostRef; public class HostInformationController {
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/VmInformationController.java Wed May 29 16:55:11 2013 -0600 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/VmInformationController.java Mon May 27 14:12:48 2013 +0200 @@ -45,7 +45,7 @@ import com.redhat.thermostat.client.core.views.VmInformationView; import com.redhat.thermostat.client.core.views.VmInformationViewProvider; import com.redhat.thermostat.common.OrderedComparator; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.core.VmRef; public class VmInformationController {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/ActionButton.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/ActionButton.java Mon May 27 14:12:48 2013 +0200 @@ -40,7 +40,7 @@ import javax.swing.Icon; import javax.swing.JButton; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; /** * A swing implementation of {@link ToolbarButton}.
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/DescriptionField.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/DescriptionField.java Mon May 27 14:12:48 2013 +0200 @@ -38,7 +38,7 @@ import javax.swing.JLabel; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public class DescriptionField extends JLabel {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/LabelField.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/LabelField.java Mon May 27 14:12:48 2013 +0200 @@ -39,7 +39,7 @@ import javax.swing.JLabel; import javax.swing.SwingConstants; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; /** * A {@link JLabel} appropriate for labelling other components.
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/RecentTimeSeriesChartPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/RecentTimeSeriesChartPanel.java Mon May 27 14:12:48 2013 +0200 @@ -60,7 +60,7 @@ import com.redhat.thermostat.client.locale.LocaleResources; import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public class RecentTimeSeriesChartPanel extends JPanel {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/SearchField.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/SearchField.java Mon May 27 14:12:48 2013 +0200 @@ -58,7 +58,7 @@ import com.redhat.thermostat.client.swing.IconResource; import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ActionNotifier; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; /** * A swing component meant for entering search terms.
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/SectionHeader.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/SectionHeader.java Mon May 27 14:12:48 2013 +0200 @@ -39,7 +39,7 @@ import javax.swing.JLabel; import javax.swing.SwingConstants; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; /** * A {@link JLabel} that is appropriate to use as a label for grouping
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/AboutDialog.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/AboutDialog.java Mon May 27 14:12:48 2013 +0200 @@ -61,8 +61,8 @@ import com.redhat.thermostat.client.locale.LocaleResources; import com.redhat.thermostat.client.swing.UIResources; import com.redhat.thermostat.common.ApplicationInfo; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.locale.Translate; public class AboutDialog extends JDialog {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/Main.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/Main.java Mon May 27 14:12:48 2013 +0200 @@ -55,9 +55,9 @@ import com.redhat.thermostat.client.ui.ClientConfigurationController; import com.redhat.thermostat.common.ApplicationService; import com.redhat.thermostat.common.config.ClientPreferences; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; import com.redhat.thermostat.internal.utils.laf.ThemeManager; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.Connection.ConnectionListener; import com.redhat.thermostat.storage.core.Connection.ConnectionStatus; import com.redhat.thermostat.storage.core.DbService;
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java Mon May 27 14:12:48 2013 +0200 @@ -109,8 +109,8 @@ import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ActionNotifier; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.StringUtils; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.HostsVMsLoader; import com.redhat.thermostat.storage.core.Ref;
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/AgentInformationDisplayFrame.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/AgentInformationDisplayFrame.java Mon May 27 14:12:48 2013 +0200 @@ -68,7 +68,7 @@ import com.redhat.thermostat.client.swing.components.ValueField; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public class AgentInformationDisplayFrame extends AgentInformationDisplayView {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/ClientConfigurationPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/ClientConfigurationPanel.java Mon May 27 14:12:48 2013 +0200 @@ -47,7 +47,7 @@ import javax.swing.border.TitledBorder; import com.redhat.thermostat.client.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; @SuppressWarnings("serial") class ClientConfigurationPanel extends JPanel {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/ClientConfigurationSwing.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/ClientConfigurationSwing.java Mon May 27 14:12:48 2013 +0200 @@ -55,7 +55,7 @@ import com.redhat.thermostat.client.swing.EdtHelper; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public class ClientConfigurationSwing implements ClientConfigurationView {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/HostInformationPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/HostInformationPanel.java Mon May 27 14:12:48 2013 +0200 @@ -46,7 +46,7 @@ import com.redhat.thermostat.client.core.views.HostInformationView; import com.redhat.thermostat.client.core.views.UIComponent; import com.redhat.thermostat.client.swing.SwingComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public class HostInformationPanel extends HostInformationView implements SwingComponent {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/SummaryPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/SummaryPanel.java Mon May 27 14:12:48 2013 +0200 @@ -59,7 +59,7 @@ import com.redhat.thermostat.client.swing.components.SectionHeader; import com.redhat.thermostat.client.swing.components.ValueField; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public class SummaryPanel extends SummaryView implements SwingComponent {
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/VmInformationPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/views/VmInformationPanel.java Mon May 27 14:12:48 2013 +0200 @@ -45,7 +45,7 @@ import com.redhat.thermostat.client.core.views.UIComponent; import com.redhat.thermostat.client.core.views.VmInformationView; import com.redhat.thermostat.client.swing.SwingComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public class VmInformationPanel extends VmInformationView implements SwingComponent {
--- a/client/swing/src/test/java/com/redhat/thermostat/client/swing/components/ActionButtonTest.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/test/java/com/redhat/thermostat/client/swing/components/ActionButtonTest.java Mon May 27 14:12:48 2013 +0200 @@ -59,7 +59,7 @@ import org.junit.Test; import org.junit.runner.RunWith; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; @RunWith(CacioFESTRunner.class) public class ActionButtonTest {
--- a/client/swing/src/test/java/com/redhat/thermostat/client/swing/components/HeaderPanelTest.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/test/java/com/redhat/thermostat/client/swing/components/HeaderPanelTest.java Mon May 27 14:12:48 2013 +0200 @@ -59,7 +59,7 @@ import org.junit.Test; import org.junit.runner.RunWith; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse;
--- a/client/swing/src/test/java/com/redhat/thermostat/client/swing/internal/views/HostInformationPanelTest.java Wed May 29 16:55:11 2013 -0600 +++ b/client/swing/src/test/java/com/redhat/thermostat/client/swing/internal/views/HostInformationPanelTest.java Mon May 27 14:12:48 2013 +0200 @@ -54,7 +54,7 @@ import com.redhat.thermostat.client.core.views.UIComponent; import com.redhat.thermostat.client.swing.TabbedPaneMatcher; import com.redhat.thermostat.client.swing.internal.views.HostInformationPanel; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public class HostInformationPanelTest {
--- a/common/core/pom.xml Wed May 29 16:55:11 2013 -0600 +++ b/common/core/pom.xml Mon May 27 14:12:48 2013 +0200 @@ -176,6 +176,11 @@ <artifactId>thermostat-keyring</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-shared-config</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </project>
--- a/common/core/src/main/java/com/redhat/thermostat/common/ApplicationInfo.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/ApplicationInfo.java Mon May 27 14:12:48 2013 +0200 @@ -43,8 +43,8 @@ import java.util.logging.Logger; import com.redhat.thermostat.common.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.locale.Translate; public class ApplicationInfo {
--- a/common/core/src/main/java/com/redhat/thermostat/common/Size.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/Size.java Mon May 27 14:12:48 2013 +0200 @@ -39,7 +39,7 @@ import java.util.Objects; import com.redhat.thermostat.common.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; /** * Represents a size (of a file, memory, or disk) with a number and a unit.
--- a/common/core/src/main/java/com/redhat/thermostat/common/Version.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/Version.java Mon May 27 14:12:48 2013 +0200 @@ -41,7 +41,7 @@ import org.osgi.framework.FrameworkUtil; import com.redhat.thermostat.common.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; /** * Utility class for Thermostat version info.
--- a/common/core/src/main/java/com/redhat/thermostat/common/cli/CommandException.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/cli/CommandException.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.common.cli; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; /** * An exception to be thrown by a {@link Command} upon implementation-defined
--- a/common/core/src/main/java/com/redhat/thermostat/common/config/Configuration.java Wed May 29 16:55:11 2013 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -/* - * Copyright 2012, 2013 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.common.config; - -import java.io.File; - -import com.redhat.thermostat.common.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; - -public class Configuration { - - private static final String THERMOSTAT_USER_DIR = ".thermostat"; - private static final Translate<LocaleResources> t = LocaleResources.createLocalizer(); - - private String home; - private boolean printOsgiInfo = false; - - public Configuration() throws InvalidConfigurationException { - // allow this to be specified also as a property, especially for - // tests, this overrides the env setting - String home = System.getProperty("THERMOSTAT_HOME"); - if (home == null) { - home = System.getenv("THERMOSTAT_HOME"); - } - - if (home == null) { - throw new InvalidConfigurationException(t.localize(LocaleResources.ENV_NO_HOME)); - } - this.home = home; - } - - public String getThermostatHome() throws InvalidConfigurationException { - return home; - } - - public String getThermostatUserHome() { - String home = System.getProperty("user.home"); - return home + File.separator + THERMOSTAT_USER_DIR; - } - - public String getPluginRoot() throws InvalidConfigurationException { - return home + File.separator + "plugins"; - } - - public File getBackendsBaseDirectory() throws InvalidConfigurationException { - String loc = getThermostatHome() + File.separatorChar + "backends"; - File file = new File(loc); - return file; - } - - public String getLibRoot() throws InvalidConfigurationException { - return home + File.separator + "libs"; - } - - public String getConfigurationDir() throws InvalidConfigurationException { - return home + File.separator + "etc"; - } - - public File getStorageBaseDirectory() throws InvalidConfigurationException { - String loc = getThermostatHome() + File.separatorChar + "storage"; - File file = new File(loc); - return file; - } - - public File getStorageDirectory() throws InvalidConfigurationException { - return new File(getStorageBaseDirectory(), "db"); - } - - public File getStorageConfigurationFile() throws InvalidConfigurationException { - return new File(getStorageBaseDirectory(), "db.properties"); - } - - public File getStorageLogFile() throws InvalidConfigurationException { - File logDir = new File(getStorageBaseDirectory(), "logs"); - File logFile = new File(logDir, "db.log"); - - return logFile; - } - - public File getStoragePidFile() throws InvalidConfigurationException { - File logDir = new File(getStorageBaseDirectory(), "run"); - File logFile = new File(logDir, "db.pid"); - - return logFile; - } - - public File getAgentConfigurationFile() throws InvalidConfigurationException { - File agent = new File(getThermostatHome(), "agent"); - return new File(agent, "agent.properties"); - } - - public File getAgentAuthConfigFile() throws InvalidConfigurationException { - File agent = new File(getThermostatHome(), "agent"); - return new File(agent, "agent.auth"); - } - - public File getClientConfigurationDirectory() throws InvalidConfigurationException { - File client = new File(getThermostatHome(), "client"); - return client; - } - - public File getHistoryFile() throws InvalidConfigurationException { - File history = new File(getClientConfigurationDirectory(), "cli-history"); - return history; - } - - public boolean getPrintOSGiInfo() { - return printOsgiInfo; - } - - public void setPrintOSGiInfo(boolean newValue) { - printOsgiInfo = newValue; - } - -} -
--- a/common/core/src/main/java/com/redhat/thermostat/common/config/InvalidConfigurationException.java Wed May 29 16:55:11 2013 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* - * Copyright 2012, 2013 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.common.config; - -import com.redhat.thermostat.common.locale.LocalizedString; - - -public class InvalidConfigurationException extends RuntimeException { - - private static final long serialVersionUID = -6555406006758264587L; - - public InvalidConfigurationException() { - super(); - } - - public InvalidConfigurationException(String message) { - super(message); - } - - public InvalidConfigurationException(LocalizedString message) { - this(message.getContents()); - } - - public InvalidConfigurationException(LocalizedString message, Throwable cause) { - super(message.getContents(), cause); - } - - public InvalidConfigurationException(Throwable cause) { - super(cause); - } -} -
--- a/common/core/src/main/java/com/redhat/thermostat/common/config/ThermostatOptionParser.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/config/ThermostatOptionParser.java Mon May 27 14:12:48 2013 +0200 @@ -36,6 +36,8 @@ package com.redhat.thermostat.common.config; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; + public interface ThermostatOptionParser { void parse() throws InvalidConfigurationException; }
--- a/common/core/src/main/java/com/redhat/thermostat/common/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,6 +36,8 @@ package com.redhat.thermostat.common.locale; +import com.redhat.thermostat.shared.locale.Translate; + public enum LocaleResources { MISSING_INFO, @@ -51,8 +53,6 @@ LOGGING_PROPERTIES_ISSUE, - ENV_NO_HOME, - INVALID_IPPORT, ;
--- a/common/core/src/main/java/com/redhat/thermostat/common/locale/LocalizedString.java Wed May 29 16:55:11 2013 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* - * Copyright 2012, 2013 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.common.locale; - -public final class LocalizedString { - - private final String contents; - - /** - * Create a {@link LocalizedString} with pre-translated contents. This - * constructor is public for testing purposes, production code should use - * {@link Translate#localize(? extends Enum)} instead. - * - * @param contents The pre-translated contents for the new {@link LocalizedString} - */ - public LocalizedString(String contents) { - this.contents = contents; - } - - public String getContents() { - return contents; - } -}
--- a/common/core/src/main/java/com/redhat/thermostat/common/locale/Translate.java Wed May 29 16:55:11 2013 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* - * Copyright 2012, 2013 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.common.locale; - -import java.text.MessageFormat; -import java.util.Locale; -import java.util.ResourceBundle; - -public class Translate<T extends Enum<T>> { - - private final ResourceBundle resourceBundle; - - public Translate(String stringResources, Class<T> enumClass) { - this(ResourceBundle.getBundle(stringResources, Locale.getDefault(), enumClass.getClassLoader()), enumClass); - } - - Translate(ResourceBundle resourceBundle, Class<T> enumClass) { - this.resourceBundle = resourceBundle; - } - - public LocalizedString localize(T toTranslate) { - return new LocalizedString(resourceBundle.getString(toTranslate.name())); - } - - public LocalizedString localize(T toTranslate, String... params) { - return new LocalizedString(MessageFormat.format(localize(toTranslate).getContents(), (Object[]) params)); - } - - /** - * Creates a {@link LocalizedString} that can contain one list of unknown length - * that gets inserted as a single String, with separator as specified, into - * the regular translate parameters at a given position. - * @param toTranslate The translation key - * @param specialParams The list to be inserted into the parameters - * @param separator The separator to use between each element in the list - * @param position The position within the regular parameters at which to insert the list-string (zero indexed) - * @param params The parameters to apply to the translation - * @return The {@link LocalizedString} - */ - public LocalizedString localize(T toTranslate, String[] specialParams, String separator, int position, String... params) { - StringBuilder builder = new StringBuilder(specialParams[0]); - for (int i = 1; i < specialParams.length; i++) { - builder.append(separator).append(specialParams[i]); - } - String replacedList = builder.toString(); - - - - String[] newParams = new String[params.length + 1]; - for (int i = 0; i < position; i++) { - newParams[i] = params[i]; - } - newParams[position] = replacedList; - for (int i = position + 1, j = position; j < params.length; i++, j++) { - newParams[i] = params[j]; - } - return new LocalizedString(MessageFormat.format(localize(toTranslate).getContents(), (Object[]) newParams)); - } -} -
--- a/common/core/src/main/java/com/redhat/thermostat/common/ssl/SSLConfiguration.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/ssl/SSLConfiguration.java Mon May 27 14:12:48 2013 +0200 @@ -43,9 +43,9 @@ import java.util.logging.Level; import java.util.logging.Logger; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class SSLConfiguration {
--- a/common/core/src/main/java/com/redhat/thermostat/common/ssl/SSLContextFactory.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/ssl/SSLContextFactory.java Mon May 27 14:12:48 2013 +0200 @@ -58,12 +58,12 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.X509KeyManager; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.internal.JSSEKeyManager; import com.redhat.thermostat.common.internal.KeyStoreProvider; import com.redhat.thermostat.common.internal.TrustManagerFactory; import com.redhat.thermostat.common.internal.DelegateSSLSocketFactory; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class SSLContextFactory {
--- a/common/core/src/main/java/com/redhat/thermostat/common/tools/StorageAuthInfoGetter.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/tools/StorageAuthInfoGetter.java Mon May 27 14:12:48 2013 +0200 @@ -43,7 +43,7 @@ import com.redhat.thermostat.common.cli.Console; import com.redhat.thermostat.common.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; /** * Utility class to isolate the user-facing strings necessary when prompting user
--- a/common/core/src/main/java/com/redhat/thermostat/common/utils/HostPortsParser.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/utils/HostPortsParser.java Mon May 27 14:12:48 2013 +0200 @@ -39,9 +39,9 @@ import java.util.ArrayList; import java.util.List; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; /** * Parses Host/Port pairs from a raw string.
--- a/common/core/src/main/java/com/redhat/thermostat/common/utils/LoggingUtils.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/java/com/redhat/thermostat/common/utils/LoggingUtils.java Mon May 27 14:12:48 2013 +0200 @@ -47,10 +47,10 @@ import java.util.logging.Logger; import com.redhat.thermostat.common.LogFormatter; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; /** * A few helper functions to facilitate using loggers
--- a/common/core/src/main/resources/com/redhat/thermostat/common/locale/strings.properties Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/main/resources/com/redhat/thermostat/common/locale/strings.properties Mon May 27 14:12:48 2013 +0200 @@ -13,6 +13,4 @@ LOGGING_PROPERTIES_ISSUE = Could not read logging.properties -ENV_NO_HOME = THERMOSTAT_HOME not defined... - INVALID_IPPORT = Invalid format of IP/port argument {0}
--- a/common/core/src/test/java/com/redhat/thermostat/common/cli/CommandExceptionTest.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/test/java/com/redhat/thermostat/common/cli/CommandExceptionTest.java Mon May 27 14:12:48 2013 +0200 @@ -41,7 +41,7 @@ import org.junit.Test; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public class CommandExceptionTest {
--- a/common/core/src/test/java/com/redhat/thermostat/common/config/ConfigurationTest.java Wed May 29 16:55:11 2013 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright 2012, 2013 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.common.config; - -import static org.junit.Assert.fail; - -import java.io.File; -import java.io.IOException; -import java.util.Properties; - -import junit.framework.Assert; - -import org.junit.After; -import org.junit.Test; - -public class ConfigurationTest { - - @After - public void tearDown() { - // remove THERMOSTAT_HOME system property for a clean slate - Properties props = System.getProperties(); - Properties newProps = new Properties(); - for (Object key: props.keySet()) { - if (!key.equals("THERMOSTAT_HOME")) { - newProps.put(key, props.get(key)); - } - } - System.setProperties(newProps); - } - - @Test - public void testLocations() throws InvalidConfigurationException, IOException { - String thermostatHome = "/tmp/"; - System.setProperty("THERMOSTAT_HOME", thermostatHome); - - char s = File.separatorChar; - - Configuration config = new Configuration(); - - Assert.assertEquals(thermostatHome, config.getThermostatHome()); - - Assert.assertEquals(thermostatHome + "agent" + s + "agent.properties", - config.getAgentConfigurationFile().getCanonicalPath()); - Assert.assertEquals(thermostatHome + "agent" + s + "agent.auth", - config.getAgentAuthConfigFile().getCanonicalPath()); - Assert.assertEquals(thermostatHome + "storage", config.getStorageBaseDirectory().getCanonicalPath()); - Assert.assertEquals(thermostatHome + "storage" + s + "db.properties", - config.getStorageConfigurationFile().getCanonicalPath()); - Assert.assertEquals(thermostatHome + "storage" + s + "db", - config.getStorageDirectory().getCanonicalPath()); - Assert.assertEquals(thermostatHome + "storage" + s + "logs" + s + "db.log", - config.getStorageLogFile().getCanonicalPath()); - Assert.assertEquals(thermostatHome + "storage" + s + "run" + s + "db.pid", - config.getStoragePidFile().getCanonicalPath()); - - } - - @Test - public void instantiationThrowsException() { - try { - new Configuration(); - // The web archive uses this. See WebStorageEndPoint#init(); - fail("Should have thrown InvalidConfigurationException"); - } catch (InvalidConfigurationException e) { - // pass - } - } -} -
--- a/common/core/src/test/java/com/redhat/thermostat/common/locale/TranslateTest.java Wed May 29 16:55:11 2013 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright 2012, 2013 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.common.locale; - -import static org.junit.Assert.assertEquals; - -import java.util.ListResourceBundle; -import java.util.ResourceBundle; - -import org.junit.Test; - -public class TranslateTest { - - enum TestStrings { - THE_STRING, - ; - } - - // Mockito can't mock the final method getMessage() which is what Translate - // uses. Create a mock the old-fashioned way. - private static class LocalizedResourceBundle extends ListResourceBundle { - - private final Object[] contents; - - public LocalizedResourceBundle(String key, String localizedString) { - contents = new Object[] { key, localizedString }; - } - - @Override - protected Object[][] getContents() { - return new Object[][] { contents }; - } - } - - @Test - public void testLocalizeWithoutArguments() { - Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Localized String"); - - assertEquals("Localized String", translate.localize(TestStrings.THE_STRING).getContents()); - } - - @Test - public void testLocalizeWithArguments() { - Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Parameter: {0}"); - - assertEquals("Parameter: FOO", translate.localize(TestStrings.THE_STRING, "FOO").getContents()); - } - - @Test - public void testLocalizeWithSeveralArguments() { - Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Parameter1: {0} Parameter2: {1} Parameter3: {2}"); - - assertEquals("Parameter1: ONE Parameter2: TWO Parameter3: THREE", translate.localize(TestStrings.THE_STRING, "ONE", "TWO", "THREE").getContents()); - } - - @Test - public void testLocalizeWithSpecialList() { - Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Parameter1: {0} ParameterList: {1} Parameter2: {2}"); - - assertEquals("Parameter1: ONE ParameterList: FOO, BAR, BAZ Parameter2: TWO", translate.localize(TestStrings.THE_STRING, new String[]{"FOO", "BAR", "BAZ"}, ", ", 1, "ONE", "TWO").getContents()); - - } - - private Translate<TestStrings> getTranslator(String key, String localizedString) { - ResourceBundle resources = new LocalizedResourceBundle(key, localizedString); - return new Translate<>(resources, TestStrings.class); - } -} -
--- a/common/core/src/test/java/com/redhat/thermostat/common/utils/HostPortsParserTest.java Wed May 29 16:55:11 2013 -0600 +++ b/common/core/src/test/java/com/redhat/thermostat/common/utils/HostPortsParserTest.java Mon May 27 14:12:48 2013 +0200 @@ -42,9 +42,9 @@ import org.junit.Test; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.utils.HostPortPair; import com.redhat.thermostat.common.utils.HostPortsParser; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class HostPortsParserTest {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/pom.xml Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,61 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>thermostat</artifactId> + <groupId>com.redhat.thermostat</groupId> + <version>0.10.0-SNAPSHOT</version> + </parent> + + <artifactId>thermostat-shared-config</artifactId> + <packaging>bundle</packaging> + <name>Thermostat Configuration</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-SymbolicName>com.redhat.thermostat.configuration</Bundle-SymbolicName> + <Bundle-Vendor>Red Hat, Inc.</Bundle-Vendor> + <Export-Package> + com.redhat.thermostat.shared.locale, + com.redhat.thermostat.shared.config, + </Export-Package> + <!-- Do not autogenerate uses clauses in Manifests --> + <_nouses>true</_nouses> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.compendium</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-annotations</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + </dependencies> +</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/main/java/com/redhat/thermostat/shared/config/Configuration.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,154 @@ +/* + * Copyright 2012, 2013 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.shared.config; + +import java.io.File; + +import com.redhat.thermostat.shared.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.Translate; + +public class Configuration { + + private static final String THERMOSTAT_USER_DIR = ".thermostat"; + private static final Translate<LocaleResources> t = LocaleResources.createLocalizer(); + + private String home; + private boolean printOsgiInfo = false; + + public Configuration() throws InvalidConfigurationException { + // allow this to be specified also as a property, especially for + // tests, this overrides the env setting + String home = System.getProperty("THERMOSTAT_HOME"); + if (home == null) { + home = System.getenv("THERMOSTAT_HOME"); + } + + if (home == null) { + throw new InvalidConfigurationException(t.localize(LocaleResources.ENV_NO_HOME)); + } + this.home = home; + } + + public String getThermostatHome() throws InvalidConfigurationException { + return home; + } + + public String getThermostatUserHome() { + String home = System.getProperty("user.home"); + return home + File.separator + THERMOSTAT_USER_DIR; + } + + public String getPluginRoot() throws InvalidConfigurationException { + return home + File.separator + "plugins"; + } + + public File getBackendsBaseDirectory() throws InvalidConfigurationException { + String loc = getThermostatHome() + File.separatorChar + "backends"; + File file = new File(loc); + return file; + } + + public String getLibRoot() throws InvalidConfigurationException { + return home + File.separator + "libs"; + } + + public String getNativeLibsRoot() throws InvalidConfigurationException { + return getLibRoot() + File.separator + "native"; + } + + public String getConfigurationDir() throws InvalidConfigurationException { + return home + File.separator + "etc"; + } + + public File getStorageBaseDirectory() throws InvalidConfigurationException { + String loc = getThermostatHome() + File.separatorChar + "storage"; + File file = new File(loc); + return file; + } + + public File getStorageDirectory() throws InvalidConfigurationException { + return new File(getStorageBaseDirectory(), "db"); + } + + public File getStorageConfigurationFile() throws InvalidConfigurationException { + return new File(getStorageBaseDirectory(), "db.properties"); + } + + public File getStorageLogFile() throws InvalidConfigurationException { + File logDir = new File(getStorageBaseDirectory(), "logs"); + File logFile = new File(logDir, "db.log"); + + return logFile; + } + + public File getStoragePidFile() throws InvalidConfigurationException { + File logDir = new File(getStorageBaseDirectory(), "run"); + File logFile = new File(logDir, "db.pid"); + + return logFile; + } + + public File getAgentConfigurationFile() throws InvalidConfigurationException { + File agent = new File(getThermostatHome(), "agent"); + return new File(agent, "agent.properties"); + } + + public File getAgentAuthConfigFile() throws InvalidConfigurationException { + File agent = new File(getThermostatHome(), "agent"); + return new File(agent, "agent.auth"); + } + + public File getClientConfigurationDirectory() throws InvalidConfigurationException { + File client = new File(getThermostatHome(), "client"); + return client; + } + + public File getHistoryFile() throws InvalidConfigurationException { + File history = new File(getClientConfigurationDirectory(), "cli-history"); + return history; + } + + public boolean getPrintOSGiInfo() { + return printOsgiInfo; + } + + public void setPrintOSGiInfo(boolean newValue) { + printOsgiInfo = newValue; + } + +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/main/java/com/redhat/thermostat/shared/config/InvalidConfigurationException.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,66 @@ +/* + * Copyright 2012, 2013 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.shared.config; + +import com.redhat.thermostat.shared.locale.LocalizedString; + + +public class InvalidConfigurationException extends RuntimeException { + + private static final long serialVersionUID = -6555406006758264587L; + + public InvalidConfigurationException() { + super(); + } + + public InvalidConfigurationException(String message) { + super(message); + } + + public InvalidConfigurationException(LocalizedString message) { + this(message.getContents()); + } + + public InvalidConfigurationException(LocalizedString message, Throwable cause) { + super(message.getContents(), cause); + } + + public InvalidConfigurationException(Throwable cause) { + super(cause); + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/main/java/com/redhat/thermostat/shared/config/NativeLibraryResolver.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,78 @@ +/* + * Copyright 2012, 2013 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.shared.config; + +import java.io.File; + + +/** + * Class which enables resolving of native libraries placed in + * {@link Configuration#getNativeLibsRoot()}. + * + */ +public class NativeLibraryResolver { + + /** + * Gets the absolute path of a native library. The native library must be + * placed in directory as returned by {@link Configuration#getNativeLibsRoot()}. + * + * @param libraryName + * The name of the library. Specified in the same fashion as for + * {@link System#loadLibrary(String)}. + * @return The absolute path to the native library, suitable to be loaded + * via {@link System#load(String)}; + */ + public static String getAbsoluteLibraryPath(String libraryName) { + String nativeLibsRoot = null; + // Allow a property for tests + nativeLibsRoot = System.getProperty("com.redhat.thermostat.shared.loader.testNativesHome"); + if (nativeLibsRoot != null) { + return doResolve(nativeLibsRoot, libraryName); + } + try { + Configuration config = new Configuration(); + nativeLibsRoot = config.getNativeLibsRoot(); + } catch (InvalidConfigurationException e) { + throw new AssertionError(e); + } + return doResolve(nativeLibsRoot, libraryName); + } + + private static String doResolve(String root, String libraryName) { + return root + File.separator + System.mapLibraryName(libraryName); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/main/java/com/redhat/thermostat/shared/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,53 @@ +/* + * Copyright 2012, 2013 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.shared.locale; + +import com.redhat.thermostat.shared.locale.Translate; + +public enum LocaleResources { + + ENV_NO_HOME, + ; + + public static final String RESOURCE_BUNDLE = + "com.redhat.thermostat.shared.locale.strings"; + + public static Translate<LocaleResources> createLocalizer() { + return new Translate<>(RESOURCE_BUNDLE, LocaleResources.class); + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/main/java/com/redhat/thermostat/shared/locale/LocalizedString.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,57 @@ +/* + * Copyright 2012, 2013 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.shared.locale; + +public final class LocalizedString { + + private final String contents; + + /** + * Create a {@link LocalizedString} with pre-translated contents. This + * constructor is public for testing purposes, production code should use + * {@link Translate#localize(? extends Enum)} instead. + * + * @param contents The pre-translated contents for the new {@link LocalizedString} + */ + public LocalizedString(String contents) { + this.contents = contents; + } + + public String getContents() { + return contents; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/main/java/com/redhat/thermostat/shared/locale/Translate.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,94 @@ +/* + * Copyright 2012, 2013 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.shared.locale; + +import java.text.MessageFormat; +import java.util.Locale; +import java.util.ResourceBundle; + +public class Translate<T extends Enum<T>> { + + private final ResourceBundle resourceBundle; + + public Translate(String stringResources, Class<T> enumClass) { + this(ResourceBundle.getBundle(stringResources, Locale.getDefault(), enumClass.getClassLoader()), enumClass); + } + + Translate(ResourceBundle resourceBundle, Class<T> enumClass) { + this.resourceBundle = resourceBundle; + } + + public LocalizedString localize(T toTranslate) { + return new LocalizedString(resourceBundle.getString(toTranslate.name())); + } + + public LocalizedString localize(T toTranslate, String... params) { + return new LocalizedString(MessageFormat.format(localize(toTranslate).getContents(), (Object[]) params)); + } + + /** + * Creates a {@link LocalizedString} that can contain one list of unknown length + * that gets inserted as a single String, with separator as specified, into + * the regular translate parameters at a given position. + * @param toTranslate The translation key + * @param specialParams The list to be inserted into the parameters + * @param separator The separator to use between each element in the list + * @param position The position within the regular parameters at which to insert the list-string (zero indexed) + * @param params The parameters to apply to the translation + * @return The {@link LocalizedString} + */ + public LocalizedString localize(T toTranslate, String[] specialParams, String separator, int position, String... params) { + StringBuilder builder = new StringBuilder(specialParams[0]); + for (int i = 1; i < specialParams.length; i++) { + builder.append(separator).append(specialParams[i]); + } + String replacedList = builder.toString(); + + + + String[] newParams = new String[params.length + 1]; + for (int i = 0; i < position; i++) { + newParams[i] = params[i]; + } + newParams[position] = replacedList; + for (int i = position + 1, j = position; j < params.length; i++, j++) { + newParams[i] = params[j]; + } + return new LocalizedString(MessageFormat.format(localize(toTranslate).getContents(), (Object[]) newParams)); + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/main/resources/com/redhat/thermostat/shared/locale/strings.properties Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,1 @@ +ENV_NO_HOME = THERMOSTAT_HOME not defined...
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/test/java/com/redhat/thermostat/shared/config/ConfigurationTest.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,109 @@ +/* + * Copyright 2012, 2013 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.shared.config; + +import static org.junit.Assert.fail; + +import java.io.File; +import java.io.IOException; +import java.util.Properties; + +import junit.framework.Assert; + +import org.junit.After; +import org.junit.Test; + +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; + +public class ConfigurationTest { + + @After + public void tearDown() { + // remove THERMOSTAT_HOME system property for a clean slate + Properties props = System.getProperties(); + Properties newProps = new Properties(); + for (Object key: props.keySet()) { + if (!key.equals("THERMOSTAT_HOME")) { + newProps.put(key, props.get(key)); + } + } + System.setProperties(newProps); + } + + @Test + public void testLocations() throws InvalidConfigurationException, IOException { + String thermostatHome = "/tmp"; + System.setProperty("THERMOSTAT_HOME", thermostatHome); + + char s = File.separatorChar; + + Configuration config = new Configuration(); + + Assert.assertEquals(thermostatHome, config.getThermostatHome()); + + Assert.assertEquals(thermostatHome + s + "agent" + s + "agent.properties", + config.getAgentConfigurationFile().getCanonicalPath()); + Assert.assertEquals(thermostatHome + s + "agent" + s + "agent.auth", + config.getAgentAuthConfigFile().getCanonicalPath()); + Assert.assertEquals(thermostatHome + s + "storage", config.getStorageBaseDirectory().getCanonicalPath()); + Assert.assertEquals(thermostatHome + s + "storage" + s + "db.properties", + config.getStorageConfigurationFile().getCanonicalPath()); + Assert.assertEquals(thermostatHome + s + "storage" + s + "db", + config.getStorageDirectory().getCanonicalPath()); + Assert.assertEquals(thermostatHome + s + "storage" + s + "logs" + s + "db.log", + config.getStorageLogFile().getCanonicalPath()); + Assert.assertEquals(thermostatHome + s + "storage" + s + "run" + s + "db.pid", + config.getStoragePidFile().getCanonicalPath()); + Assert.assertEquals(thermostatHome + s + "libs" + s + "native", + config.getNativeLibsRoot()); + Assert.assertEquals(thermostatHome + s + "libs", config.getLibRoot()); + Assert.assertEquals(thermostatHome + s + "plugins", config.getPluginRoot()); + } + + @Test + public void instantiationThrowsException() { + try { + new Configuration(); + // The web archive uses this. See WebStorageEndPoint#init(); + fail("Should have thrown InvalidConfigurationException"); + } catch (InvalidConfigurationException e) { + // pass + } + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/test/java/com/redhat/thermostat/shared/locale/LocaleResourcesTest.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,69 @@ +/* + * Copyright 2012, 2013 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.shared.locale; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import org.junit.Test; + +public class LocaleResourcesTest { + @Test + public void testLocalizedStringsArePresent() throws IOException { + + String stringsResource = "/" + LocaleResources.RESOURCE_BUNDLE.replace(".", "/") + ".properties"; + + Properties props = new Properties(); + try (InputStream in = getClass().getResourceAsStream(stringsResource)) { + assertNotNull(in); + props.load(in); + + assertEquals(LocaleResources.values().length, props.values().size()); + for (LocaleResources resource : LocaleResources.values()) { + assertTrue("missing property from resource bound file: " + resource, + props.containsKey(resource.name())); + } + + } + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/src/test/java/com/redhat/thermostat/shared/locale/TranslateTest.java Mon May 27 14:12:48 2013 +0200 @@ -0,0 +1,105 @@ +/* + * Copyright 2012, 2013 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.shared.locale; + +import static org.junit.Assert.assertEquals; + +import java.util.ListResourceBundle; +import java.util.ResourceBundle; + +import org.junit.Test; + +import com.redhat.thermostat.shared.locale.Translate; + +public class TranslateTest { + + enum TestStrings { + THE_STRING, + ; + } + + // Mockito can't mock the final method getMessage() which is what Translate + // uses. Create a mock the old-fashioned way. + private static class LocalizedResourceBundle extends ListResourceBundle { + + private final Object[] contents; + + public LocalizedResourceBundle(String key, String localizedString) { + contents = new Object[] { key, localizedString }; + } + + @Override + protected Object[][] getContents() { + return new Object[][] { contents }; + } + } + + @Test + public void testLocalizeWithoutArguments() { + Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Localized String"); + + assertEquals("Localized String", translate.localize(TestStrings.THE_STRING).getContents()); + } + + @Test + public void testLocalizeWithArguments() { + Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Parameter: {0}"); + + assertEquals("Parameter: FOO", translate.localize(TestStrings.THE_STRING, "FOO").getContents()); + } + + @Test + public void testLocalizeWithSeveralArguments() { + Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Parameter1: {0} Parameter2: {1} Parameter3: {2}"); + + assertEquals("Parameter1: ONE Parameter2: TWO Parameter3: THREE", translate.localize(TestStrings.THE_STRING, "ONE", "TWO", "THREE").getContents()); + } + + @Test + public void testLocalizeWithSpecialList() { + Translate<TestStrings> translate = getTranslator(TestStrings.THE_STRING.name(), "Parameter1: {0} ParameterList: {1} Parameter2: {2}"); + + assertEquals("Parameter1: ONE ParameterList: FOO, BAR, BAZ Parameter2: TWO", translate.localize(TestStrings.THE_STRING, new String[]{"FOO", "BAR", "BAZ"}, ", ", 1, "ONE", "TWO").getContents()); + + } + + private Translate<TestStrings> getTranslator(String key, String localizedString) { + ResourceBundle resources = new LocalizedResourceBundle(key, localizedString); + return new Translate<>(resources, TestStrings.class); + } +} +
--- a/distribution/scripts/thermostat Wed May 29 16:55:11 2013 -0600 +++ b/distribution/scripts/thermostat Mon May 27 14:12:48 2013 +0200 @@ -51,7 +51,6 @@ # plus the main services we use and export SERVICE_CLASSPATH="${THERMOSTAT_LIBS}/*" -SERVICE_NATIVE="${THERMOSTAT_LIBS}/native" SERVICE_CLASSPATH="${TOOLS_JAR}:${SERVICE_CLASSPATH}" THERMOSTAT_MAIN="com.redhat.thermostat.main.Thermostat" @@ -100,13 +99,13 @@ if [ x"$PID_FILE" = "x" ]; then usage else - ${JAVA} "${JAVA_ARGS[@]}" -Djava.library.path=${SERVICE_NATIVE} -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} "${ARGS[@]}" & + ${JAVA} "${JAVA_ARGS[@]}" -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} "${ARGS[@]}" & retval=$? echo $! > $PID_FILE retval=$(( $retval + $? )) fi else - ${JAVA} "${JAVA_ARGS[@]}" -Djava.library.path=${SERVICE_NATIVE} -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} "${ARGS[@]}" + ${JAVA} "${JAVA_ARGS[@]}" -cp ${SERVICE_CLASSPATH} ${THERMOSTAT_MAIN} "${ARGS[@]}" retval=$? fi exit $retval
--- a/eclipse/com.redhat.thermostat.client.feature/feature.xml Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.client.feature/feature.xml Mon May 27 14:12:48 2013 +0200 @@ -69,6 +69,13 @@ install-size="0" version="0.0.0" unpack="false"/> + + <plugin + id="com.redhat.thermostat.configuration" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> <plugin id="com.redhat.thermostat.keyring"
--- a/eclipse/com.redhat.thermostat.eclipse.chart.common/META-INF/MANIFEST.MF Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.common/META-INF/MANIFEST.MF Mon May 27 14:12:48 2013 +0200 @@ -11,7 +11,7 @@ com.redhat.thermostat.client.locale, com.redhat.thermostat.client.ui, com.redhat.thermostat.common, - com.redhat.thermostat.common.locale, + com.redhat.thermostat.shared.locale, com.redhat.thermostat.common.utils, com.redhat.thermostat.eclipse, com.redhat.thermostat.eclipse.views,
--- a/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/RecentTimeSeriesChartComposite.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/RecentTimeSeriesChartComposite.java Mon May 27 14:12:48 2013 +0200 @@ -62,7 +62,7 @@ import com.redhat.thermostat.client.locale.LocaleResources; import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.eclipse.ThermostatConstants; public class RecentTimeSeriesChartComposite extends Composite {
--- a/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTHostCpuView.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTHostCpuView.java Mon May 27 14:12:48 2013 +0200 @@ -65,8 +65,8 @@ import com.redhat.thermostat.host.cpu.client.core.HostCpuView; import com.redhat.thermostat.host.cpu.client.locale.LocaleResources; import com.redhat.thermostat.client.ui.ChartColors; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.eclipse.SWTComponent; import com.redhat.thermostat.eclipse.ThermostatConstants; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTHostMemoryView.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTHostMemoryView.java Mon May 27 14:12:48 2013 +0200 @@ -71,8 +71,8 @@ import com.redhat.thermostat.host.memory.client.locale.LocaleResources; import com.redhat.thermostat.client.ui.ChartColors; import com.redhat.thermostat.common.Size; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.eclipse.SWTComponent; import com.redhat.thermostat.eclipse.ThermostatConstants; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTVmCpuView.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTVmCpuView.java Mon May 27 14:12:48 2013 +0200 @@ -51,7 +51,7 @@ import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.eclipse.SWTComponent; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.vm.cpu.client.core.VmCpuView;
--- a/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTVmGcView.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.common/src/com/redhat/thermostat/eclipse/chart/common/SWTVmGcView.java Mon May 27 14:12:48 2013 +0200 @@ -64,8 +64,8 @@ import org.jfree.data.xy.IntervalXYDataset; import com.redhat.thermostat.client.ui.SampledDataset; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.eclipse.SWTComponent; import com.redhat.thermostat.storage.model.IntervalTimeData; import com.redhat.thermostat.vm.gc.client.core.VmGcView;
--- a/eclipse/com.redhat.thermostat.eclipse.chart.vmclassstat/META-INF/MANIFEST.MF Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.vmclassstat/META-INF/MANIFEST.MF Mon May 27 14:12:48 2013 +0200 @@ -14,7 +14,7 @@ com.redhat.thermostat.client.ui, com.redhat.thermostat.common, com.redhat.thermostat.storage.dao, - com.redhat.thermostat.common.locale, + com.redhat.thermostat.shared.locale, com.redhat.thermostat.common.utils, com.redhat.thermostat.eclipse, com.redhat.thermostat.eclipse.chart.common,
--- a/eclipse/com.redhat.thermostat.eclipse.chart.vmclassstat/src/com/redhat/thermostat/eclipse/chart/vmclassstat/SWTVmClassStatView.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.chart.vmclassstat/src/com/redhat/thermostat/eclipse/chart/vmclassstat/SWTVmClassStatView.java Mon May 27 14:12:48 2013 +0200 @@ -57,7 +57,7 @@ import com.redhat.thermostat.vm.classstat.client.core.VmClassStatView; import com.redhat.thermostat.vm.classstat.client.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.eclipse.SWTComponent; import com.redhat.thermostat.eclipse.chart.common.RecentTimeSeriesChartComposite; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/eclipse/com.redhat.thermostat.eclipse.test.ui/META-INF/MANIFEST.MF Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.test.ui/META-INF/MANIFEST.MF Mon May 27 14:12:48 2013 +0200 @@ -13,7 +13,7 @@ Import-Package: com.redhat.thermostat.client.core.views, com.redhat.thermostat.client.ui, com.redhat.thermostat.common, - com.redhat.thermostat.common.locale, + com.redhat.thermostat.shared.locale, com.redhat.thermostat.eclipse, com.redhat.thermostat.eclipse.chart.common, com.redhat.thermostat.eclipse.chart.vmclassstat,
--- a/eclipse/com.redhat.thermostat.eclipse.test.ui/src/com/redhat/thermostat/eclipse/test/ui/SWTHostCpuViewTest.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.test.ui/src/com/redhat/thermostat/eclipse/test/ui/SWTHostCpuViewTest.java Mon May 27 14:12:48 2013 +0200 @@ -65,7 +65,7 @@ import com.redhat.thermostat.client.core.views.BasicView.Action; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.eclipse.ThermostatConstants; import com.redhat.thermostat.eclipse.chart.common.SWTHostCpuView; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/eclipse/com.redhat.thermostat.eclipse.test.ui/src/com/redhat/thermostat/eclipse/test/ui/SWTHostMemoryViewTest.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.test.ui/src/com/redhat/thermostat/eclipse/test/ui/SWTHostMemoryViewTest.java Mon May 27 14:12:48 2013 +0200 @@ -71,7 +71,7 @@ import com.redhat.thermostat.client.core.views.BasicView.Action; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.eclipse.ThermostatConstants; import com.redhat.thermostat.eclipse.chart.common.SWTHostMemoryView; import com.redhat.thermostat.host.memory.client.core.HostMemoryView.GraphVisibilityChangeListener;
--- a/eclipse/com.redhat.thermostat.eclipse.test.ui/src/com/redhat/thermostat/eclipse/test/ui/SWTVmGcViewTest.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse.test.ui/src/com/redhat/thermostat/eclipse/test/ui/SWTVmGcViewTest.java Mon May 27 14:12:48 2013 +0200 @@ -62,7 +62,7 @@ import com.redhat.thermostat.client.core.views.BasicView.Action; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.eclipse.chart.common.SWTVmGcView; import com.redhat.thermostat.storage.model.IntervalTimeData;
--- a/eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse/META-INF/MANIFEST.MF Mon May 27 14:12:48 2013 +0200 @@ -16,7 +16,7 @@ com.redhat.thermostat.client.locale, com.redhat.thermostat.client.ui, com.redhat.thermostat.common, - com.redhat.thermostat.common.locale, + com.redhat.thermostat.shared.locale, com.redhat.thermostat.common.utils, com.redhat.thermostat.host.overview.client.core, com.redhat.thermostat.host.overview.client.locale,
--- a/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/internal/views/SWTHostOverviewView.java Wed May 29 16:55:11 2013 -0600 +++ b/eclipse/com.redhat.thermostat.eclipse/src/com/redhat/thermostat/eclipse/internal/views/SWTHostOverviewView.java Mon May 27 14:12:48 2013 +0200 @@ -53,7 +53,7 @@ import com.redhat.thermostat.host.overview.client.core.HostOverviewView; import com.redhat.thermostat.host.overview.client.locale.LocaleResources; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.eclipse.SWTComponent; import com.redhat.thermostat.eclipse.ThermostatConstants;
--- a/host-cpu/client-core/src/main/java/com/redhat/thermostat/host/cpu/client/core/HostCpuView.java Wed May 29 16:55:11 2013 -0600 +++ b/host-cpu/client-core/src/main/java/com/redhat/thermostat/host/cpu/client/core/HostCpuView.java Mon May 27 14:12:48 2013 +0200 @@ -40,7 +40,7 @@ import com.redhat.thermostat.client.core.views.BasicView; import com.redhat.thermostat.client.core.views.UIComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.model.DiscreteTimeData; public abstract class HostCpuView extends BasicView implements UIComponent {
--- a/host-cpu/client-core/src/main/java/com/redhat/thermostat/host/cpu/client/core/internal/HostCpuController.java Wed May 29 16:55:11 2013 -0600 +++ b/host-cpu/client-core/src/main/java/com/redhat/thermostat/host/cpu/client/core/internal/HostCpuController.java Mon May 27 14:12:48 2013 +0200 @@ -49,13 +49,13 @@ import com.redhat.thermostat.common.NotImplementedException; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.host.cpu.client.core.HostCpuView; import com.redhat.thermostat.host.cpu.client.core.HostCpuViewProvider; import com.redhat.thermostat.host.cpu.client.locale.LocaleResources; import com.redhat.thermostat.host.cpu.common.CpuStatDAO; import com.redhat.thermostat.host.cpu.common.model.CpuStat; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.dao.HostInfoDAO; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/host-cpu/client-core/src/main/java/com/redhat/thermostat/host/cpu/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/host-cpu/client-core/src/main/java/com/redhat/thermostat/host/cpu/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.host.cpu.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { HOST_INFO_TAB_CPU,
--- a/host-cpu/client-core/src/test/java/com/redhat/thermostat/host/cpu/client/core/internal/HostCpuControllerTest.java Wed May 29 16:55:11 2013 -0600 +++ b/host-cpu/client-core/src/test/java/com/redhat/thermostat/host/cpu/client/core/internal/HostCpuControllerTest.java Mon May 27 14:12:48 2013 +0200 @@ -62,12 +62,12 @@ import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; import com.redhat.thermostat.common.TimerFactory; -import com.redhat.thermostat.common.locale.LocalizedString; import com.redhat.thermostat.host.cpu.client.core.HostCpuView; import com.redhat.thermostat.host.cpu.client.core.HostCpuViewProvider; import com.redhat.thermostat.host.cpu.client.core.internal.HostCpuController; import com.redhat.thermostat.host.cpu.common.CpuStatDAO; import com.redhat.thermostat.host.cpu.common.model.CpuStat; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.dao.HostInfoDAO; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/host-cpu/client-swing/src/main/java/com/redhat/thermostat/host/cpu/client/swing/internal/HostCpuPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/host-cpu/client-swing/src/main/java/com/redhat/thermostat/host/cpu/client/swing/internal/HostCpuPanel.java Mon May 27 14:12:48 2013 +0200 @@ -70,10 +70,10 @@ import com.redhat.thermostat.client.ui.ChartColors; import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.host.cpu.client.core.HostCpuView; import com.redhat.thermostat.host.cpu.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.swing.components.experimental.WrapLayout;
--- a/host-memory/client-core/src/main/java/com/redhat/thermostat/host/memory/client/core/HostMemoryView.java Wed May 29 16:55:11 2013 -0600 +++ b/host-memory/client-core/src/main/java/com/redhat/thermostat/host/memory/client/core/HostMemoryView.java Mon May 27 14:12:48 2013 +0200 @@ -40,7 +40,7 @@ import com.redhat.thermostat.client.core.views.BasicView; import com.redhat.thermostat.client.core.views.UIComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.model.DiscreteTimeData; public abstract class HostMemoryView extends BasicView implements UIComponent {
--- a/host-memory/client-core/src/main/java/com/redhat/thermostat/host/memory/client/core/internal/HostMemoryController.java Wed May 29 16:55:11 2013 -0600 +++ b/host-memory/client-core/src/main/java/com/redhat/thermostat/host/memory/client/core/internal/HostMemoryController.java Mon May 27 14:12:48 2013 +0200 @@ -50,8 +50,6 @@ import com.redhat.thermostat.common.Size; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.host.memory.client.core.HostMemoryView; import com.redhat.thermostat.host.memory.client.core.HostMemoryViewProvider; import com.redhat.thermostat.host.memory.client.core.HostMemoryView.GraphVisibilityChangeListener; @@ -59,6 +57,8 @@ import com.redhat.thermostat.host.memory.common.MemoryStatDAO; import com.redhat.thermostat.host.memory.common.model.MemoryStat; import com.redhat.thermostat.host.memory.common.model.MemoryType; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.dao.HostInfoDAO; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/host-memory/client-core/src/main/java/com/redhat/thermostat/host/memory/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/host-memory/client-core/src/main/java/com/redhat/thermostat/host/memory/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.host.memory.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { NUMBER_AND_UNIT,
--- a/host-memory/client-swing/src/main/java/com/redhat/thermostat/host/memory/client/swing/internal/HostMemoryPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/host-memory/client-swing/src/main/java/com/redhat/thermostat/host/memory/client/swing/internal/HostMemoryPanel.java Mon May 27 14:12:48 2013 +0200 @@ -73,10 +73,10 @@ import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.Size; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.host.memory.client.core.HostMemoryView; import com.redhat.thermostat.host.memory.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.swing.components.experimental.WrapLayout;
--- a/host-overview/client-core/src/main/java/com/redhat/thermostat/host/overview/client/core/internal/HostOverviewController.java Wed May 29 16:55:11 2013 -0600 +++ b/host-overview/client-core/src/main/java/com/redhat/thermostat/host/overview/client/core/internal/HostOverviewController.java Mon May 27 14:12:48 2013 +0200 @@ -51,11 +51,11 @@ import com.redhat.thermostat.common.Size; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.host.overview.client.core.HostOverviewView; import com.redhat.thermostat.host.overview.client.core.HostOverviewViewProvider; import com.redhat.thermostat.host.overview.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.dao.HostInfoDAO; import com.redhat.thermostat.storage.dao.NetworkInterfaceInfoDAO;
--- a/host-overview/client-core/src/main/java/com/redhat/thermostat/host/overview/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/host-overview/client-core/src/main/java/com/redhat/thermostat/host/overview/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.host.overview.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { NUMBER_AND_UNIT,
--- a/host-overview/client-swing/src/main/java/com/redhat/thermostat/host/overview/client/swing/internal/HostOverviewPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/host-overview/client-swing/src/main/java/com/redhat/thermostat/host/overview/client/swing/internal/HostOverviewPanel.java Mon May 27 14:12:48 2013 +0200 @@ -57,9 +57,9 @@ import com.redhat.thermostat.client.swing.components.SectionHeader; import com.redhat.thermostat.client.swing.components.ValueField; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.host.overview.client.core.HostOverviewView; import com.redhat.thermostat.host.overview.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.Translate; public class HostOverviewPanel extends HostOverviewView implements SwingComponent {
--- a/keyring/pom.xml Wed May 29 16:55:11 2013 -0600 +++ b/keyring/pom.xml Mon May 27 14:12:48 2013 +0200 @@ -36,8 +36,8 @@ <configuration> <systemPropertyVariables> <com.redhat.thermostat.utils.keyring.provider>com.redhat.thermostat.utils.keyring.MemoryKeyring</com.redhat.thermostat.utils.keyring.provider> + <com.redhat.thermostat.shared.loader.testNativesHome>${project.build.directory}</com.redhat.thermostat.shared.loader.testNativesHome> </systemPropertyVariables> - <argLine>-Djava.library.path=${project.build.directory}/ ${coverageAgent}</argLine> </configuration> </plugin> @@ -122,5 +122,13 @@ <version>${project.version}</version> <scope>compile</scope> </dependency> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-shared-config</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + </dependencies> </project>
--- a/keyring/src/main/java/com/redhat/thermostat/utils/keyring/GnomeKeyringLibraryNative.java Wed May 29 16:55:11 2013 -0600 +++ b/keyring/src/main/java/com/redhat/thermostat/utils/keyring/GnomeKeyringLibraryNative.java Mon May 27 14:12:48 2013 +0200 @@ -36,16 +36,19 @@ package com.redhat.thermostat.utils.keyring; +import com.redhat.thermostat.shared.config.NativeLibraryResolver; + class GnomeKeyringLibraryNative implements Keyring { static { - System.loadLibrary("GnomeKeyringWrapper"); + String lib = NativeLibraryResolver.getAbsoluteLibraryPath("GnomeKeyringWrapper"); + System.load(lib); } public GnomeKeyringLibraryNative() { - + // nothing } - + @Override public synchronized void loadPassword(Credentials credentials) { if (credentials == null) {
--- a/killvm/client-swing/src/main/java/com/redhat/thermostat/killvm/client/internal/KillVMAction.java Wed May 29 16:55:11 2013 -0600 +++ b/killvm/client-swing/src/main/java/com/redhat/thermostat/killvm/client/internal/KillVMAction.java Mon May 27 14:12:48 2013 +0200 @@ -45,8 +45,8 @@ import com.redhat.thermostat.common.command.Request; import com.redhat.thermostat.common.command.Request.RequestType; import com.redhat.thermostat.common.command.RequestResponseListener; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.killvm.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.AgentInfoDAO; import com.redhat.thermostat.storage.dao.VmInfoDAO;
--- a/killvm/client-swing/src/main/java/com/redhat/thermostat/killvm/client/internal/SwingVMKilledListener.java Wed May 29 16:55:11 2013 -0600 +++ b/killvm/client-swing/src/main/java/com/redhat/thermostat/killvm/client/internal/SwingVMKilledListener.java Mon May 27 14:12:48 2013 +0200 @@ -45,9 +45,9 @@ import com.redhat.thermostat.common.command.Request; import com.redhat.thermostat.common.command.RequestResponseListener; import com.redhat.thermostat.common.command.Response; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; import com.redhat.thermostat.killvm.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.Translate; public class SwingVMKilledListener implements RequestResponseListener {
--- a/killvm/client-swing/src/main/java/com/redhat/thermostat/killvm/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/killvm/client-swing/src/main/java/com/redhat/thermostat/killvm/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.killvm.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/killvm/client-swing/src/test/java/com/redhat/thermostat/killvm/client/locale/TranslateTest.java Wed May 29 16:55:11 2013 -0600 +++ b/killvm/client-swing/src/test/java/com/redhat/thermostat/killvm/client/locale/TranslateTest.java Mon May 27 14:12:48 2013 +0200 @@ -46,8 +46,8 @@ import org.junit.Before; import org.junit.Test; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.killvm.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.Translate; public class TranslateTest {
--- a/laf-utils/pom.xml Wed May 29 16:55:11 2013 -0600 +++ b/laf-utils/pom.xml Mon May 27 14:12:48 2013 +0200 @@ -109,6 +109,11 @@ <artifactId>org.osgi.compendium</artifactId> <scope>provided</scope> </dependency> + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-shared-config</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </project>
--- a/laf-utils/src/main/java/com/redhat/thermostat/internal/utils/laf/gtk/GTKThemeUtils.java Wed May 29 16:55:11 2013 -0600 +++ b/laf-utils/src/main/java/com/redhat/thermostat/internal/utils/laf/gtk/GTKThemeUtils.java Mon May 27 14:12:48 2013 +0200 @@ -43,12 +43,15 @@ import javax.swing.SwingUtilities; import javax.swing.UIManager; +import com.redhat.thermostat.shared.config.NativeLibraryResolver; + public class GTKThemeUtils { private static boolean initialized; static { try { - System.loadLibrary("GTKThemeUtils"); + String lib = NativeLibraryResolver.getAbsoluteLibraryPath("GTKThemeUtils"); + System.load(lib); initialized = init(); } catch (UnsatisfiedLinkError ignore) {} }
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/BundleManager.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/BundleManager.java Mon May 27 14:12:48 2013 +0200 @@ -43,8 +43,8 @@ import org.osgi.framework.launch.Framework; import com.redhat.thermostat.annotations.Service; -import com.redhat.thermostat.common.config.Configuration; import com.redhat.thermostat.launcher.internal.BundleLoader; +import com.redhat.thermostat.shared.config.Configuration; /** * A Service that provides features to load bundles for given command names.
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/Activator.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/Activator.java Mon May 27 14:12:48 2013 +0200 @@ -50,8 +50,8 @@ import com.redhat.thermostat.common.cli.CommandContextFactory; import com.redhat.thermostat.common.cli.CommandRegistry; import com.redhat.thermostat.common.cli.CommandRegistryImpl; -import com.redhat.thermostat.common.config.Configuration; import com.redhat.thermostat.launcher.BundleManager; +import com.redhat.thermostat.shared.config.Configuration; import com.redhat.thermostat.utils.keyring.Keyring; public class Activator implements BundleActivator {
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleManagerImpl.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/BundleManagerImpl.java Mon May 27 14:12:48 2013 +0200 @@ -50,8 +50,8 @@ import org.osgi.framework.FrameworkUtil; import org.osgi.framework.launch.Framework; -import com.redhat.thermostat.common.config.Configuration; import com.redhat.thermostat.launcher.BundleManager; +import com.redhat.thermostat.shared.config.Configuration; public class BundleManagerImpl extends BundleManager {
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommandLineArgumentParseException.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommandLineArgumentParseException.java Mon May 27 14:12:48 2013 +0200 @@ -37,7 +37,7 @@ package com.redhat.thermostat.launcher.internal; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public class CommandLineArgumentParseException extends CommandException {
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommandLineArgumentsParser.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommandLineArgumentsParser.java Mon May 27 14:12:48 2013 +0200 @@ -49,8 +49,8 @@ import org.apache.commons.cli.ParseException; import com.redhat.thermostat.common.cli.Arguments; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; public class CommandLineArgumentsParser {
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommonOptions.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/CommonOptions.java Mon May 27 14:12:48 2013 +0200 @@ -43,7 +43,7 @@ import org.apache.commons.cli.Option; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; /* * Container class for launcher-added options, such as dbUrl.
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/HelpCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/HelpCommand.java Mon May 27 14:12:48 2013 +0200 @@ -50,7 +50,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.AbstractCommand; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public class HelpCommand extends AbstractCommand {
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/LauncherImpl.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/LauncherImpl.java Mon May 27 14:12:48 2013 +0200 @@ -63,13 +63,13 @@ import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.Console; import com.redhat.thermostat.common.config.ClientPreferences; -import com.redhat.thermostat.common.config.InvalidConfigurationException; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.tools.ApplicationState; import com.redhat.thermostat.common.tools.StorageAuthInfoGetter; import com.redhat.thermostat.common.utils.LoggingUtils; import com.redhat.thermostat.launcher.BundleManager; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.ConnectionException; import com.redhat.thermostat.storage.core.DbService; import com.redhat.thermostat.storage.core.DbServiceFactory; @@ -142,7 +142,13 @@ System.err.println("Caught NoClassDefFoundError! Check pom for the missing class: \"" + e.getMessage() + "\". Its package may not be listed."); throw e; - } finally { + } catch (Throwable e) { + // Sometimes get exceptions, which get seemingly swallowed, which + // they really aren't, but the finally block make it seem so. + e.printStackTrace(System.err); + throw e; + } + finally { args = null; boolean isLastLaunch = (usageCount.decrementAndGet() == 0); if (isLastLaunch) {
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.launcher.internal; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParser.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/main/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParser.java Mon May 27 14:12:48 2013 +0200 @@ -72,10 +72,10 @@ import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; import com.redhat.thermostat.launcher.internal.PluginConfiguration.CommandExtensions; import com.redhat.thermostat.launcher.internal.PluginConfiguration.NewCommand; +import com.redhat.thermostat.shared.locale.Translate; /** * Parses the configuration of a plugin as specified in an {@code File} or an
--- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/ActivatorTest.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/ActivatorTest.java Mon May 27 14:12:48 2013 +0200 @@ -76,9 +76,9 @@ import com.redhat.thermostat.common.MultipleServiceTracker; import com.redhat.thermostat.common.MultipleServiceTracker.Action; import com.redhat.thermostat.common.cli.Command; -import com.redhat.thermostat.common.config.Configuration; import com.redhat.thermostat.launcher.BundleManager; import com.redhat.thermostat.launcher.internal.Activator.RegisterLauncherCustomizer; +import com.redhat.thermostat.shared.config.Configuration; import com.redhat.thermostat.testutils.StubBundleContext; import com.redhat.thermostat.utils.keyring.Keyring;
--- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BuiltInCommandInfoTest.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BuiltInCommandInfoTest.java Mon May 27 14:12:48 2013 +0200 @@ -56,7 +56,7 @@ import org.junit.Before; import org.junit.Test; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public class BuiltInCommandInfoTest {
--- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BundleManagerImplTest.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/BundleManagerImplTest.java Mon May 27 14:12:48 2013 +0200 @@ -58,7 +58,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import com.redhat.thermostat.common.config.Configuration; +import com.redhat.thermostat.shared.config.Configuration; @RunWith(PowerMockRunner.class) @PrepareForTest({BundleManagerImpl.class, FrameworkUtil.class})
--- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/LauncherImplTest.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/LauncherImplTest.java Mon May 27 14:12:48 2013 +0200 @@ -74,13 +74,13 @@ import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.CommandRegistry; import com.redhat.thermostat.common.config.ClientPreferences; -import com.redhat.thermostat.common.locale.LocalizedString; import com.redhat.thermostat.common.tools.ApplicationState; import com.redhat.thermostat.launcher.BundleManager; import com.redhat.thermostat.launcher.internal.DisallowSystemExitSecurityManager.ExitException; import com.redhat.thermostat.launcher.internal.HelpCommand; import com.redhat.thermostat.launcher.internal.LauncherImpl; import com.redhat.thermostat.launcher.internal.LauncherImpl.LoggingInitializer; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.core.DbService; import com.redhat.thermostat.storage.core.DbServiceFactory; import com.redhat.thermostat.test.TestCommandContextFactory;
--- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParserTest.java Wed May 29 16:55:11 2013 -0600 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/PluginConfigurationParserTest.java Mon May 27 14:12:48 2013 +0200 @@ -52,9 +52,9 @@ import org.apache.commons.cli.Options; import org.junit.Test; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.launcher.internal.PluginConfiguration.CommandExtensions; import com.redhat.thermostat.launcher.internal.PluginConfiguration.NewCommand; +import com.redhat.thermostat.shared.locale.Translate; public class PluginConfigurationParserTest {
--- a/main/src/main/java/com/redhat/thermostat/main/Thermostat.java Wed May 29 16:55:11 2013 -0600 +++ b/main/src/main/java/com/redhat/thermostat/main/Thermostat.java Mon May 27 14:12:48 2013 +0200 @@ -41,8 +41,8 @@ import java.util.Iterator; import java.util.List; -import com.redhat.thermostat.common.config.Configuration; import com.redhat.thermostat.main.impl.FrameworkProvider; +import com.redhat.thermostat.shared.config.Configuration; public class Thermostat {
--- a/main/src/main/java/com/redhat/thermostat/main/impl/FrameworkProvider.java Wed May 29 16:55:11 2013 -0600 +++ b/main/src/main/java/com/redhat/thermostat/main/impl/FrameworkProvider.java Mon May 27 14:12:48 2013 +0200 @@ -60,8 +60,8 @@ import org.osgi.util.tracker.ServiceTracker; import com.redhat.thermostat.common.Launcher; -import com.redhat.thermostat.common.config.Configuration; import com.redhat.thermostat.launcher.BundleManager; +import com.redhat.thermostat.shared.config.Configuration; public class FrameworkProvider {
--- a/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties Wed May 29 16:55:11 2013 -0600 +++ b/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties Mon May 27 14:12:48 2013 +0200 @@ -1,4 +1,5 @@ -bundles=thermostat-keyring-${project.version}.jar, \ +bundles=thermostat-shared-config-${project.version}.jar, \ + thermostat-keyring-${project.version}.jar, \ thermostat-storage-core-${project.version}.jar, \ thermostat-common-core-${project.version}.jar, \ thermostat-launcher-${project.version}.jar, \
--- a/numa/client-core/src/main/java/com/redhat/thermostat/numa/client/core/NumaView.java Wed May 29 16:55:11 2013 -0600 +++ b/numa/client-core/src/main/java/com/redhat/thermostat/numa/client/core/NumaView.java Mon May 27 14:12:48 2013 +0200 @@ -40,7 +40,7 @@ import com.redhat.thermostat.client.core.views.BasicView; import com.redhat.thermostat.client.core.views.UIComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.model.DiscreteTimeData; public abstract class NumaView extends BasicView implements UIComponent {
--- a/numa/client-core/src/main/java/com/redhat/thermostat/numa/client/core/internal/NumaController.java Wed May 29 16:55:11 2013 -0600 +++ b/numa/client-core/src/main/java/com/redhat/thermostat/numa/client/core/internal/NumaController.java Mon May 27 14:12:48 2013 +0200 @@ -48,14 +48,14 @@ import com.redhat.thermostat.common.ApplicationService; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.numa.client.core.NumaView; import com.redhat.thermostat.numa.client.core.NumaView.GraphVisibilityChangeListener; import com.redhat.thermostat.numa.client.core.NumaViewProvider; import com.redhat.thermostat.numa.client.locale.LocaleResources; import com.redhat.thermostat.numa.common.NumaDAO; import com.redhat.thermostat.numa.common.NumaStat; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/numa/client-core/src/main/java/com/redhat/thermostat/numa/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/numa/client-core/src/main/java/com/redhat/thermostat/numa/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.numa.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { NUMA_TAB,
--- a/numa/client-core/src/test/java/com/redhat/thermostat/numa/client/core/internal/NumaControllerTest.java Wed May 29 16:55:11 2013 -0600 +++ b/numa/client-core/src/test/java/com/redhat/thermostat/numa/client/core/internal/NumaControllerTest.java Mon May 27 14:12:48 2013 +0200 @@ -65,13 +65,13 @@ import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; import com.redhat.thermostat.common.TimerFactory; -import com.redhat.thermostat.common.locale.LocalizedString; import com.redhat.thermostat.numa.client.core.NumaView; import com.redhat.thermostat.numa.client.core.NumaView.GraphVisibilityChangeListener; import com.redhat.thermostat.numa.client.core.NumaViewProvider; import com.redhat.thermostat.numa.common.NumaDAO; import com.redhat.thermostat.numa.common.NumaNodeStat; import com.redhat.thermostat.numa.common.NumaStat; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.model.DiscreteTimeData;
--- a/numa/client-swing/src/main/java/com/redhat/thermostat/numa/client/swing/internal/NumaPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/numa/client-swing/src/main/java/com/redhat/thermostat/numa/client/swing/internal/NumaPanel.java Mon May 27 14:12:48 2013 +0200 @@ -71,10 +71,10 @@ import com.redhat.thermostat.client.ui.ChartColors; import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.numa.client.core.NumaView; import com.redhat.thermostat.numa.client.locale.LocaleResources; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.swing.components.experimental.WrapLayout;
--- a/pom.xml Wed May 29 16:55:11 2013 -0600 +++ b/pom.xml Mon May 27 14:12:48 2013 +0200 @@ -150,6 +150,7 @@ <module>vm-jmx</module> <module>numa</module> <module>laf-utils</module> + <module>config</module> <!-- development related modules --> <module>integration-tests</module> <module>dev</module>
--- a/thread/client-common/src/main/java/com/redhat/thermostat/thread/client/common/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-common/src/main/java/com/redhat/thermostat/thread/client/common/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.thread.client.common.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/thread/client-common/src/main/java/com/redhat/thermostat/thread/client/common/view/ThreadView.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-common/src/main/java/com/redhat/thermostat/thread/client/common/view/ThreadView.java Mon May 27 14:12:48 2013 +0200 @@ -41,7 +41,7 @@ import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ActionNotifier; import com.redhat.thermostat.common.ApplicationService; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.thread.client.common.ThreadTableBean; public abstract class ThreadView extends BasicView implements UIComponent {
--- a/thread/client-controllers/src/main/java/com/redhat/thermostat/thread/client/controller/impl/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-controllers/src/main/java/com/redhat/thermostat/thread/client/controller/impl/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.thread.client.controller.impl; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/thread/client-controllers/src/main/java/com/redhat/thermostat/thread/client/controller/impl/ThreadInformationController.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-controllers/src/main/java/com/redhat/thermostat/thread/client/controller/impl/ThreadInformationController.java Mon May 27 14:12:48 2013 +0200 @@ -45,9 +45,9 @@ import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ApplicationService; import com.redhat.thermostat.common.TimerFactory; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.VmInfoDAO; import com.redhat.thermostat.thread.client.common.ThreadTableBean;
--- a/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadDetailsView.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadDetailsView.java Mon May 27 14:12:48 2013 +0200 @@ -45,7 +45,7 @@ import com.redhat.thermostat.client.swing.SwingComponent; import com.redhat.thermostat.client.swing.components.ChartPanel; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.thread.client.common.ThreadTableBean; import com.redhat.thermostat.thread.client.common.chart.ThreadDeatailsPieChart; import com.redhat.thermostat.thread.client.common.locale.LocaleResources;
--- a/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadTableView.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadTableView.java Mon May 27 14:12:48 2013 +0200 @@ -52,9 +52,9 @@ import com.redhat.thermostat.client.swing.ComponentVisibleListener; import com.redhat.thermostat.client.swing.SwingComponent; import com.redhat.thermostat.client.swing.components.ThermostatTable; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.thread.client.common.locale.LocaleResources; import com.redhat.thermostat.thread.client.common.view.ThreadTableView; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.thread.client.common.ThreadTableBean; public class SwingThreadTableView extends ThreadTableView implements SwingComponent {
--- a/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadView.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadView.java Mon May 27 14:12:48 2013 +0200 @@ -51,8 +51,8 @@ import com.redhat.thermostat.client.swing.ComponentVisibleListener; import com.redhat.thermostat.client.swing.SwingComponent; import com.redhat.thermostat.common.ApplicationService; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.thread.client.common.ThreadTableBean; import com.redhat.thermostat.thread.client.common.locale.LocaleResources; import com.redhat.thermostat.thread.client.common.view.ThreadCountView;
--- a/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/ThreadAliveDaemonTimelinePanel.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/ThreadAliveDaemonTimelinePanel.java Mon May 27 14:12:48 2013 +0200 @@ -44,7 +44,7 @@ import javax.swing.LayoutStyle.ComponentPlacement; import javax.swing.SwingConstants; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.thread.client.common.locale.LocaleResources; @SuppressWarnings("serial")
--- a/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/ThreadMainPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-swing/src/main/java/com/redhat/thermostat/thread/client/swing/impl/ThreadMainPanel.java Mon May 27 14:12:48 2013 +0200 @@ -45,7 +45,7 @@ import com.redhat.thermostat.client.swing.components.ActionToggleButton; import com.redhat.thermostat.client.swing.components.HeaderPanel; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.thread.client.common.IconResources; import com.redhat.thermostat.thread.client.common.locale.LocaleResources;
--- a/thread/client-swing/src/test/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadViewTest.java Wed May 29 16:55:11 2013 -0600 +++ b/thread/client-swing/src/test/java/com/redhat/thermostat/thread/client/swing/impl/SwingThreadViewTest.java Mon May 27 14:12:48 2013 +0200 @@ -68,7 +68,7 @@ import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.thread.client.common.ThreadTableBean; import com.redhat.thermostat.thread.client.common.locale.LocaleResources; import com.redhat.thermostat.thread.client.common.view.ThreadTableView;
--- a/vm-classstat/client-core/src/main/java/com/redhat/thermostat/vm/classstat/client/core/internal/VmClassStatController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-classstat/client-core/src/main/java/com/redhat/thermostat/vm/classstat/client/core/internal/VmClassStatController.java Mon May 27 14:12:48 2013 +0200 @@ -49,8 +49,8 @@ import com.redhat.thermostat.common.NotImplementedException; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.vm.classstat.client.core.VmClassStatView;
--- a/vm-classstat/client-core/src/main/java/com/redhat/thermostat/vm/classstat/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-classstat/client-core/src/main/java/com/redhat/thermostat/vm/classstat/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.classstat.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/vm-classstat/client-swing/src/main/java/com/redhat/thermostat/vm/classstat/client/swing/VmClassStatPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-classstat/client-swing/src/main/java/com/redhat/thermostat/vm/classstat/client/swing/VmClassStatPanel.java Mon May 27 14:12:48 2013 +0200 @@ -61,7 +61,7 @@ import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ActionNotifier; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.vm.classstat.client.core.VmClassStatView; import com.redhat.thermostat.vm.classstat.client.locale.LocaleResources;
--- a/vm-cpu/client-cli/src/main/java/com/redhat/thermostat/vm/cpu/client/cli/internal/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-cpu/client-cli/src/main/java/com/redhat/thermostat/vm/cpu/client/cli/internal/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.cpu.client.cli.internal; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/vm-cpu/client-cli/src/main/java/com/redhat/thermostat/vm/cpu/client/cli/internal/VmCpuStatPrintDelegate.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-cpu/client-cli/src/main/java/com/redhat/thermostat/vm/cpu/client/cli/internal/VmCpuStatPrintDelegate.java Mon May 27 14:12:48 2013 +0200 @@ -41,7 +41,7 @@ import java.util.List; import com.redhat.thermostat.client.cli.VMStatPrintDelegate; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.model.TimeStampedPojo; import com.redhat.thermostat.vm.cpu.common.VmCpuStatDAO;
--- a/vm-cpu/client-core/src/main/java/com/redhat/thermostat/vm/cpu/client/core/internal/VmCpuController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-cpu/client-core/src/main/java/com/redhat/thermostat/vm/cpu/client/core/internal/VmCpuController.java Mon May 27 14:12:48 2013 +0200 @@ -49,8 +49,8 @@ import com.redhat.thermostat.common.NotImplementedException; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.vm.cpu.client.core.VmCpuView;
--- a/vm-cpu/client-core/src/main/java/com/redhat/thermostat/vm/cpu/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-cpu/client-core/src/main/java/com/redhat/thermostat/vm/cpu/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.cpu.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/vm-cpu/client-swing/src/main/java/com/redhat/thermostat/vm/cpu/client/swing/internal/VmCpuPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-cpu/client-swing/src/main/java/com/redhat/thermostat/vm/cpu/client/swing/internal/VmCpuPanel.java Mon May 27 14:12:48 2013 +0200 @@ -56,7 +56,7 @@ import com.redhat.thermostat.client.swing.components.RecentTimeSeriesChartPanel; import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.model.DiscreteTimeData; import com.redhat.thermostat.vm.cpu.client.core.VmCpuView; import com.redhat.thermostat.vm.cpu.client.locale.LocaleResources;
--- a/vm-gc/client-core/src/main/java/com/redhat/thermostat/vm/gc/client/core/VmGcView.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-gc/client-core/src/main/java/com/redhat/thermostat/vm/gc/client/core/VmGcView.java Mon May 27 14:12:48 2013 +0200 @@ -40,7 +40,7 @@ import com.redhat.thermostat.client.core.views.BasicView; import com.redhat.thermostat.client.core.views.UIComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.model.IntervalTimeData; public abstract class VmGcView extends BasicView implements UIComponent {
--- a/vm-gc/client-core/src/main/java/com/redhat/thermostat/vm/gc/client/core/internal/VmGcController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-gc/client-core/src/main/java/com/redhat/thermostat/vm/gc/client/core/internal/VmGcController.java Mon May 27 14:12:48 2013 +0200 @@ -55,8 +55,8 @@ import com.redhat.thermostat.common.NotImplementedException; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.model.IntervalTimeData; import com.redhat.thermostat.storage.model.TimeStampedPojoComparator;
--- a/vm-gc/client-core/src/main/java/com/redhat/thermostat/vm/gc/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-gc/client-core/src/main/java/com/redhat/thermostat/vm/gc/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.gc.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { GARBAGE_COLLECTION,
--- a/vm-gc/client-swing/src/main/java/com/redhat/thermostat/vm/gc/client/swing/internal/VmGcPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-gc/client-swing/src/main/java/com/redhat/thermostat/vm/gc/client/swing/internal/VmGcPanel.java Mon May 27 14:12:48 2013 +0200 @@ -70,8 +70,8 @@ import com.redhat.thermostat.client.ui.RecentTimeSeriesChartController; import com.redhat.thermostat.client.ui.SampledDataset; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.model.IntervalTimeData; import com.redhat.thermostat.vm.gc.client.core.VmGcView; import com.redhat.thermostat.vm.gc.client.locale.LocaleResources;
--- a/vm-gc/remote-collector-client-common/src/main/java/com/redhat/thermostat/gc/remote/client/common/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-gc/remote-collector-client-common/src/main/java/com/redhat/thermostat/gc/remote/client/common/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.gc.remote.client.common; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/vm-gc/remote-collector-client-swing/src/main/java/com/redhat/thermostat/gc/remote/client/swing/ToolbarGCButton.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-gc/remote-collector-client-swing/src/main/java/com/redhat/thermostat/gc/remote/client/swing/ToolbarGCButton.java Mon May 27 14:12:48 2013 +0200 @@ -42,12 +42,12 @@ import javax.swing.ImageIcon; import com.redhat.thermostat.client.swing.components.ActionButton; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.gc.remote.client.common.IconResources; import com.redhat.thermostat.gc.remote.client.common.LocaleResources; import com.redhat.thermostat.gc.remote.client.common.RequestGCAction; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; @SuppressWarnings("serial") public class ToolbarGCButton extends ActionButton {
--- a/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/HeapDumpDetailsView.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/HeapDumpDetailsView.java Mon May 27 14:12:48 2013 +0200 @@ -38,7 +38,7 @@ import com.redhat.thermostat.client.core.views.BasicView; import com.redhat.thermostat.client.core.views.UIComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; public abstract class HeapDumpDetailsView extends BasicView implements UIComponent {
--- a/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/HeapView.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/HeapView.java Mon May 27 14:12:48 2013 +0200 @@ -42,7 +42,7 @@ import com.redhat.thermostat.client.core.views.UIComponent; import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ActionNotifier; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.vm.heap.analysis.client.core.chart.OverviewChart; import com.redhat.thermostat.vm.heap.analysis.common.HeapDump;
--- a/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpController.java Mon May 27 14:12:48 2013 +0200 @@ -52,8 +52,8 @@ import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.VmInfoDAO; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapDumpDetailsViewProvider;
--- a/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpDetailsController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpDetailsController.java Mon May 27 14:12:48 2013 +0200 @@ -42,9 +42,9 @@ import com.redhat.thermostat.client.core.views.BasicView; import com.redhat.thermostat.common.ApplicationService; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapDumpDetailsView; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapDumpDetailsViewProvider; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapHistogramView;
--- a/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/ObjectRootsController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/ObjectRootsController.java Mon May 27 14:12:48 2013 +0200 @@ -44,7 +44,7 @@ import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.NotImplementedException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapObjectUI; import com.redhat.thermostat.vm.heap.analysis.client.core.ObjectRootsView; import com.redhat.thermostat.vm.heap.analysis.client.core.ObjectRootsView.Action;
--- a/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.heap.analysis.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { COMMAND_OBJECT_INFO_OBJECT_ID,
--- a/vm-heap-analysis/client-core/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpControllerTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpControllerTest.java Mon May 27 14:12:48 2013 +0200 @@ -70,7 +70,7 @@ import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.TimerFactory; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.VmInfoDAO;
--- a/vm-heap-analysis/client-core/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpDetailsControllerTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-core/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/core/internal/HeapDumpDetailsControllerTest.java Mon May 27 14:12:48 2013 +0200 @@ -49,7 +49,7 @@ import org.junit.Test; import com.redhat.thermostat.common.ApplicationService; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapDumpDetailsView; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapDumpDetailsViewProvider; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapHistogramView;
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapDetailsSwing.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapDetailsSwing.java Mon May 27 14:12:48 2013 +0200 @@ -43,7 +43,7 @@ import javax.swing.SwingUtilities; import com.redhat.thermostat.client.swing.SwingComponent; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapDumpDetailsView; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapHistogramView; import com.redhat.thermostat.vm.heap.analysis.client.core.ObjectDetailsView;
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapSwingView.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapSwingView.java Mon May 27 14:12:48 2013 +0200 @@ -47,6 +47,8 @@ import javax.swing.JPanel; import javax.swing.SwingUtilities; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.swing.internal.stats.HeapDumpListener; import com.redhat.thermostat.vm.heap.analysis.client.swing.internal.stats.HeapSelectionEvent; @@ -59,8 +61,6 @@ import com.redhat.thermostat.client.swing.ComponentVisibleListener; import com.redhat.thermostat.client.swing.SwingComponent; import com.redhat.thermostat.client.swing.components.HeaderPanel; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapView; import com.redhat.thermostat.vm.heap.analysis.client.core.chart.OverviewChart; import com.redhat.thermostat.vm.heap.analysis.client.locale.LocaleResources;
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HistogramPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HistogramPanel.java Mon May 27 14:12:48 2013 +0200 @@ -50,8 +50,8 @@ import com.redhat.thermostat.client.swing.components.HeaderPanel; import com.redhat.thermostat.client.swing.components.ThermostatTable; import com.redhat.thermostat.client.swing.components.ThermostatTableRenderer; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.DescriptorConverter; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapHistogramView; import com.redhat.thermostat.vm.heap.analysis.client.locale.LocaleResources; import com.redhat.thermostat.vm.heap.analysis.common.HistogramRecord;
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/ObjectDetailsPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/ObjectDetailsPanel.java Mon May 27 14:12:48 2013 +0200 @@ -61,7 +61,7 @@ import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionNotifier; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapObjectUI; import com.redhat.thermostat.vm.heap.analysis.client.core.ObjectDetailsView; import com.redhat.thermostat.vm.heap.analysis.client.locale.LocaleResources;
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/ObjectRootsFrame.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/ObjectRootsFrame.java Mon May 27 14:12:48 2013 +0200 @@ -61,7 +61,7 @@ import com.redhat.thermostat.client.swing.EdtHelper; import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.ActionNotifier; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.core.HeapObjectUI; import com.redhat.thermostat.vm.heap.analysis.client.core.ObjectRootsView; import com.redhat.thermostat.vm.heap.analysis.client.locale.LocaleResources;
--- a/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/stats/HeapDumperPopup.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-swing/src/main/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/stats/HeapDumperPopup.java Mon May 27 14:12:48 2013 +0200 @@ -41,7 +41,7 @@ import javax.swing.JMenuItem; import com.redhat.thermostat.client.swing.components.ThermostatPopupMenu; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.client.locale.LocaleResources; @SuppressWarnings("serial")
--- a/vm-heap-analysis/client-swing/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapDetailsSwingTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/client-swing/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapDetailsSwingTest.java Mon May 27 14:12:48 2013 +0200 @@ -61,7 +61,7 @@ import org.junit.runner.RunWith; import com.redhat.thermostat.client.swing.EdtHelper; -import com.redhat.thermostat.common.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.vm.heap.analysis.client.swing.internal.HeapDetailsSwing; import com.redhat.thermostat.vm.heap.analysis.client.swing.internal.HistogramPanel; import com.redhat.thermostat.vm.heap.analysis.client.swing.internal.ObjectDetailsPanel;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/DumpHeapCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/DumpHeapCommand.java Mon May 27 14:12:48 2013 +0200 @@ -47,7 +47,7 @@ import com.redhat.thermostat.common.cli.AbstractCommand; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.dao.AgentInfoDAO; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/FindObjectsCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/FindObjectsCommand.java Mon May 27 14:12:48 2013 +0200 @@ -47,7 +47,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources; import com.redhat.thermostat.vm.heap.analysis.common.HeapDAO; import com.redhat.thermostat.vm.heap.analysis.common.HeapDump;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/FindRootCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/FindRootCommand.java Mon May 27 14:12:48 2013 +0200 @@ -47,7 +47,7 @@ import com.redhat.thermostat.common.cli.AbstractCommand; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.command.FindRoot; import com.redhat.thermostat.vm.heap.analysis.command.HeapPath; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/HeapNotFoundException.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/HeapNotFoundException.java Mon May 27 14:12:48 2013 +0200 @@ -37,7 +37,7 @@ package com.redhat.thermostat.vm.heap.analysis.command.internal; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources; @SuppressWarnings("serial")
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ListHeapDumpsCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ListHeapDumpsCommand.java Mon May 27 14:12:48 2013 +0200 @@ -49,7 +49,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.HostRef; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.HostInfoDAO;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ObjectInfoCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ObjectInfoCommand.java Mon May 27 14:12:48 2013 +0200 @@ -47,7 +47,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources; import com.redhat.thermostat.vm.heap.analysis.common.HeapDAO; import com.redhat.thermostat.vm.heap.analysis.common.HeapDump;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ObjectNotFoundException.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ObjectNotFoundException.java Mon May 27 14:12:48 2013 +0200 @@ -37,7 +37,7 @@ package com.redhat.thermostat.vm.heap.analysis.command.internal; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources; @SuppressWarnings("serial")
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/SaveHeapDumpToFileCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/SaveHeapDumpToFileCommand.java Mon May 27 14:12:48 2013 +0200 @@ -52,8 +52,8 @@ import com.redhat.thermostat.common.cli.Arguments; import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.StreamUtils; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources; import com.redhat.thermostat.vm.heap.analysis.common.HeapDAO; import com.redhat.thermostat.vm.heap.analysis.common.model.HeapInfo;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ShowHeapHistogramCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ShowHeapHistogramCommand.java Mon May 27 14:12:48 2013 +0200 @@ -47,7 +47,7 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.TableRenderer; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources; import com.redhat.thermostat.vm.heap.analysis.common.HeapDAO; import com.redhat.thermostat.vm.heap.analysis.common.HistogramRecord;
--- a/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/main/java/com/redhat/thermostat/vm/heap/analysis/command/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.heap.analysis.command.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { HOST_SERVICE_UNAVAILABLE,
--- a/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/DumpHeapCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/DumpHeapCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -54,7 +54,7 @@ import com.redhat.thermostat.client.command.RequestQueue; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.AgentInfoDAO; import com.redhat.thermostat.test.TestCommandContextFactory;
--- a/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ObjectInfoCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ObjectInfoCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -55,7 +55,7 @@ import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.test.TestCommandContextFactory; import com.redhat.thermostat.testutils.StubBundleContext; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources;
--- a/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/SaveHeapDumpToFileCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/SaveHeapDumpToFileCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -53,7 +53,7 @@ import com.redhat.thermostat.common.cli.Command; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.test.TestCommandContextFactory; import com.redhat.thermostat.testutils.StubBundleContext; import com.redhat.thermostat.vm.heap.analysis.command.internal.SaveHeapDumpToFileCommand.FileStreamCreator;
--- a/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ShowHeapHistogramCommandTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/ShowHeapHistogramCommandTest.java Mon May 27 14:12:48 2013 +0200 @@ -47,7 +47,7 @@ import com.redhat.thermostat.common.cli.Command; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.SimpleArguments; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.test.TestCommandContextFactory; import com.redhat.thermostat.testutils.StubBundleContext; import com.redhat.thermostat.vm.heap.analysis.command.locale.LocaleResources;
--- a/vm-jmx/client-core/src/main/java/com/redhat/thermostat/vm/jmx/client/core/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-jmx/client-core/src/main/java/com/redhat/thermostat/vm/jmx/client/core/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.jmx.client.core; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/vm-jmx/client-core/src/main/java/com/redhat/thermostat/vm/jmx/client/core/internal/JmxNotificationsViewController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-jmx/client-core/src/main/java/com/redhat/thermostat/vm/jmx/client/core/internal/JmxNotificationsViewController.java Mon May 27 14:12:48 2013 +0200 @@ -49,8 +49,8 @@ import com.redhat.thermostat.common.ActionListener; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.TimerFactory; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.AgentInfoDAO; import com.redhat.thermostat.vm.jmx.client.core.JmxNotificationsView;
--- a/vm-jmx/client-swing/src/main/java/com/redhat/thermostat/vm/jmx/client/swing/internal/JmxNotificationsSwingView.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-jmx/client-swing/src/main/java/com/redhat/thermostat/vm/jmx/client/swing/internal/JmxNotificationsSwingView.java Mon May 27 14:12:48 2013 +0200 @@ -61,7 +61,7 @@ import com.redhat.thermostat.client.swing.components.HeaderPanel; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.jmx.client.core.JmxNotificationsView; import com.redhat.thermostat.vm.jmx.client.core.LocaleResources; import com.redhat.thermostat.vm.jmx.common.JmxNotification;
--- a/vm-memory/client-cli/src/main/java/com/redhat/thermostat/vm/memory/client/cli/internal/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-memory/client-cli/src/main/java/com/redhat/thermostat/vm/memory/client/cli/internal/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.memory.client.cli.internal; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/vm-memory/client-cli/src/main/java/com/redhat/thermostat/vm/memory/client/cli/internal/VmMemoryStatPrintDelegate.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-memory/client-cli/src/main/java/com/redhat/thermostat/vm/memory/client/cli/internal/VmMemoryStatPrintDelegate.java Mon May 27 14:12:48 2013 +0200 @@ -41,7 +41,7 @@ import com.redhat.thermostat.client.cli.VMStatPrintDelegate; import com.redhat.thermostat.common.Size; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.model.TimeStampedPojo; import com.redhat.thermostat.vm.memory.common.VmMemoryStatDAO;
--- a/vm-memory/client-core/src/main/java/com/redhat/thermostat/vm/memory/client/core/MemoryStatsView.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-memory/client-core/src/main/java/com/redhat/thermostat/vm/memory/client/core/MemoryStatsView.java Mon May 27 14:12:48 2013 +0200 @@ -39,8 +39,8 @@ import com.redhat.thermostat.client.core.views.BasicView; import com.redhat.thermostat.client.core.views.UIComponent; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; import com.redhat.thermostat.gc.remote.common.command.GCCommand; +import com.redhat.thermostat.shared.locale.LocalizedString; public abstract class MemoryStatsView extends BasicView implements UIComponent {
--- a/vm-memory/client-core/src/main/java/com/redhat/thermostat/vm/memory/client/core/internal/MemoryStatsController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-memory/client-core/src/main/java/com/redhat/thermostat/vm/memory/client/core/internal/MemoryStatsController.java Mon May 27 14:12:48 2013 +0200 @@ -56,10 +56,10 @@ import com.redhat.thermostat.common.command.RequestResponseListener; import com.redhat.thermostat.common.command.Response; import com.redhat.thermostat.common.command.Response.ResponseType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.gc.remote.common.GCRequest; import com.redhat.thermostat.gc.remote.common.command.GCCommand; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.AgentInfoDAO; import com.redhat.thermostat.storage.dao.VmInfoDAO;
--- a/vm-memory/client-core/src/main/java/com/redhat/thermostat/vm/memory/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-memory/client-core/src/main/java/com/redhat/thermostat/vm/memory/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.memory.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/vm-memory/client-swing/src/main/java/com/redhat/thermostat/vm/memory/client/swing/internal/MemoryStatsViewImpl.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-memory/client-swing/src/main/java/com/redhat/thermostat/vm/memory/client/swing/internal/MemoryStatsViewImpl.java Mon May 27 14:12:48 2013 +0200 @@ -53,10 +53,10 @@ import com.redhat.thermostat.client.swing.SwingComponent; import com.redhat.thermostat.client.swing.components.HeaderPanel; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.LocalizedString; import com.redhat.thermostat.gc.remote.client.common.RequestGCAction; import com.redhat.thermostat.gc.remote.client.swing.ToolbarGCButton; import com.redhat.thermostat.gc.remote.common.command.GCCommand; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.vm.memory.client.core.MemoryStatsView; import com.redhat.thermostat.vm.memory.client.core.Payload;
--- a/vm-overview/client-core/src/main/java/com/redhat/thermostat/vm/overview/client/core/internal/VmOverviewController.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-overview/client-core/src/main/java/com/redhat/thermostat/vm/overview/client/core/internal/VmOverviewController.java Mon May 27 14:12:48 2013 +0200 @@ -49,8 +49,8 @@ import com.redhat.thermostat.common.NotImplementedException; import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; -import com.redhat.thermostat.common.locale.LocalizedString; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.LocalizedString; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.VmInfoDAO; import com.redhat.thermostat.storage.model.VmInfo;
--- a/vm-overview/client-core/src/main/java/com/redhat/thermostat/vm/overview/client/locale/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-overview/client-core/src/main/java/com/redhat/thermostat/vm/overview/client/locale/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.vm.overview.client.locale; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources { VM_INFO_TAB_OVERVIEW,
--- a/vm-overview/client-core/src/test/java/com/redhat/thermostat/vm/overview/client/core/internal/VmOverviewControllerTest.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-overview/client-core/src/test/java/com/redhat/thermostat/vm/overview/client/core/internal/VmOverviewControllerTest.java Mon May 27 14:12:48 2013 +0200 @@ -60,7 +60,7 @@ import com.redhat.thermostat.common.Timer; import com.redhat.thermostat.common.Timer.SchedulingType; import com.redhat.thermostat.common.TimerFactory; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.core.VmRef; import com.redhat.thermostat.storage.dao.VmInfoDAO; import com.redhat.thermostat.storage.model.VmInfo;
--- a/vm-overview/client-swing/src/main/java/com/redhat/thermostat/vm/overview/client/swing/internal/VmOverviewPanel.java Wed May 29 16:55:11 2013 -0600 +++ b/vm-overview/client-swing/src/main/java/com/redhat/thermostat/vm/overview/client/swing/internal/VmOverviewPanel.java Mon May 27 14:12:48 2013 +0200 @@ -53,7 +53,7 @@ import com.redhat.thermostat.client.swing.components.SectionHeader; import com.redhat.thermostat.client.swing.components.ValueField; import com.redhat.thermostat.common.ActionListener; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.overview.client.core.VmOverviewView; import com.redhat.thermostat.vm.overview.client.locale.LocaleResources;
--- a/web/cmd/src/main/java/com/redhat/thermostat/web/cmd/LocaleResources.java Wed May 29 16:55:11 2013 -0600 +++ b/web/cmd/src/main/java/com/redhat/thermostat/web/cmd/LocaleResources.java Mon May 27 14:12:48 2013 +0200 @@ -36,7 +36,7 @@ package com.redhat.thermostat.web.cmd; -import com.redhat.thermostat.common.locale.Translate; +import com.redhat.thermostat.shared.locale.Translate; public enum LocaleResources {
--- a/web/cmd/src/main/java/com/redhat/thermostat/web/cmd/WebServiceCommand.java Wed May 29 16:55:11 2013 -0600 +++ b/web/cmd/src/main/java/com/redhat/thermostat/web/cmd/WebServiceCommand.java Mon May 27 14:12:48 2013 +0200 @@ -42,9 +42,9 @@ import com.redhat.thermostat.common.cli.CommandContext; import com.redhat.thermostat.common.cli.CommandException; import com.redhat.thermostat.common.cli.AbstractCommand; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.HostPortPair; import com.redhat.thermostat.common.utils.HostPortsParser; +import com.redhat.thermostat.shared.locale.Translate; public class WebServiceCommand extends AbstractCommand {
--- a/web/cmd/src/main/java/com/redhat/thermostat/web/cmd/WebServiceLauncher.java Wed May 29 16:55:11 2013 -0600 +++ b/web/cmd/src/main/java/com/redhat/thermostat/web/cmd/WebServiceLauncher.java Mon May 27 14:12:48 2013 +0200 @@ -49,9 +49,9 @@ import org.eclipse.jetty.util.security.Constraint; import org.eclipse.jetty.webapp.WebAppContext; -import com.redhat.thermostat.common.config.InvalidConfigurationException; -import com.redhat.thermostat.common.locale.Translate; import com.redhat.thermostat.common.utils.HostPortPair; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.storage.mongodb.MongoStorageProvider; import com.redhat.thermostat.web.server.WebStorageEndPoint; import com.redhat.thermostat.web.server.auth.RolePrincipal;
--- a/web/cmd/src/test/java/com/redhat/thermostat/web/cmd/WebServiceLauncherTest.java Wed May 29 16:55:11 2013 -0600 +++ b/web/cmd/src/test/java/com/redhat/thermostat/web/cmd/WebServiceLauncherTest.java Mon May 27 14:12:48 2013 +0200 @@ -50,8 +50,8 @@ import org.junit.Ignore; import org.junit.Test; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.utils.HostPortPair; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class WebServiceLauncherTest {
--- a/web/server/src/main/java/com/redhat/thermostat/web/server/WebStorageEndPoint.java Wed May 29 16:55:11 2013 -0600 +++ b/web/server/src/main/java/com/redhat/thermostat/web/server/WebStorageEndPoint.java Mon May 27 14:12:48 2013 +0200 @@ -65,9 +65,9 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonParser; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; import com.redhat.thermostat.storage.core.AbstractQuery.Sort; import com.redhat.thermostat.storage.core.Category; import com.redhat.thermostat.storage.core.Connection;
--- a/web/server/src/main/java/com/redhat/thermostat/web/server/auth/spi/PropertiesUserValidator.java Wed May 29 16:55:11 2013 -0600 +++ b/web/server/src/main/java/com/redhat/thermostat/web/server/auth/spi/PropertiesUserValidator.java Mon May 27 14:12:48 2013 +0200 @@ -45,9 +45,9 @@ import java.util.logging.Level; import java.util.logging.Logger; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; /** *
--- a/web/server/src/main/java/com/redhat/thermostat/web/server/auth/spi/RolesAmender.java Wed May 29 16:55:11 2013 -0600 +++ b/web/server/src/main/java/com/redhat/thermostat/web/server/auth/spi/RolesAmender.java Mon May 27 14:12:48 2013 +0200 @@ -49,9 +49,9 @@ import java.util.logging.Level; import java.util.logging.Logger; -import com.redhat.thermostat.common.config.Configuration; -import com.redhat.thermostat.common.config.InvalidConfigurationException; import com.redhat.thermostat.common.utils.LoggingUtils; +import com.redhat.thermostat.shared.config.Configuration; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; import com.redhat.thermostat.web.server.auth.BasicRole; import com.redhat.thermostat.web.server.auth.RolePrincipal;
--- a/web/server/src/test/java/com/redhat/thermostat/web/server/auth/spi/PropertiesUserValidatorTest.java Wed May 29 16:55:11 2013 -0600 +++ b/web/server/src/test/java/com/redhat/thermostat/web/server/auth/spi/PropertiesUserValidatorTest.java Mon May 27 14:12:48 2013 +0200 @@ -49,7 +49,7 @@ import org.junit.Before; import org.junit.Test; -import com.redhat.thermostat.common.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; public class PropertiesUserValidatorTest {
--- a/web/server/src/test/java/com/redhat/thermostat/web/server/auth/spi/RolesAmenderTest.java Wed May 29 16:55:11 2013 -0600 +++ b/web/server/src/test/java/com/redhat/thermostat/web/server/auth/spi/RolesAmenderTest.java Mon May 27 14:12:48 2013 +0200 @@ -55,7 +55,7 @@ import org.junit.Before; import org.junit.Test; -import com.redhat.thermostat.common.config.InvalidConfigurationException; +import com.redhat.thermostat.shared.config.InvalidConfigurationException; import com.redhat.thermostat.web.server.auth.BasicRole; import com.redhat.thermostat.web.server.auth.RolePrincipal; import com.redhat.thermostat.web.server.auth.spi.RolesAmender.RolesInfo;