You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2009/08/23 22:56:33 UTC
svn commit: r807017 -
/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/
Author: elecharny
Date: Sun Aug 23 20:56:32 2009
New Revision: 807017
URL: http://svn.apache.org/viewvc?rev=807017&view=rev
Log:
Modified the first SO registry classes.
Modified:
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/LdapSyntaxRegistry.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/MatchingRuleRegistry.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java?rev=807017&r1=807016&r2=807017&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ComparatorRegistry.java Sun Aug 23 20:56:32 2009
@@ -20,56 +20,24 @@
package org.apache.directory.shared.ldap.schema.registries;
-import java.util.Iterator;
-
-import javax.naming.NamingException;
-
import org.apache.directory.shared.ldap.schema.LdapComparator;
+import org.apache.directory.shared.ldap.schema.SchemaObjectType;
import org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescription;
/**
- * Comparator registry component's service interface.
+ * Comparator registry component's service class.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public interface ComparatorRegistry extends SchemaObjectRegistry<LdapComparator<?>>
+public class ComparatorRegistry extends SchemaObjectRegistry<LdapComparator<?>, LdapComparatorDescription>
{
/**
- * Registers a Comparator with this registry.
- *
- * @param description the comparatorDescription for the comparator to register
- * @param comparator the Comparator to register
- * @throws NamingException if the Comparator is already registered or the
- * registration operation is not supported
- */
- void register( LdapComparatorDescription description, LdapComparator<?> comparator ) throws NamingException;
-
-
- /**
- * Iterates over the numeric OID strings of this registry.
- *
- * @return Iterator of numeric OID strings
- */
- Iterator<LdapComparatorDescription> ldapComparatorDescriptionIterator();
-
-
- /**
- * Unregisters comparators from this registry associated with a schema.
- *
- * @param schemaName the name of the schema whose comparators are removed
- * from this registry
- */
- void unregisterSchemaElements( String schemaName );
-
-
- /**
- * Renames the schemaName associated with entities within this
- * registry to a new schema name.
- *
- * @param originalSchemaName the original schema name
- * @param newSchemaName the new name to give to the schema
+ * Creates a new default ComparatorRegistry instance.
*/
- void renameSchema( String originalSchemaName, String newSchemaName );
+ public ComparatorRegistry()
+ {
+ super( SchemaObjectType.COMPARATOR );
+ }
}
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/LdapSyntaxRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/LdapSyntaxRegistry.java?rev=807017&r1=807016&r2=807017&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/LdapSyntaxRegistry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/LdapSyntaxRegistry.java Sun Aug 23 20:56:32 2009
@@ -19,16 +19,24 @@
*/
package org.apache.directory.shared.ldap.schema.registries;
-
import org.apache.directory.shared.ldap.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.schema.SchemaObjectType;
+import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
/**
- * Manages the lookup and registration of Syntaxes within the system by OID.
+ * Manages the lookup and registration of LdapSyntaxes within the system by OID.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public interface LdapSyntaxRegistry extends SchemaObjectRegistry<LdapSyntax>
+public class LdapSyntaxRegistry extends SchemaObjectRegistry<LdapSyntax, LdapSyntaxDescription>
{
+ /**
+ * Creates a new default LdapSyntaxRegistry instance.
+ */
+ public LdapSyntaxRegistry()
+ {
+ super( SchemaObjectType.LDAP_SYNTAX );
+ }
}
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/MatchingRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/MatchingRuleRegistry.java?rev=807017&r1=807016&r2=807017&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/MatchingRuleRegistry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/MatchingRuleRegistry.java Sun Aug 23 20:56:32 2009
@@ -20,11 +20,9 @@
package org.apache.directory.shared.ldap.schema.registries;
-import java.util.Iterator;
-
-import javax.naming.NamingException;
-
import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.SchemaObjectType;
+import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
/**
@@ -33,36 +31,13 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public interface MatchingRuleRegistry extends SchemaObjectRegistry<MatchingRule>
+public class MatchingRuleRegistry extends SchemaObjectRegistry<MatchingRule, MatchingRuleDescription>
{
/**
- * Registers a MatchingRule with this registry.
- *
- * @param matchingRule the MatchingRule to register
- * @throws NamingException if the matchingRule is already registered or the
- * registration operation is not supported
- */
- void register( MatchingRule matchingRule ) throws NamingException;
-
-
- /**
- * Looks up a MatchingRule by its unique Object Identifier or by name.
- *
- * @param id the object identifier or the name identifier
- * @return the MatchingRule for the id
- * @throws NamingException if there is a backing store failure or the
- * MatchingRule does not exist.
- */
- MatchingRule lookup( String id ) throws NamingException;
-
-
- /**
- * Checks to see if a MatchingRule exists. Backing store failures simply
- * return false.
- *
- * @param oid the object identifier
- * @return true if a MatchingRule definition exists for the oid, false
- * otherwise
+ * Creates a new default MatchingRuleRegistry instance.
*/
- boolean hasMatchingRule( String oid );
+ public MatchingRuleRegistry()
+ {
+ super( SchemaObjectType.MATCHING_RULE );
+ }
}
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java?rev=807017&r1=807016&r2=807017&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/NormalizerRegistry.java Sun Aug 23 20:56:32 2009
@@ -20,55 +20,24 @@
package org.apache.directory.shared.ldap.schema.registries;
-import java.util.Iterator;
-
-import javax.naming.NamingException;
-
import org.apache.directory.shared.ldap.schema.Normalizer;
+import org.apache.directory.shared.ldap.schema.SchemaObjectType;
import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription;
/**
- * Normalizer registry service interface.
+ * Normalizer registry service class.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public interface NormalizerRegistry extends SchemaObjectRegistry<Normalizer>
+public class NormalizerRegistry extends SchemaObjectRegistry<Normalizer, NormalizerDescription>
{
/**
- * Registers a Normalizer with this registry.
- *
- * @param normalizer the Normalizer to register
- * @throws NamingException if the Normalizer is already registered or the
- * registration operation is not supported
- */
- void register( NormalizerDescription description, Normalizer normalizer ) throws NamingException;
-
-
- /**
- * Used to iterate through all normalizerDescriptions.
- *
- * @return an Iterator over the set of NormalizerDescriptions in this registry
- */
- Iterator<NormalizerDescription> normalizerDescriptionIterator();
-
-
- /**
- * Unregisters normalizers from this registry associated with a schema.
- *
- * @param schemaName the name of the schema whose normalizers are
- * removed from this registry
- */
- void unregisterSchemaElements( String schemaName );
-
-
- /**
- * Renames the schemaName associated with entities within this
- * registry to a new schema name.
- *
- * @param originalSchemaName the original schema name
- * @param newSchemaName the new name to give to the schema
+ * Creates a new default NormalizerRegistry instance.
*/
- void renameSchema( String originalSchemaName, String newSchemaName );
+ public NormalizerRegistry()
+ {
+ super( SchemaObjectType.NORMALIZER );
+ }
}
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java?rev=807017&r1=807016&r2=807017&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SyntaxCheckerRegistry.java Sun Aug 23 20:56:32 2009
@@ -20,10 +20,7 @@
package org.apache.directory.shared.ldap.schema.registries;
-import java.util.Iterator;
-
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.schema.SchemaObjectType;
import org.apache.directory.shared.ldap.schema.SyntaxChecker;
import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription;
@@ -34,42 +31,13 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public interface SyntaxCheckerRegistry extends SchemaObjectRegistry<SyntaxChecker>
+public class SyntaxCheckerRegistry extends SchemaObjectRegistry<SyntaxChecker, SyntaxCheckerDescription>
{
/**
- * Registers a SyntaxChecker with this registry.
- *
- * @param description the syntaxCheckerDescription for this syntaxChecker
- * @param syntaxChecker the SyntaxChecker to register
- * @throws NamingException if the SyntaxChecker is already registered or the
- * registration operation is not supported
- */
- void register( SyntaxCheckerDescription description, SyntaxChecker syntaxChecker ) throws NamingException;
-
-
- /**
- * Get's an iterator over all the syntaxCheckerDescriptions associated with this registry.
- *
- * @return an Iterator over all the syntaxCheckerDescriptions
- */
- Iterator<SyntaxCheckerDescription> syntaxCheckerDescriptionIterator();
-
-
- /**
- * Unregisters all syntaxCheckers defined for a specific schema from
- * this registry.
- *
- * @param schemaName the name of the schema whose syntaxCheckers will be removed
- */
- void unregisterSchemaElements( String schemaName );
-
-
- /**
- * Renames the schemaName associated with entities within this
- * registry to a new schema name.
- *
- * @param originalSchemaName the original schema name
- * @param newSchemaName the new name to give to the schema
+ * Creates a new default SyntaxCheckerRegistry instance.
*/
- void renameSchema( String originalSchemaName, String newSchemaName );
+ public SyntaxCheckerRegistry()
+ {
+ super( SchemaObjectType.SYNTAX_CHECKER );
+ }
}