This is an automated email from the ASF dual-hosted git repository.
baedke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 3efe9f7e84 OAK-6773: Convert oak-store-composite to OSGi R7
annotations (#1423)
3efe9f7e84 is described below
commit 3efe9f7e84d9d16e01e03e79e7e757315c76e895
Author: mbaedke <[email protected]>
AuthorDate: Mon Apr 29 13:34:32 2024 +0200
OAK-6773: Convert oak-store-composite to OSGi R7 annotations (#1423)
* OAK-6773: Convert oak-store-composite to OSGi R7 annotations
done
---
oak-store-composite/pom.xml | 9 ++-
.../oak/composite/CompositeNodeStoreService.java | 67 ++++++++++++----------
.../CrossMountReferenceValidatorProvider.java | 42 +++++++-------
.../composite/PrivateStoreValidatorProvider.java | 29 ++++++----
.../checks/NamespacePrefixNodestoreChecker.java | 6 +-
.../composite/checks/NodeStoreChecksService.java | 14 ++---
.../checks/NodeTypeDefinitionNodeStoreChecker.java | 6 +-
.../checks/NodeTypeMountedNodeStoreChecker.java | 47 ++++++++-------
.../checks/UniqueIndexNodeStoreChecker.java | 6 +-
.../oak/composite/checks/package-info.java | 4 ++
.../jackrabbit/oak/composite/package-info.java | 2 +-
.../NodeTypeDefinitionNodeStoreCheckerTest.java | 6 +-
12 files changed, 128 insertions(+), 110 deletions(-)
diff --git a/oak-store-composite/pom.xml b/oak-store-composite/pom.xml
index b62d5c81eb..96c909700b 100644
--- a/oak-store-composite/pom.xml
+++ b/oak-store-composite/pom.xml
@@ -93,8 +93,13 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr.annotations</artifactId>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.component.annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.metatype.annotations</artifactId>
<scope>provided</scope>
</dependency>
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CompositeNodeStoreService.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CompositeNodeStoreService.java
index b3fe33f225..bbebbb7150 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CompositeNodeStoreService.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CompositeNodeStoreService.java
@@ -17,14 +17,15 @@
package org.apache.jackrabbit.oak.composite;
import org.apache.jackrabbit.guava.common.io.Closer;
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.ConfigurationPolicy;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ComponentPropertyType;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.osgi.service.component.annotations.ReferencePolicy;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.api.jmx.CheckpointMBean;
import org.apache.jackrabbit.oak.commons.PropertiesUtil;
@@ -57,7 +58,7 @@ import java.util.Set;
import static
org.apache.jackrabbit.guava.common.collect.Sets.newIdentityHashSet;
import static java.util.stream.Collectors.toSet;
-@Component(policy = ConfigurationPolicy.REQUIRE)
+@Component(configurationPolicy = ConfigurationPolicy.REQUIRE)
public class CompositeNodeStoreService {
private static final Logger LOG =
LoggerFactory.getLogger(CompositeNodeStoreService.class);
@@ -66,10 +67,9 @@ public class CompositeNodeStoreService {
private static final String MOUNT_ROLE_PREFIX = "composite-mount-";
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY, policy =
ReferencePolicy.STATIC)
+ @Reference(cardinality = ReferenceCardinality.MANDATORY, policy =
ReferencePolicy.STATIC)
private MountInfoProvider mountInfoProvider;
- @Reference(cardinality = ReferenceCardinality.MANDATORY_MULTIPLE, policy =
ReferencePolicy.DYNAMIC, bind = "bindNodeStore", unbind = "unbindNodeStore",
referenceInterface = NodeStoreProvider.class,
target="(!(service.pid=org.apache.jackrabbit.oak.composite.CompositeNodeStore))")
private List<NodeStoreWithProps> nodeStores = new ArrayList<>();
@Reference
@@ -78,22 +78,26 @@ public class CompositeNodeStoreService {
@Reference
private StatisticsProvider statisticsProvider = StatisticsProvider.NOOP;
- @Property(label = "Enable node store checks",
- description = "Whether the composite node store constraints should
be checked before start",
- boolValue = true
- )
- private static final String ENABLE_CHECKS = "enableChecks";
-
- @Property(label = "Pre-populate seed mount",
- description = "Setting this parameter to a mount name will enable
pre-populating the empty default store"
- )
- private static final String PROP_SEED_MOUNT = "seedMount";
-
- @Property(label = "Gather path statistics",
- description = "Whether the CompositeNodeStoreStatsMBean should
gather information about the most popular paths (may be expensive)",
- boolValue = false
- )
- private static final String PATH_STATS = "pathStats";
+ @ComponentPropertyType
+ @interface Config {
+ @AttributeDefinition(
+ name = "Enable node store checks",
+ description = "Whether the composite node store constraints
should be checked before start"
+ )
+ boolean enableChecks() default true;
+
+ @AttributeDefinition(
+ name = "Pre-populate seed mount",
+ description = "Setting this parameter to a mount name will
enable pre-populating the empty default store"
+ )
+ String seedMount();
+
+ @AttributeDefinition(
+ name = "Gather path statistics",
+ description = "Whether the CompositeNodeStoreStatsMBean should
gather information about the most popular paths (may be expensive)"
+ )
+ boolean pathStats() default false;
+ }
private ComponentContext context;
@@ -112,11 +116,11 @@ public class CompositeNodeStoreService {
private boolean enableChecks;
@Activate
- protected void activate(ComponentContext context, Map<String, ?> config)
throws IOException, CommitFailedException {
+ protected void activate(ComponentContext context, Config config) throws
IOException, CommitFailedException {
this.context = context;
- seedMount = PropertiesUtil.toString(config.get(PROP_SEED_MOUNT), null);
- pathStats = PropertiesUtil.toBoolean(config.get(PATH_STATS), false);
- enableChecks = PropertiesUtil.toBoolean(config.get(ENABLE_CHECKS),
true);
+ seedMount = config.seedMount();
+ pathStats = config.pathStats();
+ enableChecks = config.enableChecks();
registerCompositeNodeStore();
}
@@ -260,6 +264,7 @@ public class CompositeNodeStoreService {
}
@SuppressWarnings("unused")
+ @Reference(name = "nodeStores", cardinality =
ReferenceCardinality.AT_LEAST_ONE, policy = ReferencePolicy.DYNAMIC, service =
NodeStoreProvider.class,
target="(!(service.pid=org.apache.jackrabbit.oak.composite.CompositeNodeStore))")
protected void bindNodeStore(NodeStoreProvider ns, Map<String, ?> config)
throws IOException, CommitFailedException {
NodeStoreWithProps newNs = new NodeStoreWithProps(ns, config);
nodeStores.add(newNs);
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CrossMountReferenceValidatorProvider.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CrossMountReferenceValidatorProvider.java
index 935fa0edc5..8cb5157726 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CrossMountReferenceValidatorProvider.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/CrossMountReferenceValidatorProvider.java
@@ -16,13 +16,12 @@
*/
package org.apache.jackrabbit.oak.composite;
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.ConfigurationPolicy;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.jackrabbit.oak.commons.PropertiesUtil;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ComponentPropertyType;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
import org.apache.jackrabbit.oak.spi.commit.EditorProvider;
import org.apache.jackrabbit.oak.spi.commit.Validator;
@@ -30,24 +29,25 @@ import
org.apache.jackrabbit.oak.spi.commit.ValidatorProvider;
import org.apache.jackrabbit.oak.spi.mount.MountInfoProvider;
import org.apache.jackrabbit.oak.spi.mount.Mounts;
import org.apache.jackrabbit.oak.spi.state.NodeState;
-import org.osgi.framework.BundleContext;
-
-import java.util.Map;
/**
* {@link Validator} which detects references crossing the mount boundaries
*/
-@Component(label = "Apache Jackrabbit Oak
CrossMountReferenceValidatorProvider", policy = ConfigurationPolicy.REQUIRE)
-@Property(name = "type", value = "crossMountRefValidator", propertyPrivate =
true)
-@Service({ValidatorProvider.class, EditorProvider.class})
+@Component(configurationPolicy = ConfigurationPolicy.REQUIRE, service =
{ValidatorProvider.class, EditorProvider.class})
public class CrossMountReferenceValidatorProvider extends ValidatorProvider {
- @Property(
- boolValue = true,
- label = "Fail when detecting commits cross-mount references",
- description = "Commits will fail if set to true when detecting
cross-mount references. If set to false the commit information is only logged."
- )
- private static final String PROP_FAIL_ON_DETECTION = "failOnDetection";
+ @ComponentPropertyType
+ @interface Config {
+ @AttributeDefinition
+ String type() default "crossMountRefValidator";
+
+ @AttributeDefinition(
+ name = "Fail when detecting commits cross-mount references",
+ description = "Commits will fail if set to true when detecting
cross-mount references. If set to false the commit information is only logged."
+ )
+ boolean failOnDetection() default true;
+ }
+
private boolean failOnDetection;
@Reference
@@ -62,8 +62,8 @@ public class CrossMountReferenceValidatorProvider extends
ValidatorProvider {
}
@Activate
- private void activate(BundleContext bundleContext, Map<String, ?> config) {
- failOnDetection =
PropertiesUtil.toBoolean(config.get(PROP_FAIL_ON_DETECTION), false);
+ private void activate(Config config) {
+ failOnDetection = config.failOnDetection();
}
@Override
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/PrivateStoreValidatorProvider.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/PrivateStoreValidatorProvider.java
index 530def5a08..9a8eb93dc3 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/PrivateStoreValidatorProvider.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/PrivateStoreValidatorProvider.java
@@ -17,10 +17,14 @@
package org.apache.jackrabbit.oak.composite;
-import org.apache.felix.scr.annotations.*;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ComponentPropertyType;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.commons.PathUtils;
-import org.apache.jackrabbit.oak.commons.PropertiesUtil;
import org.apache.jackrabbit.oak.spi.commit.*;
import org.apache.jackrabbit.oak.spi.mount.Mount;
import org.apache.jackrabbit.oak.spi.mount.MountInfoProvider;
@@ -36,17 +40,20 @@ import java.util.Map;
/**
* {@link Validator} which detects change commits to the read only mounts.
*/
-@Component(label = "Apache Jackrabbit Oak PrivateStoreValidatorProvider")
+@Component
public class PrivateStoreValidatorProvider extends ValidatorProvider {
private final Logger logger = LoggerFactory.getLogger(getClass());
private static final String ROOT_PATH = "/";
- @Property(
- boolValue = true,
- label = "Fail when detecting commits to the read-only stores",
- description = "Commits will fail if set to true when detecting changes
to any read-only store. If set to false the commit information is only logged."
- )
- private static final String PROP_FAIL_ON_DETECTION = "failOnDetection";
+ @ComponentPropertyType
+ @interface Config {
+ @AttributeDefinition(
+ name = "Fail when detecting commits to the read-only stores",
+ description = "Commits will fail if set to true when detecting
changes to any read-only store. If set to false the commit information is only
logged."
+ )
+ boolean failOnDetection() default true;
+ }
+
private boolean failOnDetection;
@Reference
@@ -60,8 +67,8 @@ public class PrivateStoreValidatorProvider extends
ValidatorProvider {
}
@Activate
- private void activate(BundleContext bundleContext, Map<String, ?> config) {
- failOnDetection =
PropertiesUtil.toBoolean(config.get(PROP_FAIL_ON_DETECTION), true);
+ private void activate(BundleContext bundleContext, Config config) {
+ failOnDetection = config.failOnDetection();
if (mountInfoProvider.hasNonDefaultMounts()) {
serviceRegistration =
bundleContext.registerService(EditorProvider.class.getName(), this, null);
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NamespacePrefixNodestoreChecker.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NamespacePrefixNodestoreChecker.java
index 4095c7ccaa..865022f291 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NamespacePrefixNodestoreChecker.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NamespacePrefixNodestoreChecker.java
@@ -18,8 +18,7 @@ package org.apache.jackrabbit.oak.composite.checks;
import java.util.Set;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.annotations.Component;
import org.apache.jackrabbit.oak.api.PropertyState;
import org.apache.jackrabbit.oak.api.Root;
import org.apache.jackrabbit.oak.api.Tree;
@@ -32,8 +31,7 @@ import org.apache.jackrabbit.oak.spi.state.NodeStore;
import org.apache.jackrabbit.guava.common.collect.Sets;
-@Component
-@Service(MountedNodeStoreChecker.class)
+@Component(service={MountedNodeStoreChecker.class})
public class NamespacePrefixNodestoreChecker implements
MountedNodeStoreChecker<NamespacePrefixNodestoreChecker.Context> {
@Override
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeStoreChecksService.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeStoreChecksService.java
index c1f3fbb454..8e8dba9d75 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeStoreChecksService.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeStoreChecksService.java
@@ -19,10 +19,9 @@ package org.apache.jackrabbit.oak.composite.checks;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
import org.apache.jackrabbit.oak.api.Tree;
import org.apache.jackrabbit.oak.composite.MountedNodeStore;
import org.apache.jackrabbit.oak.plugins.tree.factories.TreeFactory;
@@ -32,16 +31,15 @@ import org.apache.jackrabbit.oak.spi.state.NodeStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Component
-@Service(NodeStoreChecks.class)
+@Component(service = {NodeStoreChecks.class})
public class NodeStoreChecksService implements NodeStoreChecks {
private final Logger log = LoggerFactory.getLogger(getClass());
- @Reference(cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE,
+ @Reference(cardinality = ReferenceCardinality.MULTIPLE,
bind = "bindChecker",
unbind = "unbindChecker",
- referenceInterface = MountedNodeStoreChecker.class)
+ service = MountedNodeStoreChecker.class)
private List<MountedNodeStoreChecker<?>> checkers = new
CopyOnWriteArrayList<>();
@Reference
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java
index 5df639fb67..76c68e7419 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java
@@ -26,8 +26,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.annotations.Component;
import org.apache.jackrabbit.JcrConstants;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.api.Tree;
@@ -48,8 +47,7 @@ import org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder;
/**
* Checks that nodes present in a mount are consistent with the global node
type definitions
*/
-@Component
-@Service(MountedNodeStoreChecker.class)
+@Component(service = {MountedNodeStoreChecker.class})
public class NodeTypeDefinitionNodeStoreChecker implements
MountedNodeStoreChecker<NodeTypeDefinitionNodeStoreChecker.Context> {
@Override
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeMountedNodeStoreChecker.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeMountedNodeStoreChecker.java
index 7a2c6dfedd..3375eab708 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeMountedNodeStoreChecker.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeMountedNodeStoreChecker.java
@@ -20,13 +20,12 @@ import static
org.apache.jackrabbit.guava.common.base.Preconditions.checkNotNull
import java.util.Set;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.ConfigurationPolicy;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ComponentPropertyType;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.apache.jackrabbit.oak.api.Root;
import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.commons.PropertiesUtil;
import org.apache.jackrabbit.oak.composite.MountedNodeStore;
import org.apache.jackrabbit.oak.namepath.NamePathMapper;
import org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager;
@@ -39,23 +38,31 @@ import org.slf4j.LoggerFactory;
import org.apache.jackrabbit.guava.common.collect.ImmutableSet;
-@Component(configurationFactory=true,
- policy = ConfigurationPolicy.REQUIRE)
-@Service(MountedNodeStoreChecker.class)
+@Component(configurationPolicy = ConfigurationPolicy.REQUIRE, service =
{MountedNodeStoreChecker.class})
public class NodeTypeMountedNodeStoreChecker implements
MountedNodeStoreChecker<NodeTypeMountedNodeStoreChecker.Context> {
private final Logger log = LoggerFactory.getLogger(getClass());
- @Property(label = "The name of a node type that is invalid and will be
rejected when found")
- private static final String INVALID_NODE_TYPE = "invalidNodeType";
- @Property(label = "The error label to use when rejecting an invalid node
type")
- private static final String ERROR_LABEL = "errorLabel";
+ @ComponentPropertyType
+ @interface Config {
+ @AttributeDefinition(
+ name = "The name of a node type that is invalid and will be
rejected when found"
+ )
+ String invalidNodeType();
+
+ @AttributeDefinition(
+ name = "The error label to use when rejecting an invalid node
type"
+ )
+ String errorLabel();
+
+ @AttributeDefinition(
+ name = "Node types that will cause the check to succeeed, even
in the invalid node type is also found.",
+ cardinality = Integer.MAX_VALUE
+ )
+ String[] excludedNodeTypes() default {};
+ }
- @Property(label="Node types that will cause the check to succeeed, even in
the invalid node type is also found.",
- cardinality = Integer.MAX_VALUE)
- private static final String EXCLUDED_NODE_TYPES = "excludedNodeTypes";
-
private String invalidNodeType;
private String errorLabel;
private Set<String> excludedNodeTypes;
@@ -72,10 +79,10 @@ public class NodeTypeMountedNodeStoreChecker implements
this.excludedNodeTypes = ImmutableSet.copyOf(excludedNodeTypes);
}
- protected void activate(ComponentContext ctx) {
- invalidNodeType =
checkNotNull(PropertiesUtil.toString(ctx.getProperties().get(INVALID_NODE_TYPE),
null), INVALID_NODE_TYPE);
- errorLabel =
checkNotNull(PropertiesUtil.toString(ctx.getProperties().get(ERROR_LABEL),
null), ERROR_LABEL);
- excludedNodeTypes =
ImmutableSet.copyOf(PropertiesUtil.toStringArray(ctx.getProperties().get(EXCLUDED_NODE_TYPES),
new String[0]));
+ protected void activate(ComponentContext ctx, Config config) {
+ invalidNodeType = checkNotNull(config.invalidNodeType(),
"invalidNodeType");
+ errorLabel = checkNotNull(config.errorLabel(), "errorLabel");
+ excludedNodeTypes = ImmutableSet.copyOf(config.excludedNodeTypes());
}
@Override
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/UniqueIndexNodeStoreChecker.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/UniqueIndexNodeStoreChecker.java
index 98078c3388..7f4621cc4e 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/UniqueIndexNodeStoreChecker.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/UniqueIndexNodeStoreChecker.java
@@ -33,8 +33,7 @@ import java.util.Optional;
import java.util.Set;
import java.util.TreeSet;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.annotations.Component;
import org.apache.jackrabbit.oak.api.Tree;
import org.apache.jackrabbit.oak.composite.MountedNodeStore;
import org.apache.jackrabbit.oak.plugins.index.property.Multiplexers;
@@ -62,8 +61,7 @@ import org.apache.jackrabbit.guava.common.collect.Maps;
* on first access and skips all subsequent executions.</p>
*
*/
-@Component
-@Service(MountedNodeStoreChecker.class)
+@Component(service = {MountedNodeStoreChecker.class})
public class UniqueIndexNodeStoreChecker implements
MountedNodeStoreChecker<UniqueIndexNodeStoreChecker.Context> {
private static final Logger LOG =
LoggerFactory.getLogger(UniqueIndexNodeStoreChecker.class);
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/package-info.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/package-info.java
new file mode 100755
index 0000000000..8dfb422328
--- /dev/null
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/package-info.java
@@ -0,0 +1,4 @@
+@Version("1.0.0")
+package org.apache.jackrabbit.oak.composite.checks;
+
+import org.osgi.annotation.versioning.Version;
\ No newline at end of file
diff --git
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/package-info.java
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/package-info.java
index 9599d669c2..bac267ef1b 100644
---
a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/package-info.java
+++
b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/package-info.java
@@ -55,7 +55,7 @@
* This is obviously correct but may be slow.
* {@link
org.apache.jackrabbit.oak.composite.CompositionContext#getContributingStores(java.lang.String,
java.util.function.Function)}
*/
-@Version("0.5.0")
+@Version("1.0.0")
package org.apache.jackrabbit.oak.composite;
import org.osgi.annotation.versioning.Version;
\ No newline at end of file
diff --git
a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreCheckerTest.java
b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreCheckerTest.java
index d710610c2c..64489a3a4b 100644
---
a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreCheckerTest.java
+++
b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreCheckerTest.java
@@ -20,8 +20,7 @@ import static
org.apache.jackrabbit.oak.InitialContentHelper.INITIAL_CONTENT;
import java.io.IOException;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.annotations.Component;
import org.apache.jackrabbit.JcrConstants;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.api.IllegalRepositoryStateException;
@@ -45,8 +44,7 @@ import org.junit.Test;
* that they are performed when needed.</p>
*
*/
-@Component
-@Service(MountedNodeStoreChecker.class)
+@Component(service = {MountedNodeStoreChecker.class})
public class NodeTypeDefinitionNodeStoreCheckerTest {
@Test