From: Mathieu Baudier Date: Fri, 1 Jul 2011 10:24:30 +0000 (+0000) Subject: Improve OSGi boot documentation X-Git-Tag: argeo-commons-2.1.30~1206 X-Git-Url: https://git.argeo.org/?a=commitdiff_plain;h=34af89b606ac097a605cf1a37efc638b9583d49d;p=lgpl%2Fargeo-commons.git Improve OSGi boot documentation git-svn-id: https://svn.argeo.org/commons/trunk@4644 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/osgi/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java b/osgi/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java index 63e5d059b..f120358a1 100644 --- a/osgi/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java +++ b/osgi/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java @@ -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);