stefanseifert commented on a change in pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-models-jacksonexporter/pull/4#discussion_r760926431



##########
File path: 
src/main/java/org/apache/sling/models/jacksonexporter/impl/ResourceModuleProvider.java
##########
@@ -16,38 +16,38 @@
  */
 package org.apache.sling.models.jacksonexporter.impl;
 
-import java.util.Map;
-
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.resource.Resource;
-import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.models.jacksonexporter.ModuleProvider;
-import org.osgi.framework.Constants;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.Designate;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 
 import com.fasterxml.jackson.databind.Module;
 import com.fasterxml.jackson.databind.module.SimpleModule;
 
-@Component(metatype = true, label = "Apache Sling Models Jackson Exporter - 
Resource object support",
-    description = "Provider of a Jackson Module which enables support for 
proper serialization of Resource objects")
-@Service
-@Property(name = Constants.SERVICE_RANKING, intValue = 0, propertyPrivate = 
true)
+@Component(service = ModuleProvider.class)
+@Designate(ocd = ResourceModuleProvider.Config.class)
 public class ResourceModuleProvider implements ModuleProvider {
 
     private static final int DEFAULT_MAX_RECURSION_LEVELS = -1;
 
-    @Property(label = "Maximum Recursion Levels",
-            description = "Maximum number of levels of child resources which 
will be exported for each resource. Specify -1 for infinite.",
-            intValue = DEFAULT_MAX_RECURSION_LEVELS)
-    private static final String PROP_MAX_RECURSION_LEVELS = 
"max.recursion.levels";
+    @ObjectClassDefinition(name = "Apache Sling Models Jackson Exporter - 
Resource object support",

Review comment:
       i cross-checked this - the PID is the same in the generated XML Files. 
it takes over the class name of the ResourceModuleProvider class. did you see 
something different?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to