karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [1/2] karaf git commit: [KARAF-5300] Add documentation [Forced Update!]
Date Thu, 10 Aug 2017 09:25:06 GMT
Repository: karaf
Updated Branches:
  refs/heads/model_features a2c37735a -> e23d7bd69 (forced update)


[KARAF-5300] Add documentation


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/be4a73b8
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/be4a73b8
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/be4a73b8

Branch: refs/heads/model_features
Commit: be4a73b8e7c3815c7b4923e723ca1c53575085df
Parents: 54dac91
Author: Christian Schneider <chris@die-schneider.net>
Authored: Thu Aug 10 10:33:22 2017 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Thu Aug 10 11:24:40 2017 +0200

----------------------------------------------------------------------
 .../karaf/features/internal/service/FeatureReq.java   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/be4a73b8/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureReq.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureReq.java
b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureReq.java
index 2e1f652..1bac816 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureReq.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureReq.java
@@ -22,6 +22,15 @@ import org.osgi.framework.VersionRange;
 
 /**
  * Requirement for a feature
+ * 
+ * <p>The syntax of a requirement as a String is name[/versionRange].
+ * If no versionRange is given then a range of [0,) is assumeed which matches all versions.
+ * 
+ * <p>
+ * - name: Can be a feature name or a glob like myfeat*
+ * - versionRange: version or range
+ * - version: Will specify a specific version. Like [version,version]. An exemption is 0.0.0
which matches all versions.
+ * - range: Like defined in OSGi VersionRange. Example: [1.0.0, 1.1.0)  
  */
 public class FeatureReq {
     public static final String VERSION_SEPARATOR = "/";
@@ -57,7 +66,10 @@ public class FeatureReq {
     }
 
     private static VersionRange exactVersion(String versionRange) {
-        return new VersionRange(VersionRange.LEFT_CLOSED, new Version(versionRange), new
Version(versionRange), VersionRange.RIGHT_CLOSED);
+        return new VersionRange(VersionRange.LEFT_CLOSED, 
+                                new Version(versionRange), 
+                                new Version(versionRange), 
+                                VersionRange.RIGHT_CLOSED);
     }
 
     public FeatureReq(String name, VersionRange versionRange) {


Mime
View raw message