geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1231357 - /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/ServerInfoWrapper.java
Date Fri, 13 Jan 2012 22:27:35 GMT
Author: djencks
Date: Fri Jan 13 22:27:35 2012
New Revision: 1231357

URL: http://svn.apache.org/viewvc?rev=1231357&view=rev
Log:
GERONIMO-6240 karaf and geronimo have opposite meanings of HOME and BASE

Modified:
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/ServerInfoWrapper.java

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/ServerInfoWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/ServerInfoWrapper.java?rev=1231357&r1=1231356&r2=1231357&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/ServerInfoWrapper.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/ServerInfoWrapper.java
Fri Jan 13 22:27:35 2012
@@ -29,6 +29,14 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 
 /**
+ * Supply a geronimo ServerInfo based on the karaf ServerInfo.
+ * Note that geronimo's idea of home and base are backwards from karaf's idea.
+ *
+ * Geronimo: base is the install directory, home is where e.g. var is
+ * Karaf: home is the install directory, base is where e.g. etc, system, are.
+ *
+ * Thus the karaf methods called may look wrong.
+ *
  * @version $Rev:$ $Date:$
  */
 @Component(immediate = true, metatype = true)
@@ -50,42 +58,42 @@ public class ServerInfoWrapper implement
 
     @Override
     public String resolvePath(String filename) {
-        return delegate.resolveBasePath(filename);
+        return delegate.resolveHomePath(filename);
     }
 
     @Override
     public String resolveServerPath(String filename) {
-        return delegate.resolveHomePath(filename);
+        return delegate.resolveBasePath(filename);
     }
 
     @Override
     public File resolve(String filename) {
-        return delegate.resolveBase(filename);
+        return delegate.resolveHome(filename);
     }
 
     @Override
     public File resolveServer(String filename) {
-        return delegate.resolveHome(filename);
+        return delegate.resolveBase(filename);
     }
 
     @Override
     public URI resolve(URI uri) {
-        return delegate.resolveBase(uri);
+        return delegate.resolveHome(uri);
     }
 
     @Override
     public URI resolveServer(URI uri) {
-        return delegate.resolveHome(uri);
+        return delegate.resolveBase(uri);
     }
 
     @Override
     public String getBaseDirectory() {
-        return delegate.getBaseDirectory().getAbsolutePath();
+        return delegate.getHomeDirectory().getAbsolutePath();
     }
 
     @Override
     public String getCurrentBaseDirectory() {
-        return delegate.getBaseDirectory().getAbsolutePath();
+        return delegate.getHomeDirectory().getAbsolutePath();
     }
 
     @Override



Mime
View raw message