public class OsgiUtils
extends java.lang.Object
Constructor and Description |
---|
OsgiUtils() |
Modifier and Type | Method and Description |
---|---|
static java.net.URL |
getContainerUrl(java.net.URL url,
java.lang.String resourceInThatDir) |
static java.lang.String |
getVersionedId(org.osgi.framework.Bundle b) |
static java.lang.String |
getVersionedId(java.util.jar.Manifest manifest) |
static Maybe<VersionedName> |
parseOsgiIdentifier(java.lang.String symbolicNameOptionalWithVersion)
Deprecated.
since 0.12.0 use
VersionedName.parseMaybe(String, boolean) ; check OSGi version compatibility manually if needed
(but usually not wanted, we let it convert to OSGi syntax as needed) |
static java.lang.String |
toOsgiVersion(java.lang.String version)
Deprecated.
since 0.12.0 use
BrooklynVersionSyntax.toValidOsgiVersion(String) ;
but note it has slightly different semantics in some odd cases, e.g. this maps "1x" to "0.0.0.1x" whereas
the new method maps to "1.0.0.x" |
public static java.net.URL getContainerUrl(java.net.URL url, java.lang.String resourceInThatDir)
public static java.lang.String getVersionedId(java.util.jar.Manifest manifest)
public static java.lang.String getVersionedId(org.osgi.framework.Bundle b)
@Deprecated public static Maybe<VersionedName> parseOsgiIdentifier(java.lang.String symbolicNameOptionalWithVersion)
VersionedName.parseMaybe(String, boolean)
; check OSGi version compatibility manually if needed
(but usually not wanted, we let it convert to OSGi syntax as needed)VersionedName.parseMaybe(String, boolean)
but enforces OSGi syntax for the input version.
Takes a string which might be of the form "symbolic-name" or "symbolic-name:version" (or something else entirely)
and returns a VersionedName. The versionedName.getVersion() will be null if if there was no version in the input
(or returning Maybe.absent()
if not valid, with a suitable error message).
public static java.lang.String toOsgiVersion(java.lang.String version)
BrooklynVersionSyntax.toValidOsgiVersion(String)
;
but note it has slightly different semantics in some odd cases, e.g. this maps "1x" to "0.0.0.1x" whereas
the new method maps to "1.0.0.x"