You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/12/12 02:51:40 UTC
svn commit: r485977 - in /directory/branches/trunks/schema/apacheds:
bootstrap-partition/
bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/
core/src/main/java/org/apache/directory/server/core/schema/bootstrap/
core/src/m...
Author: akarasulu
Date: Mon Dec 11 17:51:39 2006
New Revision: 485977
URL: http://svn.apache.org/viewvc?view=rev&rev=485977
Log:
got plugin ready to start generating partition jar
Added:
directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/MojoDSConfig.java
Modified:
directory/branches/trunks/schema/apacheds/bootstrap-partition/pom.xml
directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
directory/branches/trunks/schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApachemetaMatchingRuleProducer.java
directory/branches/trunks/schema/apacheds/core/src/main/schema/apachemeta.schema
Modified: directory/branches/trunks/schema/apacheds/bootstrap-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/trunks/schema/apacheds/bootstrap-partition/pom.xml?view=diff&rev=485977&r1=485976&r2=485977
==============================================================================
--- directory/branches/trunks/schema/apacheds/bootstrap-partition/pom.xml (original)
+++ directory/branches/trunks/schema/apacheds/bootstrap-partition/pom.xml Mon Dec 11 17:51:39 2006
@@ -39,7 +39,43 @@
<artifactId>apacheds-bootstrap-plugin</artifactId>
<configuration>
<bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.ApachednsSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.AutofsSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.CollectiveSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.CorbaSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.CosineSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.DhcpSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.JavaSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.MiscSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.MozillaSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
<bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.NisSchema</bootstrapSchemaClass>
+ </bootstrapSchemaClasses>
+ <bootstrapSchemaClasses>
+ <bootstrapSchemaClass>org.apache.directory.server.core.schema.bootstrap.SambaSchema</bootstrapSchemaClass>
</bootstrapSchemaClasses>
</configuration>
<executions>
Modified: directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
URL: http://svn.apache.org/viewvc/directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java?view=diff&rev=485977&r1=485976&r2=485977
==============================================================================
--- directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java (original)
+++ directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java Mon Dec 11 17:51:39 2006
@@ -21,20 +21,13 @@
import java.io.File;
import java.util.HashSet;
-import java.util.Hashtable;
import java.util.Set;
import javax.naming.NamingException;
import javax.naming.directory.BasicAttributes;
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.DirectoryServiceListener;
import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
-import org.apache.directory.server.core.configuration.StartupConfiguration;
-import org.apache.directory.server.core.interceptor.InterceptorChain;
-import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
import org.apache.directory.server.core.schema.Registries;
import org.apache.directory.server.core.schema.bootstrap.ApacheSchema;
@@ -82,8 +75,6 @@
*/
public void execute() throws MojoExecutionException, MojoFailureException
{
- getLog().error( "Fake error" );
-
// -------------------------------------------------------------------
// load the bootstrap schemas to pre-load into the partition
// -------------------------------------------------------------------
@@ -91,7 +82,7 @@
Registries registries = new BootstrapRegistries();
Set<BootstrapSchema> schemas = new HashSet<BootstrapSchema>();
- // always include these
+ // always include these core bootstrap schemas
schemas.add( new SystemSchema() );
schemas.add( new ApacheSchema() );
schemas.add( new ApachemetaSchema() );
@@ -150,7 +141,7 @@
Set<String> indexedAttributes = new HashSet<String>();
indexedAttributes.add( "ou" );
indexedAttributes.add( "cn" );
- indexedAttributes.add( "oid" );
+ indexedAttributes.add( "m-oid" );
mpConfig.setIndexedAttributes( indexedAttributes );
try
@@ -171,69 +162,6 @@
catch ( NamingException e )
{
e.printStackTrace();
- }
- }
-
-
- class MojoDSConfig implements DirectoryServiceConfiguration
- {
- Registries registries = null;
- StartupConfiguration conf = null;
-
- public MojoDSConfig( Registries registries, StartupConfiguration conf )
- {
- this.registries = registries;
- }
-
- public Hashtable getEnvironment()
- {
- return new Hashtable();
- }
-
- public String getInstanceId()
- {
- return "default";
- }
-
- public InterceptorChain getInterceptorChain()
- {
- // not used by partition
- return null;
- }
-
- public PartitionNexus getPartitionNexus()
- {
- // also not used
- return null;
- }
-
- public Registries getRegistries()
- {
- return registries;
- }
-
- public DirectoryService getService()
- {
- // not used by partition
- return null;
- }
-
- public DirectoryServiceListener getServiceListener()
- {
- // not used by partition
- return null;
- }
-
- public StartupConfiguration getStartupConfiguration()
- {
- // not used by partition
- return null;
- }
-
- public boolean isFirstStart()
- {
- // not used by partition
- return true;
}
}
}
Added: directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/MojoDSConfig.java
URL: http://svn.apache.org/viewvc/directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/MojoDSConfig.java?view=auto&rev=485977
==============================================================================
--- directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/MojoDSConfig.java (added)
+++ directory/branches/trunks/schema/apacheds/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/MojoDSConfig.java Mon Dec 11 17:51:39 2006
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.directory.server.core.bootstrap.plugin;
+
+import java.util.Hashtable;
+
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.DirectoryServiceConfiguration;
+import org.apache.directory.server.core.DirectoryServiceListener;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
+import org.apache.directory.server.core.interceptor.InterceptorChain;
+import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.core.schema.Registries;
+
+
+class MojoDSConfig implements DirectoryServiceConfiguration
+{
+ private final Registries registries;
+ private final StartupConfiguration conf;
+
+
+ public MojoDSConfig( Registries registries, StartupConfiguration conf )
+ {
+ this.registries = registries;
+ this.conf = conf;
+ }
+
+ public Hashtable getEnvironment()
+ {
+ return new Hashtable();
+ }
+
+ public String getInstanceId()
+ {
+ return "default";
+ }
+
+ public InterceptorChain getInterceptorChain()
+ {
+ // not used by partition
+ return null;
+ }
+
+ public PartitionNexus getPartitionNexus()
+ {
+ // also not used
+ return null;
+ }
+
+ public Registries getRegistries()
+ {
+ return registries;
+ }
+
+ public DirectoryService getService()
+ {
+ // not used by partition
+ return null;
+ }
+
+ public DirectoryServiceListener getServiceListener()
+ {
+ // not used by partition
+ return null;
+ }
+
+ public StartupConfiguration getStartupConfiguration()
+ {
+ return conf;
+ }
+
+ public boolean isFirstStart()
+ {
+ // not used by partition
+ return true;
+ }
+}
\ No newline at end of file
Modified: directory/branches/trunks/schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApachemetaMatchingRuleProducer.java
URL: http://svn.apache.org/viewvc/directory/branches/trunks/schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApachemetaMatchingRuleProducer.java?view=diff&rev=485977&r1=485976&r2=485977
==============================================================================
--- directory/branches/trunks/schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApachemetaMatchingRuleProducer.java (original)
+++ directory/branches/trunks/schema/apacheds/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/ApachemetaMatchingRuleProducer.java Mon Dec 11 17:51:39 2006
@@ -24,7 +24,11 @@
import javax.naming.NamingException;
+import jdbm.helper.StringComparator;
+
+import org.apache.commons.collections.comparators.ComparableComparator;
import org.apache.directory.server.core.schema.SyntaxRegistry;
+import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
import org.apache.directory.shared.ldap.schema.MatchingRule;
import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -33,7 +37,6 @@
import org.apache.directory.shared.ldap.schema.Syntax;
-
/**
* A producer of MatchingRule objects for the apachemeta schema. This code has been
* automatically generated using schema files in the OpenLDAP format along with
@@ -72,6 +75,122 @@
matchingRule = new NumericOidMatch( registries.getSyntaxRegistry() );
cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule );
+
+ matchingRule = new SupDITStructureRuleMatch( registries.getSyntaxRegistry() );
+ cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule );
+
+ matchingRule = new RuleIdMatch( registries.getSyntaxRegistry() );
+ cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule );
+ }
+
+
+ public static class RuleIdMatch implements MatchingRule
+ {
+ private static final long serialVersionUID = 1L;
+ private final String OID = "1.3.6.1.4.1.18060.0.4.0.1.4";
+ private final Syntax syntax;
+ private final String[] NAMES = new String[] { "ruleIdMatch" };
+
+
+ RuleIdMatch( SyntaxRegistry registry ) throws NamingException
+ {
+ syntax = registry.lookup( "1.3.6.1.4.1.1466.115.121.1.26" );
+ }
+
+ public Comparator getComparator() throws NamingException
+ {
+ return new ComparableComparator();
+ }
+
+ public Normalizer getNormalizer() throws NamingException
+ {
+ return new DeepTrimToLowerNormalizer();
+ }
+
+ public Syntax getSyntax() throws NamingException
+ {
+ return syntax;
+ }
+
+ public String getDescription()
+ {
+ return "Don't know Emmanuel needs to define what this is for.";
+ }
+
+ public String getName()
+ {
+ return NAMES[0];
+ }
+
+ public String[] getNames()
+ {
+ return NAMES;
+ }
+
+ public String getOid()
+ {
+ return OID;
+ }
+
+ public boolean isObsolete()
+ {
+ return false;
+ }
+ }
+
+
+ public static class SupDITStructureRuleMatch implements MatchingRule
+ {
+ private static final long serialVersionUID = 1L;
+ String[] NAMES = new String[] { "supDITStructureRuleMatch" };
+ Syntax syntax;
+
+
+ public SupDITStructureRuleMatch( SyntaxRegistry registry ) throws NamingException
+ {
+ this.syntax = registry.lookup( "1.3.6.1.4.1.1466.115.121.1.17" );
+ }
+
+
+ public Comparator getComparator() throws NamingException
+ {
+ return new StringComparator();
+ }
+
+ public Normalizer getNormalizer() throws NamingException
+ {
+ return new DeepTrimToLowerNormalizer();
+ }
+
+ public Syntax getSyntax() throws NamingException
+ {
+ return syntax;
+ }
+
+ public String getDescription()
+ {
+ return "A matching rule matching dit structure rule attributes";
+ }
+
+ public String getName()
+ {
+ return NAMES[0];
+ }
+
+ public String[] getNames()
+ {
+ return NAMES;
+ }
+
+ public String getOid()
+ {
+ return "1.3.6.1.4.1.18060.0.4.0.1.3";
+ }
+
+ public boolean isObsolete()
+ {
+ return false;
+ }
}
Modified: directory/branches/trunks/schema/apacheds/core/src/main/schema/apachemeta.schema
URL: http://svn.apache.org/viewvc/directory/branches/trunks/schema/apacheds/core/src/main/schema/apachemeta.schema?view=diff&rev=485977&r1=485976&r2=485977
==============================================================================
--- directory/branches/trunks/schema/apacheds/core/src/main/schema/apachemeta.schema (original)
+++ directory/branches/trunks/schema/apacheds/core/src/main/schema/apachemeta.schema Mon Dec 11 17:51:39 2006
@@ -36,6 +36,8 @@
# | 1.3.6.1.4.1.18060.0.4.0.1.0 | nameOrNumericIdMatch |
# | 1.3.6.1.4.1.18060.0.4.0.1.1 | objectClassTypeMatch |
# | 1.3.6.1.4.1.18060.0.4.0.1.2 | numericOidMatch |
+# | 1.3.6.1.4.1.18060.0.4.0.1.3 | supDITStructureRuleMatch |
+# | 1.3.6.1.4.1.18060.0.4.0.1.4 | ruleIDMatch |
# +------------------------------+-----------------------------+
#
# +------------------------------+-----------------------------+
@@ -412,7 +414,7 @@
# --- m-matchingRuleSyntax AttributeType --------------------------------
attributetype ( 1.3.6.1.4.1.18060.0.4.0.2.31 NAME 'm-matchingRuleSyntax'
DESC 'The matchingRule attribute syntax '
- EQUALITY NumericOidMatch
+ EQUALITY numericOidMatch
SYNTAX 1.3.6.1.4.1.18060.0.4.0.0.2
SINGLE-VALUE
)