Improve OSGi boot documentation
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 1 Jul 2011 10:24:30 +0000 (10:24 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 1 Jul 2011 10:24:30 +0000 (10:24 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4644 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

osgi/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java

index 63e5d059b39cbd9b8d928aa21bd5755737e035ac..f120358a11cc63aed74a9353fc9eb92956ced332 100644 (file)
@@ -113,15 +113,7 @@ public class OsgiBoot {
 
        }
 
-       public static String removeFilePrefix(String url) {
-               if (url.startsWith("file:"))
-                       return url.substring("file:".length());
-               else if (url.startsWith("reference:file:"))
-                       return url.substring("reference:file:".length());
-               else
-                       return url;
-       }
-
+       /** Boot strap the OSGi runtime */
        public void bootstrap() {
                long begin = System.currentTimeMillis();
                System.out.println();
@@ -611,6 +603,10 @@ public class OsgiBoot {
                return urls;
        }
 
+       /*
+        * HIGH LEVEL UTILITIES
+        */
+       
        protected void match(PathMatcher matcher, List matched, String base,
                        String currentPath, String pattern) {
                if (currentPath == null) {
@@ -675,6 +671,11 @@ public class OsgiBoot {
                }
        }
 
+       /*
+        * LOW LEVEL UTILITIES
+        */
+       
+       /** Creates an URL from alocation */
        protected String locationToUrl(String baseUrl, String location) {
                int extInd = location.lastIndexOf('.');
                String ext = null;
@@ -692,6 +693,15 @@ public class OsgiBoot {
                return (basePath + '/' + relativePath).replace('/', File.separatorChar);
        }
 
+       private String removeFilePrefix(String url) {
+               if (url.startsWith("file:"))
+                       return url.substring("file:".length());
+               else if (url.startsWith("reference:file:"))
+                       return url.substring("reference:file:".length());
+               else
+                       return url;
+       }
+
        protected void debug(Object obj) {
                if (debug)
                        OsgiBootUtils.debug(obj);