directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 54239 - incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config
Date Sun, 10 Oct 2004 11:36:17 GMT
Author: akarasulu
Date: Sun Oct 10 04:36:16 2004
New Revision: 54239

Added:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractConfigSet.java
  (contents, props changed)
Modified:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ConfigSet.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java
Log:
Commit changes ...

 o added abstract config set
 o renamed getDependentSchemas to getDependencies to be accurate
 o corrected interface method name changes 

Notes ...

 o there is no need to have each schema object factory implementing the 
   config set interface
 o the config set interface is more an interface for logical schema
   groups or configurations specifically tailored for bootstrapping although
   not limited to it
 o we should change its name to reflect this and make it so it can resolve
   the bootstrap entity factories for the schema in question
 o also note that the abstract base can store various structures to help
   resolve OIDs from names
 o the abstract base should contain protected utility methods making code
   generation a breeze
 o like wise abstract schema object factories should contain utility methods 
   to make it easier to generate the code



Added: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractConfigSet.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/AbstractConfigSet.java
Sun Oct 10 04:36:16 2004
@@ -0,0 +1,89 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve.schema.config;
+
+import org.apache.ldap.common.util.ArrayUtils;
+
+/**
+ * Document me.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class AbstractConfigSet implements ConfigSet
+{
+    private static final String DEFAULT_OWNER = "uid=admin,ou=system";
+    private static final String DEFAULT_SCHEMA_NAME = "default";
+
+    private final String owner;
+    private final String schemaName;
+    private final String[] dependencies;
+
+
+    // ------------------------------------------------------------------------
+    // C O N S T R U C T O R S
+    // ------------------------------------------------------------------------
+
+
+    public AbstractConfigSet( String owner, String schemaName, String[] dependencies )
+    {
+        if ( owner == null )
+        {
+            this.owner = DEFAULT_OWNER;
+        }
+        else
+        {
+            this.owner = owner;
+        }
+
+        if ( schemaName == null )
+        {
+            this.schemaName = DEFAULT_SCHEMA_NAME;
+        }
+        else
+        {
+            this.schemaName = schemaName;
+        }
+
+        if ( dependencies == null )
+        {
+            this.dependencies = ArrayUtils.EMPTY_STRING_ARRAY;
+        }
+        else
+        {
+            this.dependencies = dependencies;
+        }
+    }
+
+
+    public String getOwner()
+    {
+        return owner;
+    }
+
+
+    public String getSchemaName()
+    {
+        return schemaName;
+    }
+
+
+    public String[] getDependencies()
+    {
+        return new String[0];
+    }
+}

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ConfigSet.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ConfigSet.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/ConfigSet.java
Sun Oct 10 04:36:16 2004
@@ -49,5 +49,5 @@
      *
      * @return the String names of schema dependencies
      */
-    String[] getDependentSchemas();
+    String[] getDependencies();
 }

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxes.java
Sun Oct 10 04:36:16 2004
@@ -121,7 +121,7 @@
     }
 
 
-    public String[] getDependentSchemas()
+    public String[] getDependencies()
     {
         return EMPTY_ARRAY;
     }

Mime
View raw message