felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlean...@apache.org
Subject svn commit: r1811906 - in /felix/trunk/converter: converter/ persister/ schematizer/ serializer/ serializer/src/main/java/org/apache/felix/serializer/ serializer/src/main/java/org/apache/felix/serializer/impl/json/ serializer/src/main/java/org/apache/f...
Date Thu, 12 Oct 2017 00:49:41 GMT
Author: dleangen
Date: Thu Oct 12 00:49:41 2017
New Revision: 1811906

URL: http://svn.apache.org/viewvc?rev=1811906&view=rev
Log:
[CONVERTER] Added orderMap method to WriterFactory in Serializer and bumped version to 0.2.0-SNAPSHOT

Modified:
    felix/trunk/converter/converter/pom.xml
    felix/trunk/converter/persister/pom.xml
    felix/trunk/converter/schematizer/pom.xml
    felix/trunk/converter/serializer/pom.xml
    felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/WriterFactory.java
    felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonWriterFactory.java
    felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlWriterFactory.java

Modified: felix/trunk/converter/converter/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/pom.xml?rev=1811906&r1=1811905&r2=1811906&view=diff
==============================================================================
--- felix/trunk/converter/converter/pom.xml (original)
+++ felix/trunk/converter/converter/pom.xml Thu Oct 12 00:49:41 2017
@@ -28,7 +28,7 @@
 
     <name>Apache Felix Converter</name>
     <artifactId>org.apache.felix.converter</artifactId>
-    <version>0.1.0-SNAPSHOT</version>
+    <version>0.2.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <scm>
@@ -90,7 +90,6 @@
                             org.osgi.util.converter,
                             *
                         </Import-Package>
-                        <!--Include-Resource>{maven-resources},OSGI-OPT/src=src/main/java</Include-Resource-->
                         <_sources>true</_sources>
                     </instructions>
                 </configuration>

Modified: felix/trunk/converter/persister/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/converter/persister/pom.xml?rev=1811906&r1=1811905&r2=1811906&view=diff
==============================================================================
--- felix/trunk/converter/persister/pom.xml (original)
+++ felix/trunk/converter/persister/pom.xml Thu Oct 12 00:49:41 2017
@@ -28,7 +28,7 @@
 
     <name>Apache Felix Persister Service</name>
     <artifactId>org.apache.felix.persister</artifactId>
-    <version>0.1.0-SNAPSHOT</version>
+    <version>0.2.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <scm>

Modified: felix/trunk/converter/schematizer/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/pom.xml?rev=1811906&r1=1811905&r2=1811906&view=diff
==============================================================================
--- felix/trunk/converter/schematizer/pom.xml (original)
+++ felix/trunk/converter/schematizer/pom.xml Thu Oct 12 00:49:41 2017
@@ -28,7 +28,7 @@
 
     <name>Apache Felix Schematizer Service</name>
     <artifactId>org.apache.felix.schematizer</artifactId>
-    <version>0.1.0-SNAPSHOT</version>
+    <version>0.2.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <scm>
@@ -85,10 +85,6 @@
                             osgi.service;objectClass:List&lt;String&gt;="org.apache.felix.schematizer.Schematizer,org.apache.felix.serializer.Serializer";
                             uses:="org.apache.felix.schematizer,org.apache.serializer,org.osgi.util.converter,org.osgi.util.function"
                         </Provide-Capability>
-                        <Require-Capability>
-                            osgi.service;objectClass:List&lt;String&gt;="org.osgi.util.converter.Converter";
-                            effective:="active"
-                        </Require-Capability>
                         <_sources>true</_sources>
                     </instructions>
                 </configuration>

Modified: felix/trunk/converter/serializer/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/converter/serializer/pom.xml?rev=1811906&r1=1811905&r2=1811906&view=diff
==============================================================================
--- felix/trunk/converter/serializer/pom.xml (original)
+++ felix/trunk/converter/serializer/pom.xml Thu Oct 12 00:49:41 2017
@@ -28,7 +28,7 @@
 
     <name>Apache Felix Serializer Services</name>
     <artifactId>org.apache.felix.serializer</artifactId>
-    <version>0.1.0-SNAPSHOT</version>
+    <version>0.2.0-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <scm>
@@ -84,10 +84,6 @@
                             	org.apache.felix.serializer.WriterFactory$YamlWriterFactory";
                             uses:="org.apache.felix.serializer,org.osgi.util.converter,org.osgi.util.function"
                         </Provide-Capability>
-                        <Require-Capability>
-                            osgi.service;objectClass:List&lt;String&gt;="org.osgi.util.converter.Converter";
-                            effective:="active"
-                        </Require-Capability>
                         <_sources>true</_sources>
                     </instructions>
                 </configuration>

Modified: felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/WriterFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/WriterFactory.java?rev=1811906&r1=1811905&r2=1811906&view=diff
==============================================================================
--- felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/WriterFactory.java
(original)
+++ felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/WriterFactory.java
Thu Oct 12 00:49:41 2017
@@ -17,6 +17,7 @@ package org.apache.felix.serializer;
 
 import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
 
 import org.osgi.annotation.versioning.ProviderType;
 import org.osgi.util.converter.Converter;
@@ -62,6 +63,23 @@ public interface WriterFactory {
     WriterFactory orderMap(String path, List<String> keyOrder);
 
     /**
+     * Register multiple ordering rules for this writer.
+     * 
+     * An ordering rule causes the written json to be output in the order
+     * specified. This can be useful, for example, for debugging or when
+     * the data otherwise needs to be human consumable.
+     * 
+     * This rule only affects map-type objects located at the given path.
+     * 
+     * Each map entry is a path/keyOrder pair, the same as if calling
+     * WriterFactory.orderMap(String,List<String>).
+     *
+     * @param orderingRules the rules to be added
+     * @return This factory object to allow further invocations on it.
+     */
+    WriterFactory orderMap( Map<String, List<String>> orderingRules );
+
+    /**
      * Register an ordering rule for this writer.
      * 
      * An ordering rule causes the written json to be output in the order

Modified: felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonWriterFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonWriterFactory.java?rev=1811906&r1=1811905&r2=1811906&view=diff
==============================================================================
--- felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonWriterFactory.java
(original)
+++ felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonWriterFactory.java
Thu Oct 12 00:49:41 2017
@@ -36,6 +36,12 @@ public class JsonWriterFactory implement
     }
 
     @Override
+    public WriterFactory orderMap(Map<String, List<String>> orderingRules) {
+        mapOrderingRules.putAll(orderingRules);
+        return this;
+    }
+
+    @Override
     public WriterFactory orderArray(String path) {
         arrayOrderingRules.put(path, null);
         return this;

Modified: felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlWriterFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlWriterFactory.java?rev=1811906&r1=1811905&r2=1811906&view=diff
==============================================================================
--- felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlWriterFactory.java
(original)
+++ felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlWriterFactory.java
Thu Oct 12 00:49:41 2017
@@ -35,6 +35,12 @@ public class YamlWriterFactory implement
     }
 
     @Override
+    public WriterFactory orderMap(Map<String, List<String>> rules) {
+        orderingRules.putAll(rules);
+        return this;
+    }
+
+    @Override
     public WriterFactory orderArray(String path) {
         return this;
     }



Mime
View raw message