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 2004/10/20 21:56:35 UTC
svn commit: rev 55180 - incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap
Author: akarasulu
Date: Wed Oct 20 12:56:35 2004
New Revision: 55180
Modified:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapSchema.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchema.java
Log:
adding more to make bootstrap schemas work
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java Wed Oct 20 12:56:35 2004
@@ -57,11 +57,35 @@
}
+ protected static BootstrapSyntax
+ newSyntax( String oid, BootstrapRegistries registries )
+ {
+ return new BootstrapSyntax( oid, registries.getSyntaxCheckerRegistry() );
+ }
+
+
+
+ protected static BootstrapAttributeType
+ newAttributeType( String oid, BootstrapRegistries registries )
+ {
+ return new BootstrapAttributeType( oid, registries );
+ }
+
+
+
+ protected static BootstrapObjectClass
+ newObjectClass( String oid, BootstrapRegistries registries )
+ {
+ return new BootstrapObjectClass( oid, registries );
+ }
+
+
+
/**
* A mutable Syntax for the bootstrap phase that uses the
* syntaxCheckerRegistry to dynamically resolve syntax checkers.
*/
- protected static class BootstrapSyntax extends AbstractSyntax
+ public static class BootstrapSyntax extends AbstractSyntax
{
final SyntaxCheckerRegistry registry;
@@ -108,7 +132,7 @@
* A concrete mutable attributeType implementation for bootstrapping which
* uses registries for dynamically resolving dependent objects.
*/
- protected static class BootstrapAttributeType extends AbstractAttributeType
+ public static class BootstrapAttributeType extends AbstractAttributeType
{
private final SyntaxRegistry syntaxRegistry;
private final MatchingRuleRegistry matchingRuleRegistry;
@@ -120,7 +144,7 @@
private String syntaxId;
- public BootstrapAttributeType( String oid, BootstrapRegistries registries )
+ protected BootstrapAttributeType( String oid, BootstrapRegistries registries )
{
super( oid );
@@ -129,7 +153,7 @@
attributeTypeRegistry = registries.getAttributeTypeRegistry();
}
- protected void setSuperiorId( String superiorId )
+ public void setSuperiorId( String superiorId )
{
this.superiorId = superiorId;
}
@@ -139,7 +163,7 @@
return this.attributeTypeRegistry.lookup( superiorId );
}
- protected void setNames( String[] names )
+ public void setNames( String[] names )
{
super.setNames( names );
}
@@ -149,7 +173,7 @@
return this.matchingRuleRegistry.lookup( equalityId );
}
- protected void setEqualityId( String equalityId )
+ public void setEqualityId( String equalityId )
{
this.equalityId = equalityId;
}
@@ -159,7 +183,7 @@
return this.matchingRuleRegistry.lookup( substrId ) ;
}
- protected void setSubstrId( String substrId )
+ public void setSubstrId( String substrId )
{
this.substrId = substrId;
}
@@ -169,12 +193,12 @@
return this.matchingRuleRegistry.lookup( orderingId );
}
- protected void setOrderingId( String orderingId )
+ public void setOrderingId( String orderingId )
{
this.orderingId = orderingId;
}
- protected void setSyntaxId( String syntaxId )
+ public void setSyntaxId( String syntaxId )
{
this.syntaxId = syntaxId;
}
@@ -184,32 +208,32 @@
return this.syntaxRegistry.lookup( syntaxId );
}
- protected void setSingleValue( boolean singleValue )
+ public void setSingleValue( boolean singleValue )
{
super.setSingleValue( singleValue );
}
- protected void setCollective( boolean collective )
+ public void setCollective( boolean collective )
{
super.setCollective( collective );
}
- protected void setCanUserModify( boolean canUserModify )
+ public void setCanUserModify( boolean canUserModify )
{
super.setCanUserModify( canUserModify );
}
- protected void setObsolete( boolean obsolete )
+ public void setObsolete( boolean obsolete )
{
super.setObsolete( obsolete );
}
- protected void setUsage( UsageEnum usage )
+ public void setUsage( UsageEnum usage )
{
super.setUsage( usage );
}
- protected void setLength( int length )
+ public void setLength( int length )
{
super.setLength( length );
}
@@ -220,7 +244,7 @@
* A concrete mutable objectClass implementation for bootstrapping which
* uses registries for dynamically resolving dependent objects.
*/
- protected class BootstrapObjectClass extends AbstractSchemaObject
+ public static class BootstrapObjectClass extends AbstractSchemaObject
implements ObjectClass
{
private final ObjectClassRegistry objectClassRegistry;
@@ -243,7 +267,7 @@
* @param oid the OID of the new objectClass
* @param registries the bootstrap registries to use for resolving dependent objects
*/
- public BootstrapObjectClass( String oid, BootstrapRegistries registries )
+ protected BootstrapObjectClass( String oid, BootstrapRegistries registries )
{
super( oid );
@@ -285,7 +309,7 @@
}
- protected void setType( ObjectClassTypeEnum type )
+ public void setType( ObjectClassTypeEnum type )
{
this.type = type;
}
@@ -340,17 +364,17 @@
// --------------------------------------------------------------------
- protected void setObsolete( boolean obsolete )
+ public void setObsolete( boolean obsolete )
{
super.setObsolete( obsolete );
}
- protected void setNames( String[] names )
+ public void setNames( String[] names )
{
super.setNames( names );
}
- protected void setDescription( String description )
+ public void setDescription( String description )
{
super.setDescription( description );
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapSchema.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapSchema.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapSchema.java Wed Oct 20 12:56:35 2004
@@ -29,6 +29,7 @@
*/
public class AbstractBootstrapSchema implements BootstrapSchema
{
+ protected static final String[] DEFAULT_DEPS = ArrayUtils.EMPTY_STRING_ARRAY;
private static final String DEFAULT_OWNER = "uid=admin,ou=system";
private static final String DEFAULT_SCHEMA_NAME = "default";
private static final String DEFAULT_PACKAGE_NAME = "org.apache.eve.schema.bootstrap";
@@ -36,7 +37,7 @@
private final String owner;
private final String schemaName;
private final String packageName;
- private final String[] dependencies;
+ private String[] dependencies;
private transient String baseName;
private transient String defaultBaseName;
@@ -49,6 +50,25 @@
// ------------------------------------------------------------------------
+ protected AbstractBootstrapSchema( String schemaName )
+ {
+ this( null, schemaName, null, null );
+ }
+
+
+ protected AbstractBootstrapSchema( String owner, String schemaName )
+ {
+ this( owner, schemaName, null, null );
+ }
+
+
+ protected AbstractBootstrapSchema( String owner, String schemaName,
+ String packageName )
+ {
+ this( owner, schemaName, packageName, null );
+ }
+
+
protected AbstractBootstrapSchema( String owner,
String schemaName,
String packageName,
@@ -127,6 +147,12 @@
}
+ protected final void setDependencies( String[] dependencies )
+ {
+ this.dependencies = dependencies;
+ }
+
+
public String getBaseClassName()
{
return baseName;
@@ -160,5 +186,11 @@
public String getPackageName()
{
return packageName;
+ }
+
+
+ public String getUnqualifiedClassName()
+ {
+ return schemaNameCapped + "Schema";
}
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchema.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchema.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/BootstrapSchema.java Wed Oct 20 12:56:35 2004
@@ -100,4 +100,11 @@
* @return the bootstrap schema class name for a producer type in this schema
*/
String getUnqualifiedClassName( ProducerTypeEnum type );
+
+ /**
+ * Gets the unqualified class name for Schema class.
+ *
+ * @return the bootstrap schema class name
+ */
+ String getUnqualifiedClassName();
}