changeset 1369:d532e4b839c3

Rename c.r.t.utils.username to c.r.t.agent.utils.username Reviewed-by: vanaltj Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-November/008945.html
author Omair Majid <omajid@redhat.com>
date Mon, 25 Nov 2013 19:03:54 -0500
parents b1f82879e6a9
children a95e62b91369
files README.api agent/core/pom.xml agent/core/src/main/java/com/redhat/thermostat/agent/internal/Activator.java agent/core/src/main/java/com/redhat/thermostat/agent/utils/username/UserNameLookupException.java agent/core/src/main/java/com/redhat/thermostat/agent/utils/username/UserNameUtil.java agent/core/src/main/java/com/redhat/thermostat/utils/username/UserNameLookupException.java agent/core/src/main/java/com/redhat/thermostat/utils/username/UserNameUtil.java agent/core/src/main/java/com/redhat/thermostat/utils/username/internal/UserNameUtilImpl.java agent/core/src/test/java/com/redhat/thermostat/agent/internal/ActivatorTest.java system-backend/src/main/java/com/redhat/thermostat/backend/system/ProcessUserInfoBuilder.java system-backend/src/main/java/com/redhat/thermostat/backend/system/SystemBackend.java system-backend/src/main/java/com/redhat/thermostat/backend/system/osgi/SystemBackendActivator.java system-backend/src/test/java/com/redhat/thermostat/backend/system/ProcessUserInfoBuilderTest.java system-backend/src/test/java/com/redhat/thermostat/backend/system/SystemBackendTest.java
diffstat 14 files changed, 119 insertions(+), 119 deletions(-) [+]
line wrap: on
line diff
--- a/README.api	Mon Nov 25 19:03:29 2013 -0500
+++ b/README.api	Mon Nov 25 19:03:54 2013 -0500
@@ -9,6 +9,7 @@
  - com.redhat.thermostat.agent.utils
  - com.redhat.thermostat.agent.utils.hostname
  - com.redhat.thermostat.agent.utils.management
+ - com.redhat.thermostat.agent.utils.username
  - com.redhat.thermostat.annotations
  - com.redhat.thermostat.backend
  - com.redhat.thermostat.client.cli
@@ -42,7 +43,6 @@
  - com.redhat.thermostat.storage.monitor
  - com.redhat.thermostat.storage.query
  - com.redhat.thermostat.utils.keyring
- - com.redhat.thermostat.utils.username
 
 
 
--- a/agent/core/pom.xml	Mon Nov 25 19:03:29 2013 -0500
+++ b/agent/core/pom.xml	Mon Nov 25 19:03:54 2013 -0500
@@ -128,8 +128,8 @@
               com.redhat.thermostat.agent.utils,
               com.redhat.thermostat.agent.utils.hostname,
               com.redhat.thermostat.agent.utils.management,
+              com.redhat.thermostat.agent.utils.username,
               com.redhat.thermostat.backend,
-              com.redhat.thermostat.utils.username,
             </Export-Package>
             <Private-Package>
               com.redhat.thermostat.agent.internal,
