From b957c9f6da7afea7dfadd2539894b7d2410c573a Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Mon, 07 Nov 2016 15:05:30 +0000
Subject: [PATCH] OPENDJ-3417 Add LocalBackendConfiguration and update all backend configurations

---
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NullBackendConfiguration.xml       |    6 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml       |    6 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml  |    4 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml     |    6 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml       |    5 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendConfiguration.xml      |   97 ++++++++++++++++++++++++
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml |    5 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml     |    6 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackendConfiguration.xml           |   37 ---------
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml    |    6 
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml     |    6 
 11 files changed, 124 insertions(+), 60 deletions(-)

diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackendConfiguration.xml
index ecdc690..02174c5 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackendConfiguration.xml
@@ -13,6 +13,7 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
+  Portions Copyright 2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="backend" plural-name="backends"
   package="org.forgerock.opendj.server.config"
@@ -29,7 +30,6 @@
     remotely in an external system, or generated on the fly
     (for example, calculated from other information that is available).
   </adm:description>
-  <adm:tag name="database" />
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-backend</ldap:name>
@@ -92,41 +92,6 @@
       </ldap:attribute>
     </adm:profile>
   </adm:property>
-  <adm:property name="writability-mode" mandatory="true">
-    <adm:synopsis>
-      Specifies the behavior that the backend should use when processing
-      write operations.
-    </adm:synopsis>
-    <adm:syntax>
-      <adm:enumeration>
-        <adm:value name="enabled">
-          <adm:synopsis>
-            Allows write operations to be performed in that backend (if
-            the requested operation is valid, the user has permission to
-            perform the operation, the backend supports that type of
-            write operation, and the global writability-mode property is
-            also enabled).
-          </adm:synopsis>
-        </adm:value>
-        <adm:value name="disabled">
-          <adm:synopsis>
-            Causes all write attempts to fail.
-          </adm:synopsis>
-        </adm:value>
-        <adm:value name="internal-only">
-          <adm:synopsis>
-            Causes external write attempts to fail but allows writes by
-            replication and internal operations.
-          </adm:synopsis>
-        </adm:value>
-      </adm:enumeration>
-    </adm:syntax>
-    <adm:profile name="ldap">
-      <ldap:attribute>
-        <ldap:name>ds-cfg-writability-mode</ldap:name>
-      </ldap:attribute>
-    </adm:profile>
-  </adm:property>
   <adm:property name="base-dn" mandatory="true" multi-valued="true">
     <adm:synopsis>
       Specifies the base DN(s) for the data that the backend handles.
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml
index c5f594a..7773929 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/BackupBackendConfiguration.xml
@@ -13,10 +13,10 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
-  Portions Copyright 2011 ForgeRock AS.
+  Portions Copyright 2011-2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="backup-backend" plural-name="backup-backends"
-  package="org.forgerock.opendj.server.config" extends="backend"
+  package="org.forgerock.opendj.server.config" extends="local-backend"
   advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
   <adm:synopsis>
@@ -32,7 +32,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-backup-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml
index a05ac21..b1d566a 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDIFBackendConfiguration.xml
@@ -13,9 +13,10 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
+  Portions Copyright 2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="ldif-backend" plural-name="ldif-backends"
-  package="org.forgerock.opendj.server.config" extends="backend"
+  package="org.forgerock.opendj.server.config" extends="local-backend"
   xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
   <adm:synopsis>
@@ -31,7 +32,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-ldif-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendConfiguration.xml
new file mode 100644
index 0000000..999bfd8
--- /dev/null
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LocalBackendConfiguration.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  The contents of this file are subject to the terms of the Common Development and
+  Distribution License (the License). You may not use this file except in compliance with the
+  License.
+
+  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+  specific language governing permission and limitations under the License.
+
+  When distributing Covered Software, include this CDDL Header Notice in each file and include
+  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+  Header, with the fields enclosed by brackets [] replaced by your own identifying
+  information: "Portions Copyright [year] [name of copyright owner]".
+
+  Copyright 2007-2008 Sun Microsystems, Inc.
+  Portions Copyright 2016 ForgeRock AS.
+  ! -->
+<adm:managed-object name="local-backend" plural-name="local-backends"
+  extends="backend" package="org.forgerock.opendj.server.config"
+  xmlns:adm="http://opendj.forgerock.org/admin"
+  xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
+  xmlns:cli="http://opendj.forgerock.org/admin-cli">
+  <adm:synopsis>
+    <adm:user-friendly-plural-name />
+    are responsible for providing access to the underlying data
+    presented by the server.
+  </adm:synopsis>
+  <adm:description>
+    The data may be stored locally in an embedded database,
+    remotely in an external system, or generated on the fly
+    (for example, calculated from other information that is available).
+  </adm:description>
+  <adm:tag name="database" />
+  <adm:profile name="ldap">
+    <ldap:object-class>
+      <ldap:name>ds-cfg-local-backend</ldap:name>
+      <ldap:superior>ds-cfg-backend</ldap:superior>
+    </ldap:object-class>
+  </adm:profile>
+  <adm:profile name="cli">
+    <cli:managed-object custom="true" />
+  </adm:profile>
+  <adm:property-override name="java-class" mandatory="true">
+    <adm:synopsis>
+      Specifies the fully-qualified name of the Java class that provides the
+      backend implementation.
+    </adm:synopsis>
+    <adm:requires-admin-action>
+      <adm:component-restart />
+    </adm:requires-admin-action>
+    <adm:syntax>
+      <adm:java-class>
+        <adm:instance-of>org.opends.server.api.LocalBackend</adm:instance-of>
+      </adm:java-class>
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-java-class</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property-override>
+  <adm:property name="writability-mode" mandatory="true">
+    <adm:synopsis>
+      Specifies the behavior that the backend should use when processing
+      write operations.
+    </adm:synopsis>
+    <adm:syntax>
+      <adm:enumeration>
+        <adm:value name="enabled">
+          <adm:synopsis>
+            Allows write operations to be performed in that backend (if
+            the requested operation is valid, the user has permission to
+            perform the operation, the backend supports that type of
+            write operation, and the global writability-mode property is
+            also enabled).
+          </adm:synopsis>
+        </adm:value>
+        <adm:value name="disabled">
+          <adm:synopsis>
+            Causes all write attempts to fail.
+          </adm:synopsis>
+        </adm:value>
+        <adm:value name="internal-only">
+          <adm:synopsis>
+            Causes external write attempts to fail but allows writes by
+            replication and internal operations.
+          </adm:synopsis>
+        </adm:value>
+      </adm:enumeration>
+    </adm:syntax>
+    <adm:profile name="ldap">
+      <ldap:attribute>
+        <ldap:name>ds-cfg-writability-mode</ldap:name>
+      </ldap:attribute>
+    </adm:profile>
+  </adm:property>
+</adm:managed-object>
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml
index 75ef05b..ea53dad 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MemoryBackendConfiguration.xml
@@ -13,10 +13,10 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
-  Portions Copyright 2011 ForgeRock AS.
+  Portions Copyright 2011-2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="memory-backend" plural-name="memory-backends"
-  package="org.forgerock.opendj.server.config" extends="backend"
+  package="org.forgerock.opendj.server.config" extends="local-backend"
   xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
   <adm:synopsis>
