Author: akarasulu
Date: Sat Oct 16 02:02:30 2004
New Revision: 54912
Added:
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/AbstractSyntax.java
- copied, changed from rev 53921,
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java
Removed:
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java
Modified:
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
Log:
Commit changes ...
o renamed BaseSyntax back again to AbstractSyntax now that we're using
resolution to get at the dependent objects
o changed interface Syntax by adding a NamingException to getSyntaxChecker()
which now is abstract in AbstractSyntax so registries can be used under
the hood by some implementations like the bootstrap producers
Copied:
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/AbstractSyntax.java
(from rev 53921,
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java)
==============================================================================
---
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java
(original)
+++
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/AbstractSyntax.java
Sat Oct 16 02:02:30 2004
@@ -18,20 +18,16 @@
/**
- * Default Syntax implementation.
+ * An abstract Syntax class.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
* @version $Rev$
*/
-public class BaseSyntax implements Syntax
+public abstract class AbstractSyntax implements Syntax
{
- /** use default binary syntax checker (where all values accepted) */
- private final SyntaxChecker DEFAULT_CHECKER = BinarySyntaxChecker.INSTANCE;
/** the oid of this Syntax */
private final String oid;
- /** the SyntaxChecker used to enforce this Syntax */
- private SyntaxChecker checker;
/** the human readible flag */
private boolean isHumanReadible;
/** a short description of this Syntax */
@@ -50,11 +46,10 @@
*
* @param oid the OID for this Syntax
*/
- protected BaseSyntax( String oid )
+ protected AbstractSyntax( String oid )
{
this.oid = oid;
this.isHumanReadible = false;
- this.checker = DEFAULT_CHECKER;
}
@@ -62,29 +57,13 @@
* Creates a Syntax object using a unique OID.
*
* @param oid the OID for this Syntax
- * @param syntaxChecker the syntax checker for this Syntax
- */
- protected BaseSyntax( String oid, SyntaxChecker syntaxChecker )
- {
- this.oid = oid;
- this.isHumanReadible = false;
- this.checker = syntaxChecker;
- }
-
-
- /**
- * Creates a Syntax object using a unique OID.
- *
- * @param oid the OID for this Syntax
* @param name the name for this Syntax
- * @param syntaxChecker the syntax checker for this Syntax
*/
- protected BaseSyntax( String oid, String name, SyntaxChecker syntaxChecker
)
+ protected AbstractSyntax( String oid, String name )
{
this.oid = oid;
this.name = name;
this.isHumanReadible = false;
- this.checker = syntaxChecker;
}
@@ -94,15 +73,12 @@
* @param oid the OID for this Syntax
* @param name the name for this Syntax
* @param isHumanReadible whether or not Syntax is human readible
- * @param syntaxChecker the syntax checker for this Syntax
*/
- protected BaseSyntax( String oid, String name, boolean isHumanReadible,
- SyntaxChecker syntaxChecker )
+ protected AbstractSyntax( String oid, String name, boolean isHumanReadible
)
{
this.oid = oid;
this.name = name;
this.isHumanReadible = isHumanReadible;
- this.checker = syntaxChecker;
}
@@ -113,16 +89,14 @@
* @param name the name for this Syntax
* @param isHumanReadible whether or not Syntax is human readible
* @param description the description for this Syntax
- * @param syntaxChecker the syntax checker for this Syntax
*/
- protected BaseSyntax( String oid, String name, String description,
- boolean isHumanReadible, SyntaxChecker syntaxChecker
)
+ protected AbstractSyntax( String oid, String name, String description,
+ boolean isHumanReadible )
{
this.oid = oid;
this.name = name;
this.description = description;
this.isHumanReadible = isHumanReadible;
- this.checker = syntaxChecker;
}
@@ -167,15 +141,6 @@
}
- /**
- * @see org.apache.ldap.common.schema.Syntax#getSyntaxChecker()
- */
- public final SyntaxChecker getSyntaxChecker()
- {
- return checker;
- }
-
-
// ------------------------------------------------------------------------
// Protected setters
// ------------------------------------------------------------------------
@@ -211,17 +176,6 @@
protected void setName( String name )
{
this.name = name;
- }
-
-
- /**
- * Sets the name of this Syntax.
- *
- * @param syntaxChecker the Syntax checker to use for this Syntax
- */
- protected void setSyntaxChecker( SyntaxChecker syntaxChecker )
- {
- this.checker = syntaxChecker;
}
Modified:
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
==============================================================================
---
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
(original)
+++
incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
Sat Oct 16 02:02:30 2004
@@ -16,6 +16,8 @@
*/
package org.apache.ldap.common.schema;
+import javax.naming.NamingException;
+
/**
* A syntax definition. Each attribute stored in a directory has a defined
@@ -90,5 +92,5 @@
*
* @return the SyntaxChecker
*/
- SyntaxChecker getSyntaxChecker();
+ SyntaxChecker getSyntaxChecker() throws NamingException;
}