You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2018/04/27 09:51:35 UTC

[sling-org-apache-sling-feature] 15/22: Support variables in converting from features to provisioning model

This is an automated email from the ASF dual-hosted git repository.

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature.git

commit f4e132a01e2853615397b885a354f270e4a2a1fb
Author: David Bosschaert <da...@gmail.com>
AuthorDate: Tue Mar 20 10:46:52 2018 +0000

    Support variables in converting from features to provisioning model
---
 src/main/java/org/apache/sling/feature/Application.java | 11 +++++++++++
 src/main/java/org/apache/sling/feature/ArtifactId.java  |  6 +++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/Application.java b/src/main/java/org/apache/sling/feature/Application.java
index 7ca58e4..53c3c75 100644
--- a/src/main/java/org/apache/sling/feature/Application.java
+++ b/src/main/java/org/apache/sling/feature/Application.java
@@ -31,6 +31,8 @@ import java.util.List;
  * </ul>
  */
 public class Application {
+    /** The variables of this application. */
+    private final KeyValueMap variables = new KeyValueMap();
 
     /** Container for bundles. */
     private final Bundles bundles = new Bundles();
@@ -109,6 +111,15 @@ public class Application {
         this.framework = framework;
     }
 
+    /**
+     * Get the variables
+     * The map is modifiable
+     * @return The map of variables
+     */
+    public KeyValueMap getVariables() {
+        return this.variables;
+    }
+
     @Override
     public String toString() {
         return "Application [features=" + this.features
diff --git a/src/main/java/org/apache/sling/feature/ArtifactId.java b/src/main/java/org/apache/sling/feature/ArtifactId.java
index 9eca7a9..60860de 100644
--- a/src/main/java/org/apache/sling/feature/ArtifactId.java
+++ b/src/main/java/org/apache/sling/feature/ArtifactId.java
@@ -16,12 +16,12 @@
  */
 package org.apache.sling.feature;
 
+import org.osgi.framework.Version;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.osgi.framework.Version;
-
 /**
  * An artifact identifier.
  *
@@ -67,7 +67,7 @@ public class ArtifactId implements Comparable<ArtifactId> {
         this.groupId = groupId;
         this.artifactId = artifactId;
         this.version = version;
-        this.getOSGiVersion();
+
         if ( "bundle".equals(type) || type == null || type.isEmpty() ) {
             this.type = "jar";
         } else {

-- 
To stop receiving notification emails like this one, please contact
davidb@apache.org.