@@ -33,7 +33,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-memory-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml
index 90bfdef..678a015 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/MonitorBackendConfiguration.xml
@@ -13,11 +13,11 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
-  Portions Copyright 2011 ForgeRock AS.
+  Portions Copyright 2011-2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="monitor-backend"
   plural-name="monitor-backends" package="org.forgerock.opendj.server.config"
-  extends="backend" advanced="true"
+  extends="local-backend" advanced="true"
   xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
   <adm:synopsis>
@@ -29,7 +29,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-monitor-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NullBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NullBackendConfiguration.xml
index f7a49ed..e63cfc0 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NullBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/NullBackendConfiguration.xml
@@ -13,10 +13,10 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2009 Sun Microsystems, Inc.
-  Portions Copyright 2011 ForgeRock AS.
+  Portions Copyright 2011-2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="null-backend" plural-name="null-backends"
-  package="org.forgerock.opendj.server.config" advanced="true" extends="backend"
+  package="org.forgerock.opendj.server.config" advanced="true" extends="local-backend"
   xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
   <adm:synopsis>
@@ -44,7 +44,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-null-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml
index 466ab3e..9ceb3e4 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml
@@ -16,7 +16,7 @@
   ! -->
 <adm:managed-object abstract="true" name="pluggable-backend"
   plural-name="pluggable-backends" package="org.forgerock.opendj.server.config"
-  extends="backend" xmlns:adm="http://opendj.forgerock.org/admin"
+  extends="local-backend" xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap"
   xmlns:cli="http://opendj.forgerock.org/admin-cli">
   <adm:synopsis>
@@ -26,7 +26,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-pluggable-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:relation name="backend-index">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml
index f68e53a..0afb9cb 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/SchemaBackendConfiguration.xml
@@ -13,10 +13,10 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
-  Portions Copyright 2011 ForgeRock AS.
+  Portions Copyright 2011-2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="schema-backend" plural-name="schema-backends"
-  package="org.forgerock.opendj.server.config" extends="backend"
+  package="org.forgerock.opendj.server.config" extends="local-backend"
   advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
   <adm:synopsis>
@@ -38,7 +38,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-schema-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml
index ebbf567..90e9448 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TaskBackendConfiguration.xml
@@ -13,10 +13,10 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
-  Portions Copyright 2011 ForgeRock AS.
+  Portions Copyright 2011-2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="task-backend" plural-name="task-backends"
-  package="org.forgerock.opendj.server.config" extends="backend"
+  package="org.forgerock.opendj.server.config" extends="local-backend"
   advanced="true" xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
   <adm:synopsis>
@@ -38,7 +38,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-task-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml
index 7fc9523..8fe2a4d 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml
+++ b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/TrustStoreBackendConfiguration.xml
@@ -13,9 +13,10 @@
   information: "Portions Copyright [year] [name of copyright owner]".
 
   Copyright 2007-2008 Sun Microsystems, Inc.
+  Portions Copyright 2016 ForgeRock AS.
   ! -->
 <adm:managed-object name="trust-store-backend"
-  plural-name="trust-store-backends" extends="backend"
+  plural-name="trust-store-backends" extends="local-backend"
   package="org.forgerock.opendj.server.config" advanced="true"
   xmlns:adm="http://opendj.forgerock.org/admin"
   xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
@@ -28,7 +29,7 @@
   <adm:profile name="ldap">
     <ldap:object-class>
       <ldap:name>ds-cfg-trust-store-backend</ldap:name>
-      <ldap:superior>ds-cfg-backend</ldap:superior>
+      <ldap:superior>ds-cfg-local-backend</ldap:superior>
     </ldap:object-class>
   </adm:profile>
   <adm:property-override name="java-class" advanced="true">

--
Gitblit v1.10.0