SLING-11663 : avoid removing existing constructor but instead deprecate it
diff --git a/src/main/java/org/apache/sling/feature/cpconverter/accesscontrol/DefaultAclManager.java b/src/main/java/org/apache/sling/feature/cpconverter/accesscontrol/DefaultAclManager.java
index 862e638..b665085 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/accesscontrol/DefaultAclManager.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/accesscontrol/DefaultAclManager.java
@@ -96,10 +96,32 @@
private RepoPath userRootPath;
+ /**
+ * Same as {@code DefaultAclManager(null, "system", false)}
+ * @see ConverterConstants#SYSTEM_USER_REL_PATH_DEFAULT
+ */
public DefaultAclManager() {
this(null, ConverterConstants.SYSTEM_USER_REL_PATH_DEFAULT, false);
}
-
+
+ /**
+ * @param enforcePrincipalBasedSupportedPath The supported path if principal-based access control setup for service users should be enforced; {@code null} otherwise.
+ * @param systemRelPath The relative intermediate path used for all system users.
+ * @deprecated Use DefaultAclManager(String,String,boolean) instead
+ */
+ @Deprecated
+ public DefaultAclManager(@Nullable String enforcePrincipalBasedSupportedPath, @NotNull String systemRelPath) {
+ this(enforcePrincipalBasedSupportedPath, systemRelPath, false);
+ log.warn("Deprecated. Please refactor to use DefaultAclManager(String,String,boolean) instead");
+ }
+
+ /**
+ * Creates a new instance of {@code DefaultAclManager}.
+ *
+ * @param enforcePrincipalBasedSupportedPath The supported path if principal-based access control setup for service users should be enforced; {@code null} otherwise.
+ * @param systemRelPath The relative intermediate path used for all system users.
+ * @param alwaysForceSystemUserPath Option to make sure all system users are being created with the specified intermediate path (i.e. translating to 'with forced path' statements in repoinit).
+ */
public DefaultAclManager(@Nullable String enforcePrincipalBasedSupportedPath, @NotNull String systemRelPath, boolean alwaysForceSystemUserPath) {
if (enforcePrincipalBasedSupportedPath != null && !enforcePrincipalBasedSupportedPath.contains(systemRelPath)) {
throw new RuntimeException("Relative path for system users "+ systemRelPath + " not included in " + enforcePrincipalBasedSupportedPath);