directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 55105 - incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap
Date Tue, 19 Oct 2004 22:05:53 GMT
Author: akarasulu
Date: Tue Oct 19 15:05:52 2004
New Revision: 55105

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/BootstrapSchema.java
Log:
minor additions to be able to resolve certain things

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
Tue Oct 19 15:05:52 2004
@@ -41,6 +41,8 @@
     private transient String baseName;
     private transient String defaultBaseName;
 
+    private transient String schemaNameCapped;
+
 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
@@ -89,17 +91,20 @@
         }
 
         StringBuffer buf = new StringBuffer();
-        buf.append( DEFAULT_PACKAGE_NAME );
-        buf.append( ClassUtils.PACKAGE_SEPARATOR_CHAR );
         buf.append( Character.toUpperCase( schemaName.charAt( 0 ) ) );
         buf.append( schemaName.substring( 1, schemaName.length() ) );
+        schemaNameCapped = buf.toString();
+
+        buf.setLength( 0 );
+        buf.append( DEFAULT_PACKAGE_NAME );
+        buf.append( ClassUtils.PACKAGE_SEPARATOR_CHAR );
+        buf.append( schemaNameCapped );
         defaultBaseName = buf.toString();
 
         buf.setLength( 0 );
         buf.append( packageName );
         buf.append( ClassUtils.PACKAGE_SEPARATOR_CHAR );
-        buf.append( Character.toUpperCase( schemaName.charAt( 0 ) ) );
-        buf.append( schemaName.substring( 1, schemaName.length() ) );
+        buf.append( schemaNameCapped );
         baseName = buf.toString();
     }
 
@@ -131,6 +136,24 @@
     public String getDefaultBaseClassName()
     {
         return defaultBaseName;
+    }
+
+
+    public String getFullClassName( ProducerTypeEnum type )
+    {
+        return baseName + type.getName();
+    }
+
+
+    public String getFullDefaultBaseClassName( ProducerTypeEnum type )
+    {
+        return defaultBaseName + type.getName();
+    }
+
+
+    public String getUnqualifiedClassName( ProducerTypeEnum type )
+    {
+        return schemaNameCapped + type.getName();
     }
 
 

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
Tue Oct 19 15:05:52 2004
@@ -69,11 +69,25 @@
     String getBaseClassName();
 
     /**
+     * Gets the class name for bootstrap Schema class producer type.
+     *
+     * @return the bootstrap schema class name for a producer type in this schema
+     */
+    String getFullClassName( ProducerTypeEnum type );
+
+    /**
      * If the base class name for the target class does not resolve, we attempt
      * to load another backup class using this default base class name which
      * tries another package for the target class factory to load.
      *
      * @return the default base class name
      */
-    String getDefaultBaseClassName();
+    String getFullDefaultBaseClassName( ProducerTypeEnum type );
+
+    /**
+     * Gets the unqualified class name for bootstrap Schema class producer type.
+     *
+     * @return the bootstrap schema class name for a producer type in this schema
+     */
+    String getUnqualifiedClassName( ProducerTypeEnum type );
 }

Mime
View raw message