--- a/agent/core/src/main/java/com/redhat/thermostat/agent/internal/Activator.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/agent/core/src/main/java/com/redhat/thermostat/agent/internal/Activator.java	Mon Nov 25 19:03:54 2013 -0500
@@ -44,10 +44,10 @@
 import com.redhat.thermostat.agent.VmBlacklist;
 import com.redhat.thermostat.agent.config.AgentConfigsUtils;
 import com.redhat.thermostat.agent.utils.management.MXBeanConnectionPool;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.shared.config.CommonPaths;
 import com.redhat.thermostat.utils.management.internal.AgentProxyFilter;
 import com.redhat.thermostat.utils.management.internal.MXBeanConnectionPoolImpl;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 import com.redhat.thermostat.utils.username.internal.UserNameUtilImpl;
 
 public class Activator implements BundleActivator {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/core/src/main/java/com/redhat/thermostat/agent/utils/username/UserNameLookupException.java	Mon Nov 25 19:03:54 2013 -0500
@@ -0,0 +1,51 @@
+/*
+ * 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.agent.utils.username;
+
+/**
+ * 
+ * Thrown on user name lookup error.
+ *
+ * @see UserNameUtil
+ */
+@SuppressWarnings("serial")
+public class UserNameLookupException extends Exception {
+
+    public UserNameLookupException(Throwable cause) {
+        super(cause);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/core/src/main/java/com/redhat/thermostat/agent/utils/username/UserNameUtil.java	Mon Nov 25 19:03:54 2013 -0500
@@ -0,0 +1,55 @@
+/*
+ * 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.agent.utils.username;
+
+/**
+ * Utility to query the operating system for a user name.
+ */
+public interface UserNameUtil {
+
+    /**
+     * Gets the user name corresponding to the provided UID.
+     * 
+     * @param uid
+     *            The UID whose name to return.
+     * @throws UserNameLookupException
+     *            If an error occurred during retrieval of the user name.
+     * @return The user name if found. null if no such UID exists.
+     */
+    String getUserName(long uid) throws UserNameLookupException;
+
+}
--- a/agent/core/src/main/java/com/redhat/thermostat/utils/username/UserNameLookupException.java	Mon Nov 25 19:03:29 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +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.utils.username;
-
-/**
- * 
- * Thrown on user name lookup error.
- *
- * @see UserNameUtil
- */
-@SuppressWarnings("serial")
-public class UserNameLookupException extends Exception {
-
-    public UserNameLookupException(Throwable cause) {
-        super(cause);
-    }
-}
--- a/agent/core/src/main/java/com/redhat/thermostat/utils/username/UserNameUtil.java	Mon Nov 25 19:03:29 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +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.utils.username;
-
-/**
- * Utility to query the operating system for a user name.
- */
-public interface UserNameUtil {
-
-    /**
-     * Gets the user name corresponding to the provided UID.
-     * 
-     * @param uid
-     *            The UID whose name to return.
-     * @throws UserNameLookupException
-     *            If an error occurred during retrieval of the user name.
-     * @return The user name if found. null if no such UID exists.
-     */
-    String getUserName(long uid) throws UserNameLookupException;
-
-}
--- a/agent/core/src/main/java/com/redhat/thermostat/utils/username/internal/UserNameUtilImpl.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/agent/core/src/main/java/com/redhat/thermostat/utils/username/internal/UserNameUtilImpl.java	Mon Nov 25 19:03:54 2013 -0500
@@ -38,9 +38,9 @@
 
 import java.io.IOException;
 
-import com.redhat.thermostat.utils.username.UserNameLookupException;
+import com.redhat.thermostat.agent.utils.username.UserNameLookupException;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.shared.config.NativeLibraryResolver;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 
 public class UserNameUtilImpl implements UserNameUtil {
     
--- a/agent/core/src/test/java/com/redhat/thermostat/agent/internal/ActivatorTest.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/agent/core/src/test/java/com/redhat/thermostat/agent/internal/ActivatorTest.java	Mon Nov 25 19:03:54 2013 -0500
@@ -48,11 +48,11 @@
 import com.redhat.thermostat.agent.RMIRegistry;
 import com.redhat.thermostat.agent.VmBlacklist;
 import com.redhat.thermostat.agent.utils.management.MXBeanConnectionPool;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.shared.config.CommonPaths;
 import com.redhat.thermostat.shared.config.NativeLibraryResolver;
 import com.redhat.thermostat.testutils.StubBundleContext;
 import com.redhat.thermostat.utils.management.internal.MXBeanConnectionPoolImpl;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 import com.redhat.thermostat.utils.username.internal.UserNameUtilImpl;
 
 public class ActivatorTest {
--- a/system-backend/src/main/java/com/redhat/thermostat/backend/system/ProcessUserInfoBuilder.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/system-backend/src/main/java/com/redhat/thermostat/backend/system/ProcessUserInfoBuilder.java	Mon Nov 25 19:03:54 2013 -0500
@@ -43,9 +43,9 @@
 import java.util.logging.Logger;
 
 import com.redhat.thermostat.agent.utils.ProcDataSource;
+import com.redhat.thermostat.agent.utils.username.UserNameLookupException;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.common.utils.LoggingUtils;
-import com.redhat.thermostat.utils.username.UserNameLookupException;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 
 class ProcessUserInfoBuilder {
     
--- a/system-backend/src/main/java/com/redhat/thermostat/backend/system/SystemBackend.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/system-backend/src/main/java/com/redhat/thermostat/backend/system/SystemBackend.java	Mon Nov 25 19:03:54 2013 -0500
@@ -48,6 +48,7 @@
 
 import com.redhat.thermostat.agent.VmBlacklist;
 import com.redhat.thermostat.agent.utils.ProcDataSource;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.backend.BaseBackend;
 import com.redhat.thermostat.common.Version;
 import com.redhat.thermostat.common.utils.LoggingUtils;
@@ -58,7 +59,6 @@
 import com.redhat.thermostat.storage.dao.VmInfoDAO;
 import com.redhat.thermostat.storage.model.HostInfo;
 import com.redhat.thermostat.storage.model.NetworkInterfaceInfo;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 
 public class SystemBackend extends BaseBackend {
 
--- a/system-backend/src/main/java/com/redhat/thermostat/backend/system/osgi/SystemBackendActivator.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/system-backend/src/main/java/com/redhat/thermostat/backend/system/osgi/SystemBackendActivator.java	Mon Nov 25 19:03:54 2013 -0500
@@ -43,6 +43,7 @@
 import org.osgi.framework.ServiceRegistration;
 
 import com.redhat.thermostat.agent.VmBlacklist;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.backend.Backend;
 import com.redhat.thermostat.backend.BackendService;
 import com.redhat.thermostat.backend.system.SystemBackend;
@@ -54,7 +55,6 @@
 import com.redhat.thermostat.storage.dao.HostInfoDAO;
 import com.redhat.thermostat.storage.dao.NetworkInterfaceInfoDAO;
 import com.redhat.thermostat.storage.dao.VmInfoDAO;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 
 @SuppressWarnings("rawtypes")
 public class SystemBackendActivator implements BundleActivator {
--- a/system-backend/src/test/java/com/redhat/thermostat/backend/system/ProcessUserInfoBuilderTest.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/system-backend/src/test/java/com/redhat/thermostat/backend/system/ProcessUserInfoBuilderTest.java	Mon Nov 25 19:03:54 2013 -0500
@@ -47,10 +47,10 @@
 import org.junit.Test;
 
 import com.redhat.thermostat.agent.utils.ProcDataSource;
+import com.redhat.thermostat.agent.utils.username.UserNameLookupException;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.backend.system.ProcessUserInfoBuilder.ProcessUserInfo;
 import com.redhat.thermostat.common.tools.ApplicationException;
-import com.redhat.thermostat.utils.username.UserNameLookupException;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 
 public class ProcessUserInfoBuilderTest {
     
--- a/system-backend/src/test/java/com/redhat/thermostat/backend/system/SystemBackendTest.java	Mon Nov 25 19:03:29 2013 -0500
+++ b/system-backend/src/test/java/com/redhat/thermostat/backend/system/SystemBackendTest.java	Mon Nov 25 19:03:54 2013 -0500
@@ -46,12 +46,12 @@
 import org.junit.Test;
 
 import com.redhat.thermostat.agent.VmBlacklist;
+import com.redhat.thermostat.agent.utils.username.UserNameUtil;
 import com.redhat.thermostat.common.Version;
 import com.redhat.thermostat.storage.core.WriterID;
 import com.redhat.thermostat.storage.dao.HostInfoDAO;
 import com.redhat.thermostat.storage.dao.NetworkInterfaceInfoDAO;
 import com.redhat.thermostat.storage.dao.VmInfoDAO;
-import com.redhat.thermostat.utils.username.UserNameUtil;
 
 public class SystemBackendTest {